2016年3月23日水曜日

Metric 予測 by 複数 Nominal:Hetero な給料の分析

Single-Factor "ANOVA" の拡張」からの続き。

分析するデータは 1,080 件の大学教授の給料、以下はデータの概要。

> head(myDataFrame)
   Org                 OrgName Cla   Pos ClaPos Salary
1   PL              Philosophy  PC Assoc PC.FT2  72395
2 MUTH            Music Theory  PC Assoc PC.FT2  61017
3  ENG                 English  PC Assoc PC.FT2  82370
4 CMLT  Comparative Literature  PC Assoc PC.FT2  68805
5 LGED      Language Education  PT Assis PT.FT3  63796
6 MGMT Dept Mangement & Entrep  PR Endow PR.NDW 219600
> summary(myDataFrame)
      Org                                OrgName    Cla           Pos     
 BI     : 51   Biology                       : 51   PC:364   Assis  :240  
 PSY    : 41   Psychological & Brain Sciences: 41   PR:476   Assoc  :364  
 MATH   : 40   Mathematics                   : 40   PT:240   Full   :360  
 SPEA   : 40   Public & Environmental Affairs: 40            Endow  : 84  
 ENG    : 39   English                       : 39            Disting: 32  
 MUIN   : 38   Instrument Applied Music      : 38                         
 (Other):831   (Other)                       :831                         
    ClaPos        Salary      
 PC.FT2:364   Min.   : 54501  
 PR.DST: 32   1st Qu.: 77072  
 PR.FT1:360   Median : 96580  
 PR.NDW: 84   Mean   :110452  
 PT.FT3:240   3rd Qu.:130878  
              Max.   :308228  

5 つのランク(Pos: Assis, Assoc, Full, Endow, Disting)と部門(Org)で Salary をモデル化するもの。以下のように PosOrginteraction を想定。
There might also be interactions, in the sense that the effect of rank might be of different magnitudes in different departments, or the effect of department might be of different magnitudes at different ranks.

推定結果は以下の通り。60 種類の Org から、BFIN (business finance), CHEM (chemistry), PSY (psychology), ENG (English)4 つの結果(図 20.3)。
推定された青色の曲線は、白丸のデータを反映できているとは言い難い。モデルが前提にしているデータは homogeneous variances normally distributed で、その点の見直しが必要。

次の、推定結果(表 20.2)からも、homogeneous variances ではないことが分かる。
次に比較(図 20.4)。
associate professorsassistant professors を平均して約 13,400 ドル多い。とはいえ 10,000 から 17,00095%HDI の幅が大きいので、信頼性には欠ける。中央の「CHEMPSY」の Org 間の比較でも同様。右の「複合比較」では、BFIN3 Org (PSY, CHEM, ENG) の平均を比較している。BFIN が圧倒的に勝っている。


The Difference of the Differences

次は図 20.5
 
左から 2 つは「ある Org での FullAssis の違い」という "simple" な比較。

3 つ目の比較は、次のようにスクリプトで指定する。

list( list(c("Full"), c("Assis")), list(c("CHEM"), c("PSY")), 
 compVal=0.0, ROPE=c(-1000,1000)

これは「FullAssis の違い」と「CHEMPSY の違い」の「違い」。つまり、the difference of the differences「違いの違い」。

ところが、この「違いの違い」の 95%HDI の幅 40,000 は、他の "simple" な 2 つと比較して広い。つまり「もっと不確定」ということ。これは、simple な比較より多く「不確定要素」の項目を分析しているため。この不確定さの解消する方法は、観測データを増やすこと。

このように、多様な組合せの比較が可能。「安易な predictors の排除」が良くないことなどは「Metric 予測 by 複数 Metric:Predictors 選択 = モデル比較」に記した。

Crossover Interaction」に続く。

0 件のコメント:

コメントを投稿