I am trying to run a GLMM on some binomial data. My fixed factors include 2 dichotomous variables, day, and distance. When I run the model: modelA<-glmmPQL(Leaving~Trial*Day*Dist,random=~1|Indiv,family="binomial") I get the error: iteration 1 Error in MEEM(object, conLin, control$niterEM) : Singularity in backsolve at level 0, block 1>From looking at previous help topics,(http://tolstoy.newcastle.edu.au/R/help/02a/4473.html) I gather this is because of the dichotomous predictor variables - what approach should I take to avoid this problem? Thanks, Elva. _________________________________________________________________ Got a favourite clothes shop, bar or restaurant? Share your local knowledge
lorenz.gygax at art.admin.ch
2007-Aug-10 10:55 UTC
[R] GLMM: MEEM error due to dichotomous variables
> I am trying to run a GLMM on some binomial data. My fixed > factors include 2 > dichotomous variables, day, and distance. When I run the model: > > modelA<-glmmPQL(Leaving~Trial*Day*Dist,random=~1|Indiv,family>"binomial") > > I get the error: > > iteration 1 > Error in MEEM(object, conLin, control$niterEM) : > Singularity in backsolve at level 0, block 1 > > >From looking at previous help topics,( > http://tolstoy.newcastle.edu.au/R/help/02a/4473.html) > I gather this is because of the dichotomous predictor > variables - what approach should I take to avoid this problem?Are you sure? I have never had problems including factors in a glmmPQL so far. More likely, the combination of your explanatory variables leads to a fragmentation in your response such that each combination of your factor levels only contain 0s or 1s. Thus, your model is 'too good' (it has too many predictors given the amount of data). Try e.g. to fit a model without the interactions. Cheers, Lorenz - Lorenz Gygax Centre for proper housing of ruminants and pigs Agroscope Reckenholz-T?nikon Research Station ART T?nikon, CH-8356 Ettenhausen / Switzerland
At 14:31 07/08/2007, Elva Robinson wrote:>I am trying to run a GLMM on some binomial data. My fixed factors >include 2 dichotomous variables, day, and distance. When I run the model: > >modelA<-glmmPQL(Leaving~Trial*Day*Dist,random=~1|Indiv,family="binomial") > >I get the error: > >iteration 1 >Error in MEEM(object, conLin, control$niterEM) : > Singularity in backsolve at level 0, block 1 > > From looking at previous help topics,( > http://tolstoy.newcastle.edu.au/R/help/02a/4473.html) >I gather this is because of the dichotomous predictor variables - >what approach should I take to avoid this problem?I seem to remember a similar error message (although possibly not from glmmPQL). Does every combination of Trial * Day * Dist occur in your dataset? You would find it easier to read your code if you used your space bar. Computer storage is cheap.>Thanks, Elva. > >_________________________________________________________________ >Got a favourite clothes shop, bar or restaurant? Share your local knowledge > >Michael Dewey http://www.aghmed.fsnet.co.uk