Skip to content

lme4 to MCMCglmm

1 message · ronggui

#
Dear all, recently I have been reading on MCMCglmm, trying to fit a
cross-classified mixed model. I believe lme4 and MCMCglmm can fit
similar models (sure, the two packages are different). Here is an
example from mlmRev. As Dave suggested, the article at Journal of
Statistical Software is a good starting point.
Linear mixed model fit by REML
Formula: attain ~ sex + (1 | primary) + (1 | second)
   Data: ScotsSec
   AIC   BIC logLik deviance REMLdev
 17138 17169  -8564    17123   17128
Random effects:
 Groups   Name        Variance Std.Dev.
 primary  (Intercept) 1.10962  1.0534
 second   (Intercept) 0.36966  0.6080
 Residual             8.05511  2.8382
Number of obs: 3435, groups: primary, 148; second, 19

Fixed effects:
            Estimate Std. Error t value
(Intercept)  5.25515    0.18432  28.511
sexF         0.49852    0.09825   5.074

Correlation of Fixed Effects:
     (Intr)
sexF -0.264
Iterations = 3001:12991
 Thinning interval  = 10
 Sample size  = 1000

 DIC: 17024.80

 G-structure:  ~primary

        post.mean l-95% CI u-95% CI eff.samp
primary     1.127   0.7807    1.546      861

               ~second

       post.mean l-95% CI u-95% CI eff.samp
second     0.413   0.0656    0.819     1120

 R-structure:  ~units

      post.mean l-95% CI u-95% CI eff.samp
units     8.068    7.684    8.438     1000

 Location effects: attain ~ sex

            post.mean l-95% CI u-95% CI eff.samp  pMCMC
(Intercept)    5.2624   4.8660   5.5924     1000 <0.001 ***
sexF           0.4961   0.3095   0.6762     1139 <0.001 ***
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1


Regards,
On 13 December 2010 11:03, Jeremy Koster <helixed2 at yahoo.com> wrote: