Displaying 1 result from an estimated 1 matches for "uncgrowthmodel".
Did you mean:
uncgrowthmodel2
2010 Sep 30
0
Problem comparing lme objects with anova using do.call
...ack about what was wrong, at least
to my ignorant eye.
Here is a simple reproducible example:
library(nlme)
dataTest <- data.frame(y=c(rnorm(100, 0, 1), rnorm(100,5,1)), time=rep(0:3,
each=50), id=rep(1:50, 4))
uncMeansModel <- lme(y ~ 1, data=dataTest, random=~1|id, method="ML")
uncGrowthModel <- lme(y ~ 1 + time, data=dataTest, random=~time|id,
method="ML")
uncGrowthModel2 <- lme(y ~ 1 + time + I(time^2), data=dataTest,
random=~time|id, method="ML")
models <- list(uncMeansModel, uncGrowthModel, uncGrowthModel2)
do.call("anova.lme", models) #doesn...