1

I read that lmer can handle independent (often labeled as crossed) random effects in mixed models. It seems to be possible with MCMCglmm as long as groups for the random effects are uniquely labeled. I use the "Penicillin" data in the lme4-package to compare both approaches:

library(lme4)
library(MCMCglmm)
str(Penicillin)
attach(Penicillin)
ml <- lmer(diameter~ 1 + (1|plate)+ (1|sample))
summary(ml)
mcmc <- MCMCglmm(diameter~ 1, random=~ plate + sample,verbose=F, nitt=110000,burn=10000,thin=10,data=Penicillin)
summary(mcmc)

Why are the result for the plate-variance differ by a large amount? Is it because MCMCglmm applies Gibbs sampling? Or is MCMCglmm doing something else here, instead of fitting independent random effects?

usεr11852
  • 33,608
  • 2
  • 75
  • 117
user35425
  • 171
  • 8
  • Are you sure you are asking for the `plate` and not the `sample`? In any case I think you want to check `plot(density((mcmc$VCV[,"sample"]))` for excessive skewness; maybe the median will do a better job. Check this link too: http://stats.stackexchange.com/questions/126122/what-is-going-on-in-an-mcmc-chain/126137#126137 for information on the MCMC part of `MCMCglmm`. – usεr11852 Jan 20 '15 at 12:34

0 Answers0