[R] model formulation in lme4
Douglas Bates
bates at stat.wisc.edu
Mon May 15 15:47:30 CEST 2006
When writing a model formula for lmer you need to decide how many
variance components are to be estimated as well as the number of
effects that are to be estimated.
I suspect that you want to have one variance component for the Rack
nested in Site:Depth and one variance component for the Rack:Treatment
interaction nested in Site:Depth, in which case you would write the
model formula as
Y ~ Site * Depth * Treatment + (1|Site:Depth:Rack) +
(1|Site:Depth:Rack:Treatment)
On 5/15/06, François MICHONNEAU <francois.michonneau at gmail.com> wrote:
> Hello,
>
> Before to post my message I tried to find the solution by myself but none of the example I
> found match with my problem. It is possible that I did not use the appropriate keywords...
>
> I am trying to analyze results of an experiment took place at 9 stations. A station is
> defined by a combination of Site and Depth (it was an underwater experiment). At each
> station, there was 4 racks. For each rack, 2 treatments were applied on 3 replicates.
> Thus, I would like to fit this model:
>
> Y ~ Site * Depth * Treatment + Site:Depth:Rack + Site:Depth:Rack:Treatment
>
> with Site, Depth and Treatment as fixed factors and Rack as a random factor nested in the
> interaction Site:Depth.
>
> I tried to use lme4 to fit my model. My first trial was (naïvely?):
> mdl <- lmer(Y ~ Site * Depth * Treatment + ((Site:Depth)|Rack), abdce.total)
>
> But I obtain a warning message:
> "Warning message:
> nlminb returned message false convergence (8)
> in: "LMEoptimize<-"(`*tmp*`, value = list(maxIter = 200, tolerance =
> 1.49011611938477e-08, "
>
> Is this message tied to my formula or my data?
> Does my formula match with what I would like to do?
>
> Thanks for your help,
>
>
> François
>
> PS:
> > R.Version()$version.string
> [1] "Version 2.3.0 (2006-04-24)"
>
> lme4 0.995-2
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list