[R-sig-ME] error: model is nearly unidentifiable
David Duffy
David.Duffy at qimrberghofer.edu.au
Tue Apr 17 06:25:52 CEST 2018
> The experiment is a two choice habitat ("Fchoice": poor [0] vs rich
> [1]) for frogs under two-state treatments, lets say F > and C. Then
> I have as potential variables frog size ("SUL"), air temperature
> ("temp"), humidity ("hum") and date of experiment ("dateCont" recorded
> as continuous 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 SUL, temp, humidity, and date in my model.
Should date rather be a factor? That would make the model even harder to fit, as you would
have too few data for the number of coefficients to be estimated.
Since you have exactly 2 obs per ID, then a generalized estimating equation should be pretty close,
and tends to be a bit more stable. We can also check comparing the
glmmML fit - it is set up only for a simple RE model like yours, but the fitter often does a better job for those.
library(gee)
summary(gee(Fchoice ~ treat + SUL + temp + hum + dateCont, id=id, data=x,
corstr="exchangeable", family="binomial"))
library(glmmML)
summary(glmmML(Fchoice ~ treat + SUL + temp + hum + dateCont, cluster=id, data=x, family="binomial"))
GEE (exchangeable r=0.08) glmmML glmer
Estimate Robust S.E. Robust z coef se(coef) z Estimate Std. Error z value
(Intercept) -0.88719918 10.40645085 -0.08525473 -1.13855 11.88440 -0.0958 -1.14557 11.89332 -0.096
treatF -1.15044245 0.64272611 -1.78994198 -1.21411 0.70458 -1.7232 -1.21572 0.70451 -1.726
SUL -0.10705958 0.07911966 -1.35313499 -0.11373 0.09252 -1.2293 -0.11384 0.09255 -1.230
temp 0.25765994 0.35199301 0.73200300 0.28526 0.41123 0.6937 0.28591 0.41136 0.695
hum -0.01921368 0.03913854 -0.49091468 -0.02243 0.04662 -0.4812 -0.02252 0.04665 -0.483
dateCont 0.02696366 0.04181628 0.64481255 0.02962 0.05015 0.5905 0.02965 0.05020 0.591
Looks like glmer has found a solution close to that accepted by the other approaches. To me, suggests that glmer has worked OK.
More information about the R-sig-mixed-models
mailing list