[R-sig-ME] "lack of fit" computation from LME model?
Andrew Robinson
A.Robinson at ms.unimelb.edu.au
Wed Sep 28 00:42:39 CEST 2011
Hi Lauren,
one way to approach the problem would be to fit a model with the
nitrogen variable discretized, and compare that with the current model
(both fit with ML, not ReML) using anova. That's a lack-of-fit test.
So, approximately,
m1 <- lme(plantgrowth ~ nitrogen, random=~1|site, method="ML")
m2 <- lme(plantgrowth ~ factor(nitrogen, ordered=TRUE),
random=~1|site, method="ML")
anova(m1, m2)
An alternative that might be acceptable would be to fit a spline
instead of discretization. That would look something like
library(splines)
m3 <- lme(plantgrowth ~ bs(nitrogen), random=~1|site, method="ML")
anova(m1, m3)
I hope that this helps,
Andrew
On Tue, Sep 27, 2011 at 09:42:57PM +0000, L Quinn wrote:
>
> Dear list,
> I recently submitted a paper in which I analyzed plant growth response to several environmental factors in several sites. I wanted to account for the variation attributable to the different sites, so I made "site" a random effect in a simple LME regression model (e.g. m<-lme(plantgrowth~nitrogen,random=~1|site,method="ML"); library nlme). I had 10 observations in each of 11 sites. Seemed fairly straightforward to me.
> When reviews came back, one reviewer and the editor requested that I compute a "lack of fit" term for my regressions without which they couldn't be confident that linear models were most appropriate for my data. I have not done this before, and I have not seen anything about this for LME models when I have searched. I have only seen it for regular regression tests, but I don't think I can apply what I would find in regular regression tests to this LME model because I would lose the random effect. I know about model checking via diagnostic plots, etc, but I don't think this is what they want. They seem to want me to generate an F statistic and a p value for this "lack of fit" term.
> My questions are:
> 1.) is this even possible/practical within a LME model?
> 2.) if so, what steps should I take to complete this task?3.) if not, can you suggest other diagnostics that might satisfy what they're looking for?
> I have a feeling this is a fairly elementary question/procedure, so I hope I am not wasting anyone's time. Please help if you can. I am happy to provide any more information that may be needed.
> Please reply directly to lquinn at hotmail.com. Thank you in advance!
> Lauren Quinn
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Andrew Robinson
Deputy Director, ACERA
Department of Mathematics and Statistics Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia (prefer email)
http://www.ms.unimelb.edu.au/~andrewpr Fax: +61-3-8344-4599
http://www.acera.unimelb.edu.au/
Forest Analytics with R (Springer, 2011)
http://www.ms.unimelb.edu.au/FAwR/
Introduction to Scientific Programming and Simulation using R (CRC, 2009):
http://www.ms.unimelb.edu.au/spuRs/
More information about the R-sig-mixed-models
mailing list