Hi Harold
Thanks for this
I did not know about that function.
I tried the nesting structure you suggested, that is what I normally use
with nlme, but the following happened
> m2<-lmer(y~harn+foodn+(1|ass/pop/fam),family = "quasibinomial")
Error: Matrices must have same number of columns in rbind2(..1, r)
In addition: Warning messages:
1: In pop:ass : numerical expression has 492 elements: only the first
used
2: In pop:ass : numerical expression has 492 elements: only the first
used
3: In fam:(pop:ass) :
numerical expression has 492 elements: only the first used
4: In pop:ass : numerical expression has 492 elements: only the first
used
5: In pop:ass : numerical expression has 492 elements: only the first
used
I found the other method online and it worked, so I accept that I do not
actually know whether it is the correct model at present
Any ideas about the error messages above?
The extractor function for the fixed effects is fixef(), not coef(). Out
of curiosity, why are you using (1|ass%in%pop%in%fam)? This notation is
non-standard and does not define the nesting structure of the data.
I think you want (1|ass/pop/fam)
> -----Original Message-----
> From: r-help-bounces@r-project.org
> [mailto:r-help-bounces@r-project.org] On Behalf Of Tom Cameron
> Sent: Friday, August 08, 2008 11:47 AM
> To: r-help@r-project.org; r-sig-mixed-models@r-project.org
> Subject: [R] [lme4]Coef output with binomial lmer
>
> Dear R users
>
> I have built the following model
>
> m1<-lmer(y~harn+foodn+(1|ass%in%pop%in%fam),family = "quasibinomial")
>
> where y<-cbind(alive,dead)
>
> where harn and foodn are categorical factors and the random
> effect is a nested term to represent experimental structure
> e.g. Day/Block/Replicate ass= 5 level factor, pop= 2
> populations per treatment factor in each assay, 7 reps per population
>
> The model can be family = quasibinomial or binomial
>
> My complete lack of understanding is in retrieving the
> coefficients for the fixed effects to back-transform the
> effects of my factors on proportional survival
>
> I get the following output:
> > coef(m1)
> $`ass %in% pop %in% fam`
> (Intercept) harn1 harn2 foodn2
> FALSE 1.0322375 -0.1939521 0.0310434 0.810084
> TRUE 0.5997679 -0.1939521 0.0310434 0.810084
>
> Where FALSE and TRUE refer to some attribute of the random effect
>
> My hunch is that it refers to the Coefficients with (=TRUE)
> and without
> (=FALSE) the random effects?
>
> Any help appreciated
>
>
> ..............................................................
> ..........
> ............
> Dr Tom C Cameron
> Genetics, Ecology and Evolution
> IICB, University of Leeds
> Leeds, UK
> Office: +44 (0)113 343 2837
> Lab: +44 (0)113 343 2854
> Fax: +44 (0)113 343 2835
>
>
> Email: t.c.cameron@leeds.ac.uk
> Webpage: click here
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]