Anova, Ancova, Manova, Mancova assignment

Data summary

##         rank     discipline yrs.since.phd    yrs.service        sex     
##  AsstProf : 67   A:181      Min.   : 1.00   Min.   : 0.00   Female: 39  
##  AssocProf: 64   B:216      1st Qu.:12.00   1st Qu.: 7.00   Male  :358  
##  Prof     :266              Median :21.00   Median :16.00               
##                             Mean   :22.31   Mean   :17.61               
##                             3rd Qu.:32.00   3rd Qu.:27.00               
##                             Max.   :56.00   Max.   :60.00               
##      salary      
##  Min.   : 57800  
##  1st Qu.: 91000  
##  Median :107300  
##  Mean   :113706  
##  3rd Qu.:134185  
##  Max.   :231545

3-way Anova with and w/o interactions

w/o interactions

##              Df    Sum Sq   Mean Sq F value   Pr(>F)    
## sex           1 6.980e+09 6.980e+09   13.62 0.000256 ***
## discipline    1 8.792e+09 8.792e+09   17.15 4.23e-05 ***
## rank          2 1.466e+11 7.329e+10  142.98  < 2e-16 ***
## Residuals   392 2.009e+11 5.126e+08                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Rank, discipline and sex are statistically significant.

with interactions

##                      Df    Sum Sq   Mean Sq F value   Pr(>F)    
## sex                   1 6.980e+09 6.980e+09  13.460 0.000278 ***
## discipline            1 8.792e+09 8.792e+09  16.955 4.69e-05 ***
## rank                  2 1.466e+11 7.329e+10 141.336  < 2e-16 ***
## sex:discipline        1 4.001e+08 4.001e+08   0.772 0.380295    
## sex:rank              2 2.909e+08 1.455e+08   0.281 0.755553    
## discipline:rank       2 4.748e+08 2.374e+08   0.458 0.632997    
## sex:discipline:rank   2 1.324e+08 6.620e+07   0.128 0.880195    
## Residuals           385 1.996e+11 5.186e+08                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Each interaction has a high p-value, which means there is not much variation that can be explained by the interaction between sex, discipline and rank. So, there are no significant interactions.

##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = salary ~ sex + discipline + rank, data = data)
## 
## $sex
##                 diff     lwr   upr     p adj
## Male-Female 14088.01 6582.02 21594 0.0002559
## 
## $discipline
##         diff      lwr      upr    p adj
## B-A 9448.914 4963.365 13934.46 4.23e-05
## 
## $rank
##                        diff       lwr      upr     p adj
## AssocProf-AsstProf 13443.16  4132.913 22753.40 0.0021636
## Prof-AsstProf      45910.92 38629.823 53192.01 0.0000000
## Prof-AssocProf     32467.76 25051.605 39883.92 0.0000000

From the post-hoc test results, we see that there are statistically significant differences (p < 0.05) between sex group Male-Female, between discipline group B-A and between rank groups AsspcProf-AsstProf, Prof-AsstProf, Prof-AssocProf. So, basically between each group.

Can years since doctorate (yrs.since.phd), length of service (yrs.service) be significant as covariates?

##                Df    Sum Sq   Mean Sq F value   Pr(>F)    
## sex             1 6.980e+09 6.980e+09  13.740  0.00024 ***
## discipline      1 8.792e+09 8.792e+09  17.308 3.91e-05 ***
## rank            2 1.466e+11 7.329e+10 144.278  < 2e-16 ***
## yrs.since.phd   1 1.185e+08 1.185e+08   0.233  0.62935    
## yrs.service     1 2.710e+09 2.710e+09   5.335  0.02143 *  
## Residuals     390 1.981e+11 5.080e+08                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Years since doctorate is not significant as covariate but length of service is (0.02143 < 0.05).

Is there any significant difference in years since PhD (yrs.since.phd) and seniority (yrs.service) of different rank professors?

##            Df  Pillai approx F num Df den Df    Pr(>F)    
## rank        2 0.49855   65.414      4    788 < 2.2e-16 ***
## Residuals 394                                             
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##  Response yrs.since.phd :
##              Df Sum Sq Mean Sq F value    Pr(>F)    
## rank          2  32390 16194.8  191.18 < 2.2e-16 ***
## Residuals   394  33376    84.7                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response yrs.service :
##              Df Sum Sq Mean Sq F value    Pr(>F)    
## rank          2  24812   12406   115.9 < 2.2e-16 ***
## Residuals   394  42175     107                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

There is significant difference in both years since PhD (2.2e-16 < 0.05) and seniority (2.2e-16 < 0.05) of different rank professors.