[R] trying to understand lme() results

array chip arrayprofile at yahoo.com
Wed Mar 31 23:31:38 CEST 2010


Hi, I have very simple balanced randomized block design where I total have 48 observations of a measure of weights of a product, the product was manufactured at 4 sites, so each site has 12 observations. I want to use lme() from nlme package to estimate the standard error of the product weight.

So the data look like:

      MW site
1  54031    1
2  55286    1
3  54396    2
4  52327    2
5  55963    3
6  54893    3
7  57338    4
8  55597    4
:
:
:

The random effect model is: Y = mu + b + e where b is random block effect and e is model error.

so I fitted a lme model as:

obj<-lme(MW~1, random=~1|site, data=dat)

summary(obj)
Linear mixed-effects model fit by REML
Random effects:
 Formula: ~1 | site
        (Intercept) Residual
StdDev:    2064.006 1117.567

Fixed effects: MW ~ 1 
               Value Std.Error DF  t-value p-value
(Intercept) 55901.31  1044.534 44 53.51796       0
:
:
Number of Observations: 48
Number of Groups: 4 

I also did:
anova(obj)
            numDF denDF  F-value p-value
(Intercept)     1    44 2864.173  <.0001

I believe my standard error estimate is from "Residual" under "Random Effects" part of summary(), which is 1117.567. 

Now my question is regarding t test under "Fixed effects". I think it's testing whether the over mean weight is 0 or not, which is not interesting anyway. But how the standard error of 1044.534 is calculated? I thought it should be sqrt(MSE)=1117.567 instead. anyone can explain?

Same goes to the F test using anova(obj). The F test statistic is equal to square of the t test statistic because of 1 df of numerator. But what's the mean sum of squares of numerator and denominator, where to find them? BTW, I think denominator mean sum of squares (MSE) should be 1117.567^2, but this is not consistent to the standard error in the t test (1044.534).

Thanks a lot for any help

John



More information about the R-help mailing list