[R-sig-ME] Singular convergence in lmer

Luca Borger lborger at cebc.cnrs.fr
Mon Oct 3 15:05:14 CEST 2011


Hello,

>  others have suggested that the number of levels shouldn't influence whether a factor is fixed or random.

The advice is a pragmatic one, in order to avoid numerical estimation problems - in case this has not already been suggested to you, a good discussion/collection of opinions has been assembled by Ben Bolker (see under 'Should I treat factor xxx as fixed or random?'):

http://glmm.wikidot.com/faq


Cheers,

Luca



-------------------------------------------
Luca Borger
Postdoctoral Research Fellow
CNRS - Centre d'Etudes Biologiques de Chizé
Villiers-en-Bois
79360 Beauvoir-sur-Niort
France

Tel: +33 (0)549 09 96 13
Fax: +33 (0)549 09 65 26

email: lborger at cebc.cnrs.fr
http://www.researcherid.com/rid/C-6003-2008
http://cnrs.academia.edu/LucaBorger
-------------------------------------------


Le 03/10/2011 14:46, Benjamin J. Ciotti a écrit :
> Dear Thierry,
>
> Thank you for your response. If you look carefully at the data structure and
> M1, fish is in fact a random effect (residual error variance) in the
> original model. I considered including year as a fixed effect for the reason
> you mentioned, but others have suggested that the number of levels shouldn't
> influence whether a factor is fixed or random. Maybe I should reconsider?
> Site actually has 7 levels in the 'real' dataset - enough to estimate
> variance according to Zuur et al.'s criteria.
>
> Thanks again for your input.
>
> Ben
>
> -----Original Message-----
> From: ONKELINX, Thierry [mailto:Thierry.ONKELINX at inbo.be]
> Sent: Monday, October 03, 2011 5:52 AM
> To: Benjamin J. Ciotti; r-sig-mixed-models at r-project.org
> Subject: RE: [R-sig-ME] Singular convergence in lmer
>
> Dear Benjamin,
>
> I think you will need to do some reading on mixed models. I would suggest
> Zuur et al (2009)
>
> @BOOK{
>    title = {Mixed Effects Models and Extensions in Ecology with R},
>    publisher = {Springer New York},
>    year = {2009},
>    author = {Zuur, Alain F. and Ieno, Elena N. and Walker, Neil J. and
> Saveliev,
> 	Anatoly A. and Smith, Graham M.},
>    doi = {10.1007/978-0-387-87458-6},
> }
>
> I would expect to see fish as a random effect in your model. Further you
> have too few levels of year and site to get a reliable estimate of the
> variance. Hence a more sensible model would be something like:
>
> lmer(G~ Day * Year * Site + (1|Fish),REML=TRUE,data=GData)
>
> Best regards,
>
> Thierry
>
>
>> -----Oorspronkelijk bericht-----
>> Van: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-
>> bounces at r-project.org] Namens Benjamin J. Ciotti
>> Verzonden: maandag 3 oktober 2011 1:02
>> Aan: r-sig-mixed-models at r-project.org
>> Onderwerp: [R-sig-ME] Singular convergence in lmer
>>
>> #Dear All,
>>
>>
>>
>> #I have measured growth rate (G, response variable) in 10 individual fish
>> (Fish) on 5 dates (Days, fixed covariate) at 4 sites (Site) in each of 2
> years (Year).
>> #An example data set, using random numbers for the response, is GData, as
>> follows:
>>
>>
>>
>> set.seed(14)
>>
>> Year<-as.factor(sort(rep(c(2005,2007),400)))
>>
>> Site<-as.factor(rep(sort(rep(c("a","b","c","d"),50)),4))
>>
>> Year.Site<-as.factor(paste(Year,Site,sep="."))
>>
>> Day<-as.numeric(rep(sort(rep(c(1,15,30,45,60),10)),16))
>>
>> Fish<-as.factor(rep(seq(1,10),80))
>>
>> G<-rnorm(800,0.05,0.025)
>>
>> GData<-data.frame(Year,Site,Year.Site,Day,Fish,G)
>>
>> #I am modelling the temporal trend in growth rate as a linear function of
> Day,
>> the slope and intercept of which can vary as a random function of Year,
> Site and
>> Year.Site.
>>
>> library(lme4)
>>
>> M1<-
>> lmer(G~Day+(1|Year)+(1|Site)+(0+Day|Year)+(1|Year.Site)+(0+Day|Site)+(0+
>> Day|Year.Site),REML=TRUE,data=GData)
>>
>>
>>
>> #You will note that there is singular convergence (with this, but not all,
> random
>> number seeds).
>>
>> #Does this necessarily mean that there is a fundamental flaw in the model
>> design, or does it just mean that with this data set, a simpler model is
> necessary?
>>
>>
>> #In the real data set, all random terms except Year.Site and the
> interaction
>> between Day and Year.Site can be dropped without substantial changes in
> AIC.
>> #I therefore conclude that the following model is sufficient to describe
> the
>> spatial and temporal growth variation:
>>
>> M2<-lmer(G~Day+(1|Year.Site)+(0+Day|Year.Site),REML=TRUE,data=GData)
>>
>>
>>
>> #My question is whether the initially model is fundamentally flawed, or
> whether
>> it just needs to be simplified?
>>
>> #For example, is it valid to compare the full model with simpler models,
> even
>> though it converged to singularity?
>>
>>
>>
>> #Any advice would be greatly appreciated.
>>
>>
>>
>> Benjamin J. Ciotti
>>
>> University of Delaware
>>
>>
>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> __________ Information from ESET Mail Security, version of virus signature database 6512 (20111003) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>
>
>
>



__________ Information from ESET Mail Security, version of virus signature database 6512 (20111003) __________

The message was checked by ESET Mail Security.
http://www.eset.com




More information about the R-sig-mixed-models mailing list