[R-sig-ME] error: model is nearly unidentifiable

Fox, John jfox at mcmaster.ca
Mon Apr 9 16:14:26 CEST 2018


Dear Ligia,

Without your data, and therefore without a reproducible example, one can only speculate about the source of the problem. I noticed, however, that your response variable (choice) has equal numbers of 0s and 1s -- 24 of each. Was that simply a coincidence? As well, the response is named "choice" in the earlier part of your message and model "null," but "Fchoice" in model "m1." Why?

More generally, the question mark in "Rescale variables?" indicates that this is a common source of numerical instability but not the only one. For example, highly collinear predictors could also produce a nearly unidentified model. What's curious is that you're observing this problem in a model with only an intercept. Perhaps, e.g., choice is invariant within frogs.

Reading the posting guide at <https://www.r-project.org/posting-guide.html> might help you to formulate your question more effectively.

I hope this helps,
 John

-----------------------------
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web: socialsciences.mcmaster.ca/jfox/



> -----Original Message-----
> From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-project.org]
> On Behalf Of Ligia Pizzatto do Prado
> Sent: Monday, April 9, 2018 2:14 AM
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] error: model is nearly unidentifiable
> 
> Hi there, I'm new to mixed models but have ran a few with success before. Now,
> while trying to analyse this new experiment I am  having an error that I quite
> don't understand...
> 
> 
> The experiment is a two choice habitat ("choice": poor [0] vs rich [1]) for frogs
> under two-state treatments, lets say F and C. Then I have as potential variables
> frog size ("size"), air temperature ("temp"), humidity ("hum") and date of
> experiment (recorded as continuos variable starting at day 1...). This is a
> repeated measure design as frogs were tested both in F and C trials (thus id is my
> random effect). I want to know if the choice is affected by treat, but also
> considering size, temp, humidity, and date in my model.
> 
> 
> First I did:
> 
> 
> data$treat<- factor(data$treat)
> 
> data$id<- factor(data$id)
> 
> data$choice<- factor(data$choice)
> 
> 
> summary(data)
> 
> treat        id     choice
> 
> C:24   1      : 2   0:24
> 
> F:24   2      : 2   1:24
> 
>            3      : 2
> 
>            4      : 2
> 
>            5      : 2
> 
>            6      : 2
> 
>       (Other):36
> 
> 
> 
> size                     temp                      hum                   date
> 
>  Min.   :35.70      Min.   :24.80       Min.   :53.00       Min.   : 1.00
> 
>  1st Qu.:38.25     1st Qu.:26.30     1st Qu.:58.50     1st Qu.: 4.00
> 
>  Median :42.40   Median :27.30   Median :63.00   Median : 9.00
> 
>  Mean   :42.02    Mean   :26.74     Mean   :63.65    Mean   :10.75
> 
>  3rd Qu.:44.27    3rd Qu.:27.40     3rd Qu.:70.50    3rd Qu.:16.75
> 
>  Max.   :51.00      Max.   :27.90     Max.   :76.00       Max.   :24.00
> 
> m1<- glmer(Fchoice ~ treat + SUL + temp + hum + date + (1|id), data = data,
> family = binomial)
> 
> Warning message:
> In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
>   Model is nearly unidentifiable: large eigenvalue ratio
>  - Rescale variables?
> 
> 
> I keep getting this message in all models except when I exclude both temp and
> hum, but I also get the message when tried null model: null<- glmer(choice ~ 1 +
> (1|id), data = data, family = binomial)
> 
> 
> I tried to transform/re-scale all continuous variable (temp, hum, date) and
> nothing changed, and I quite don't understand why the error also appears in the
> null model, given id is a factor... If its a scale problem wouldn't this only appear
> in the continuous variables?
> 
> 
> Can anyone provide some guidance here, please?
> 
> 
> TIA,
> 
> 
> Ligia
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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