Here's what I get:

 > summary(lm(yield ~ prevyield + trt + block))

Call:
lm(formula = yield ~ prevyield + trt + block)

Residuals:
    Min      1Q  Median      3Q     Max
-22.616  -9.254   2.051  10.687  19.421

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)  38.5797    26.5447   1.453  0.16816
prevyield    28.4010     3.3840   8.393  7.8e-07 ***
trtB        -13.9099    11.7844  -1.180  0.25752
trtC         -6.4099    11.7844  -0.544  0.59505
trtD          0.6605    11.9128   0.055  0.95657
trtE         20.4409    12.2329   1.671  0.11692
trtO        -29.1408    12.1256  -2.403  0.03068 *
block2        1.6396     9.7127   0.169  0.86836
block3      -22.6886    11.6961  -1.940  0.07282 .
block4       44.7776    12.7351   3.516  0.00342 **
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1

Residual standard error: 16.66 on 14 degrees of freedom
Multiple R-Squared: 0.9461,     Adjusted R-squared: 0.9114
F-statistic: 27.29 on 9 and 14 DF,  p-value: 2.276e-07

What does R consider balanced anyway? I've had data with the same obs 
per trt and R complains about it being unbalanced...

Yeah, the covariate is in bushels and the yield is in pounds... but I 
don't get why the means of the models with and without covariate would 
change. The SE's are another story, but the means?

Thanks

Peter Dalgaard wrote:

>Damián Cirelli <[EMAIL PROTECTED]> writes:
>
>
>>Dear R gurus,
>>I have the following model:
>>
>>appcov.aov <- aov(yield ~ prevyield + trt + block)
>>
>>where prevyield is a continuous numeric covariate and trt and block
>>are factors (yes, I did factor()!)
>>Now, when I do a TukeyHSD, my diff's are all screwed up!
>>For instance:
>>treatment mean for treatmen "E" is 277.25 and for treatment "O" is
>>279.5, so I figure the diff O-E should be 2.25, but TukeyHSD says:
>>
>>          diff         lwr        upr
>>O-E -50.817101 -84.8112057 -16.822996
>>
>>So I wonder where is that -50.8 coming from???
>>
>>Anybody have a clue?
>>
>>Thanks a lot!
>>
>>PS: it works if I take prevyield (the covariate) out of the model, but
>>the point is I need to analyse it with the covariate.
>>Thanks again
>>
>
>If the covariate level differs between the treatment groups, then the
>difference in the covariate-adjusted means could well differ quite a
>bit from the unadjusted difference. What happens if you do
>
>summary(lm(yield ~ prevyield + trt + block))
>
>(Not sure I'm happy about using the HSD procedure with an unbalanced
>design, btw.)
>
>


        [[alternative HTML version deleted]]

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to