[R-sig-ME] glmer: Downdated X'X is not positive definite
Ben Bolker
bbolker at gmail.com
Sat Feb 23 18:04:54 CET 2013
Ross Boylan <ross at ...> writes:
>
> > r2 <- glmer(sa~(1|id), data=sexpartner, family=poisson(), nAGQ=6)
> Error in mer_finalize(ans) : Downdated X'X is not positive definite, 1.
> Running a closely related (specifically, the outcome variables match on
> missings)
> > r <- glmer(pAnyUAVI~pIsMale+pEthnic+(1|studyidx), data=sexpartner,
> family=binomial, nAGQ=6)
> produces no error.
>
> I trimmed the covariates until only the intercept was left. I used id
> <- factor(studyidx) in case the fact that studyidx was a character was a
> problem (the archive had a statement that it needed to be a factor).
> The original count data had a minimum of 1; sa was the count -1 so that
> it would look more as expected. At every step along the way I got the
> same error.
>
> My searches suggested the message usually indicates a colinearity
> problem, but I can't see how it could be, or why it wouldn't have shown
> up for the binomial as well as the poisson.
>
> My data are unusual; cluster size varies widely and there are lots of
> singleton clusters. I tried simulating data with lots of singletons;
> the poisson fit them fine. As mentioned the counts have no zeros
> (though the sa outcome above does).
>
> Can anyone suggest steps to diagnose or fix the problem?
>
> R 2.15.2; lme4 Version: 0.999999-0, Date: 2012-06-22 from CRAN.
>
> Ross Boylan
>
> P.S. Would extending the model to a poisson distribution conditional
> on the value being greater than 0 be hard?
It is indeed a little surprising (to me) that you're getting
downdating problems with an intercept-only model.
Hard to say without a closer look at the data.
I know it won't solve your problem, but does fitting the model
_without_ the singleton clusters work?
Do you have a very small number of values >0?
I don't see any obvious way to adapt glmer to doing truncated Poisson
fits, but glmmADMB has a "truncpoiss" family that would be worth trying.
(Right now glmmADMB is unavailable from r-forge, may be available shortly,
if you have trouble let me know.)
Ben Bolker
More information about the R-sig-mixed-models
mailing list