[R] output from multcomp and lm

Hiroto Miyoshi h_m_ at po.harenet.ne.jp
Tue Feb 3 02:46:41 CET 2004


Dear R-users

I analysed the same data set by two different ways;
analysis of covariance by using lm and anova functions
and multiple comparison by using simtest function in
the multcomp library.

The output from the analysis of covariance is;

>   y<-lm(D~Cond+Q1,data=x)
> anova(y)
Analysis of Variance Table

Response: D
             Df Sum Sq Mean Sq F value    Pr(>F)
Cond        2 1017.8   508.9   4.7548  0.0135041 *
Q1           1 1652.7  1652.7 15.4417  0.0002969 ***
Residuals 44 4709.2   107.0
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1

where Cond is a factor with three levels (A,B,C)
and Q1 is a covariate.



Now, simtest showed the following output

>   o5<-summary(simtest(D~Cond+Q1,conf.level=0.95,data=x,type="Tukey"))
>   o5

  Simultaneous tests: Tukey contrasts

Call:
simtest.formula(formula = D ~ Cond + Q1, data = x, conf.level = 0.95,
    type = "Tukey")

  Tukey contrasts for factor Cond, covariable:  Q1

Contrast matrix:
              CondA CondB CondC
CondB-CondA 0    -1     1     0 0
CondC-CondA 0    -1     0     1 0
CondC-CondB 0     0    -1     1 0


Absolute Error Tolerance:  0.001

Coefficients:
                    Estimate t value Std.Err. p raw  p Bonf  p adj
CondB-CondA    5.555  -1.461    3.802  0.151   0.453   0.319
CondC-CondB   -5.248  -1.365    3.661 0.179   0.453   0.319
CondC-CondA    0.306  -0.084    3.844  0.934   0.934   0.934

The results from two analyses seem so different that I am
wondering why.  I do understand that multiple comparison may
not show any significant difference even when the overall analysis
of (co)variance shows the statistical significance of a factor.

However, in my analysis, overall analysis showed statistical significance of
1.4% level and mutiple comparison showed significance of 32% level
Could this happen? and why?  Please enlighten me.

Sincerely
------------------------
Hiroto Miyoshi
三好弘人
h_m_ at po.harenet.ne.jp




More information about the R-help mailing list