[R] A question on REML in R

Shuangshuang Jin ^_^ charmyss at hotmail.com
Thu Jan 4 23:06:40 CET 2007


Hello, everyone, I'm using R to deal with a REML problem. I found "lmer" is 
the right function for this. But I got stuck because I couldn't interpret 
the result. I'm attaching a short example of my executing log. Please have a 
look and give me some advice on it. Thanks a lot!

  Plot  Block   Treatment   Data
    1     1        2         7.8
    2     1        1         5.9
    3     1        3        10.3
    4     2        3        10.9
    5     2        2         8.9
    6     2        1         7.2
    7     3        2        11.1
    8     3        3        12.8
    9     3        1         9.1
   10     4        1         9.8
   11     4        2        12.2
   12     4        3        14.0

>anova(lm(Data~as.factor(Treatment)+as.factor(Block)))
Analysis of Variance Table

Response: Data
                     Df Sum Sq Mean Sq F value    Pr(>F)
as.factor(Treatment)  2 32.000  16.000  282.35 1.162e-06 ***
as.factor(Block)      3 30.000  10.000  176.47 3.066e-06 ***
Residuals             6  0.340   0.057
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

>lmer(Data~Treatment+(Treatment|Block))
Linear mixed-effects model fit by REML
Formula: Data ~ Treatment + (Treatment | Block)
   AIC  BIC logLik MLdeviance REMLdeviance
28.68 31.1 -9.339      16.88        18.68
Random effects:
Groups   Name        Variance   Std.Dev.   Corr
Block    (Intercept) 3.3116e+00 1.8198e+00
          Treatment   2.4303e-11 4.9298e-06 0.000
Residual             4.8606e-02 2.2047e-01
number of obs: 12, groups: Block, 4

Fixed effects:
            Estimate Std. Error t value
(Intercept)  6.00000    0.92533   6.484
Treatment    2.00000    0.07795  25.658

Correlation of Fixed Effects:
          (Intr)
Treatment -0.168
Warning message:
Estimated variance-covariance for factor 'Block' is singular
in: `LMEoptimize<-`(`*tmp*`, value = list(maxIter = 200, tolerance = 
1.49011611938477e-08,

Charmy

_________________________________________________________________
Communicate instantly! Use your Hotmail address to sign into Windows Live 
Messenger now. http://get.live.com/messenger/overview



More information about the R-help mailing list