Skip to content
Back to formatted view

Raw Message

Message-ID: <40e66e0b0903140604q6a16aaqf11a685b72c5713a@mail.gmail.com>
Date: 2009-03-14T13:04:30Z
From: Douglas Bates
Subject: Mixed model help!
In-Reply-To: <000601c9a413$78cf8690$6a6e93b0$@com.ar>

On Fri, Mar 13, 2009 at 2:39 PM, Mart?n Quiroga <mquiroga at ssdfe.com.ar> wrote:
> Hi everyone! I am a biologist from Argentina and have to solve this problem.
> I have an insect population obtained from 10 different nests and need to
> know its sex ratio. But as I cannot ensure insects independence I need to
> run a model where I can include the variable ?nest? as with a random effect.
> The response variable has a binomial distribution (males or females).
> I?ve been reading for a while and found the MASS and lmer packages that will
> allow me to do such a thing with my data. I found the script I should write
> ?lmer(y~fixed+(time | random), family=binomial)? but, despite of using the R
> commander cannot make it work. Can you help me with this? I?ll appreciate
> that!

The package is called lme4 and the function is called lmer.   To be
able to use the lmer function you must first enter

library(lme4)

in a script or console session (I'm not sure how this would be done in
R Commander).

There is a mailing list, R-SIG-Mixed-Models at R-project.org specifically
for discussion of mixed models.  I am cc:ing that list on this reply.