weihong wrote:
> Can GLMM take formula derived from another object?
> 
> foo <- glm (OVEN ~ h + h2, poisson, dataset)
> 
> # ok
> bar <- GLMM (OVEN ~ h + h2, poisson, dataset, random = list (yr = ~1))
> 
> #error
> bar <- GLMM (foo$formula, poisson, dataset, random = list (yr = ~1))
> #Error in foo$("formula" + yr + 1) : invalid subscript type

That won't work without some tweaking of the GLMM function.  In the
0.95-1 and later versions of the lme4 package the capabilities of GLMM
have been folded in to the lmer function and you would need to fit that
model as

 lmer(OVEN ~ h + h2 + (1|yr), dataset, poisson)

anyway.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to