[R] Help

Bert Gunter gunter.berton at gene.com
Sat Nov 16 16:28:36 CET 2013


Sorry to do this to you, but questions about mixed models(especially
lmer) are better handled on the mixed models list, r-sig-mixed-models
. So subscribe and post this there.

Cheers,
Bert

On Fri, Nov 15, 2013 at 3:30 PM, Dalal Hanna <dalal.e.hanna at gmail.com> wrote:
> Hi,
>
> I tried to post the below message and it was rejected because I hadn't yet
> received my subscription to the group.
>
> Can it be posted now?
>
> Cheers,
> Thanks very much for all your dedication to this project!
> Dalal
>
>
> MESSAGE I ATTEMPTED TO POST BELOW
>
> I am trying to code the following idea using lmer (package lme4) and
> running into problems. I am also unsure that I am coding this properly and
> wanted to double check, as there are not enough people in my entourage that
> can do this for me.
>
> For individual fish i of species j in lake k,
> Hgijk ~ b0j[i] + b1k[i] + b2j[i]*lengthi + ei
> ei ~ N(0,s2e)
> b0j ~ N(mb0,s2b0)
> b1k ~ go + g1*chlorophyll-ak + eb1
> eb1 ~ N(0,s2b1)
> b2j ~ N(mb2,s2b2)
>
> This model says that the Hg for fish i of species j from lake k is a
> function of the species, the lake, and the length of the fish. The species
> effects are like intercepts – the average Hg for a particular species at
> average length (if the length data are centered) in an average lake – and
> they come from a normal distribution. The lake effect is itself a linear
> function of chlorophyll concentration, so that lakes with higher
> chlorophyll can potentially have higher or lower average Hg concentrations.
> The length effects vary by species, on the assumption that Hg concentration
> may change with size differently in different species (which is the case in
> the systems I am working in). These length effects come from a normal
> distribution.
>
> *Problems:*
> 1. My original idea was to code this as such:
>
> M.A4<-lmer(LogTHg~ Chlorophyll + Length+ (1 + Length|SpeciesCode)
> +(1|Location), data=mercury.subset)
>
> -Does this function really represent the ideas I explained above?  I am not
> sure if Length is supposed to be included in 2 places as it is here
> -When I run this model, the se.ceof() of Length always comes out to 0,
> which doesn't really make sense.  Any ideas why this might be happening?
>
> Thank you very much for taking the time to read this and providing input.
>  I appreciate it.
>
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at 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.
>



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

(650) 467-7374



More information about the R-help mailing list