[R-sig-ME] declaring the variables

Petar Milin pmilin at ff.uns.ac.rs
Wed Nov 17 09:25:35 CET 2010

Sorry, again, mail went before I concluded.
As to second part:
> fish<- glm(Catch ~ Angler +Season + Tide, family=gaussian(identity),
> data=fishcatch)
> However, how do declare the types of variables used in the model?  For
> example, how do I declare that the angler variable is a random factor?
Then, you should use something like:

fish <- lmer(Catch ~ Season + Tide + (1|Angler), data=fishcatch)

In lmer(), Gaussian is the default and linear mixed-model is fit, but 
you can also use 'binomial', 'poisson' etc, and then generalized linear 
mixed-model is fit.


More information about the R-sig-mixed-models mailing list