Hello. I am trying to determine whether I should be using ML or REML methods to estimate a linear mixed model. In the book by Pinheiro & Bates (Mixed-effects models in S and S-PLUS, page 76) they state that one difference between REML and ML is that « LME models with different fixed-effects structures fit using REML cannot be compared on the basis of their restricted likelihoods. In particular, likelihood ratio tests are not valid under these circumstances.” I am not sure what “fixed-effects structures” means. Does it mean that, as long as the types of contrasts are the same between two models, they ARE comparable, but are NOT comparable if the types of contrasts are changes? Or rather, does it simply mean that one should use t or F tests for the fixed effects, and restrict the likelihood ratio tests to the random effects only if using REML? Bill Shipley Associate Editor, Ecology North American Editor, Annals of Botany Département de biologie, Université de Sherbrooke, Sherbrooke (Québec) J1K 2R1 CANADA Bill.Shipley@USherbrooke.ca <http://callisto.si.usherb.ca:8080/bshipley/> http://callisto.si.usherb.ca:8080/bshipley/ [[alternative HTML version deleted]]
Dear Bill, I am not a lme-expert, but I believe the Pinheiro&Bates' book is rather clear here. However you know that a lme model is, for instance fixed= y~x1+x2 and random=y~x1|group and you can fit it by ML or REML. If you are interested in testing for x2 by means the LRT (namely by comparing the models with and without x2) you have to fit them by ML. hope this helps, best, vito ----- Original Message ----- From: Bill Shipley <bill.shipley at usherbrooke.ca> To: R help list <r-help at stat.math.ethz.ch> Sent: Tuesday, November 04, 2003 4:42 PM Subject: [R] help with lme() Hello. I am trying to determine whether I should be using ML or REML methods to estimate a linear mixed model. In the book by Pinheiro & Bates (Mixed-effects models in S and S-PLUS, page 76) they state that one difference between REML and ML is that ? LME models with different fixed-effects structures fit using REML cannot be compared on the basis of their restricted likelihoods. In particular, likelihood ratio tests are not valid under these circumstances." I am not sure what "fixed-effects structures" means. Does it mean that, as long as the types of contrasts are the same between two models, they ARE comparable, but are NOT comparable if the types of contrasts are changes? Or rather, does it simply mean that one should use t or F tests for the fixed effects, and restrict the likelihood ratio tests to the random effects only if using REML? Bill Shipley Associate Editor, Ecology North American Editor, Annals of Botany D?partement de biologie, Universit? de Sherbrooke, Sherbrooke (Qu?bec) J1K 2R1 CANADA Bill.Shipley at USherbrooke.ca <http://callisto.si.usherb.ca:8080/bshipley/> http://callisto.si.usherb.ca:8080/bshipley/ [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
"Bill Shipley" <bill.shipley at usherbrooke.ca> writes:> Hello. I am trying to determine whether I should be using ML or REML > methods to estimate a linear mixed model. In the book by Pinheiro & > Bates (Mixed-effects models in S and S-PLUS, page 76) they state that > one difference between REML and ML is that "LME models with different > fixed-effects structures fit using REML cannot be compared on the basis > of their restricted likelihoods. In particular, likelihood ratio tests > are not valid under these circumstances." > > I am not sure what "fixed-effects structures" means. Does it mean > that, as long as the types of contrasts are the same between two > models, they ARE comparable, but are NOT comparable if the types of > contrasts are changes?It means that you would need exactly the same model matrix for the fixed effects in the two fitted models being compared. That is, you need the same terms and the same contrasts. In the REML criterion there is a term involving the determinant of a matrix derived from the fixed-effects model matrix. If you change anything about the model matrix (except possibly for the order of the columns) you will change this determinant and induce a systematic change in the "log-likelihood" (actually the log-restricted-likelihood) that is not based on the quality of the fit. With REML you could fit exactly the same model under two different parameterizations of the fixed effects and get different "log-likelihoods". It would be meaningless to conduct a likelihood ratio test in such circumstances. It is possible to obtain fits based on REML but then compare log-likelihoods, not log-restricted-likelihoods. Greg Reinsel has done some work on this, with favorable results. It is a bit curious because you don't use the criterion that you actually optimize but it is effective. My memory is a bit foggy on the details and I don't have time to grep through the code right now but I think that this may be what is done in the anova method for lme models.> Or rather, does it simply mean that one should use t or F tests for > the fixed effects, and restrict the likelihood ratio tests to the > random effects only if using REML?I think I would agree although it is not clear to me how to parse the last part of that sentence. If it could be rewritten as "... does it simply mean that, if using REML, one should ... to the random effects only." then I agree.
As far as I understand it, the problem is that REML accounts for the degrees of freedom used up by fixed effects (e.g., treatments), whereas ML does not account for these. From that perspective, REML appears to be the "better" fitting method. However, if you test for a fixed effect by comparing two models, one including the fixed effect and one lacking it but otherwise identical, then the model comparison anova(model1,model2) is invalid when you use REML (because there is a different number of df consumed by the fixed effects in model1 and model2), but it is valid if you use ML (because it does not account for the df used up by the fixed effects at all). Pascal Bill Shipley wrote:>Hello. I am trying to determine whether I should be using ML or REML >methods to estimate a linear mixed model. In the book by Pinheiro & >Bates (Mixed-effects models in S and S-PLUS, page 76) they state that >one difference between REML and ML is that ? LME models with different >fixed-effects structures fit using REML cannot be compared on the basis >of their restricted likelihoods. In particular, likelihood ratio tests >are not valid under these circumstances.? > >I am not sure what ?fixed-effects structures? means. Does it mean that, >as long as the types of contrasts are the same between two models, they >ARE comparable, but are NOT comparable if the types of contrasts are >changes? Or rather, does it simply mean that one should use t or F >tests for the fixed effects, and restrict the likelihood ratio tests to >the random effects only if using REML? > > > >Bill Shipley > >Associate Editor, Ecology > >North American Editor, Annals of Botany > >D?partement de biologie, Universit? de Sherbrooke, > >Sherbrooke (Qu?bec) J1K 2R1 CANADA > >Bill.Shipley at USherbrooke.ca > > <http://callisto.si.usherb.ca:8080/bshipley/> >http://callisto.si.usherb.ca:8080/bshipley/ > > > > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help > >