[R] help structuring mixed model using lmer()
bates at stat.wisc.edu
Tue Mar 10 18:32:13 CET 2009
On Tue, Mar 10, 2009 at 10:15 AM, Simon Pickett <simon.pickett at bto.org> wrote:
> This is partly a statistical question as well as a question about R, but I am stumped!
> I have count data from various sites across years. (Not all of the sites in the study appear in all years). Each site has its own habitat score "habitat" that remains constant across all years.
> I want to know if counts declined faster on sites with high "habitat" scores.
> I can construct a model that tests for the effect of habitat as a main effect, controlling for year
> model1<-lmer(count~habitat+yr+(1|site), family=quasibinomial,data=m)
> model2<-lmer(count~yr+(1|site), family=quasibinomial,data=m)
I'm curious as to why you use the quasibinomial family for count data.
When you say "count data" do you mean just presence/absence or an
actual count of the number present? Generally the binomial and
quasibinomial families are used when you have a binary response, and
the poisson or quasipoisson family are used for responses that are
More information about the R-help