[R-sig-ME] Cholmod warning with glmer
David Winsemius
dwinsemius at comcast.net
Sun Jan 6 02:22:26 CET 2013
On Jan 4, 2013, at 1:40 PM, leanne heisler wrote:
>
> Hi All,
> I am running a generalized linear mixed effects model with lme4 and am getting an error I have not been able to decipher. I was hoping for some guidance. I am using the following code:
>
>> glmer(DM~PREC+(1|NEST)+(1|NG)+(1|LONG),data=data,family=poisson,verbose=TRUE)
> 0: 6107.8287: 1.34084 1.29515 0.532795 3.23218 -0.00145626
> 1: 6107.8287: 1.34084 1.29515 0.532795 3.23218 -0.00145626
> Error in mer_finalize(ans) : Downdated X'X is not positive definite, 1.
> In addition: Warning messages:
> 1: In mer_finalize(ans) :
> Cholmod warning 'not positive definite' at file:../Cholesky/t_cholmod_rowfac.c, line 431
> 2: In mer_finalize(ans) :
> Cholmod warning 'not positive definite' at file:../Cholesky/t_cholmod_rowfac.c, line 431
> All fixed and random effects are continuous variables (DM is counts of deer mice) except for the random effect 'NEST', which is categorical. The model runs fine when the random effects NEST and LONG are removed.
LONG appears to be integer and it might be useful to look at table(data$LONG) and table(data$NG).
>
> I feel I am doing something wrong here and would greatly appreciate any help from this mailing list.
>
Pasting in your other message:
> The results of str(data) are:
>
>> str(data)
> 'data.frame': 930 obs. of 14 variables:
> $ NEST : Factor w/ 627 levels "#10 Treesbank",..: 2 7 9 42 43 45 48 67 73 81 ...
> $ LONG : num -101 -111 -111 -112 -112 ...
> $ NG : num 0.34 0.8 0.82 0.6 0.7 0.54 0.05 0 0.95 0.3 ...
> $ DM : int 1 1 1 1 1 1 1 1 1 1 ...
> $ GDD : num 752 758 715 639 639 ...
> $ PREC : num 221.3 142.9 68.7 186.9 185.9 ...
> $ SNOW : num 27.8 14.1 35 19.2 19.2 ...
> $ GDDT1 : num 2201 2278 2206 2106 2105 ...
> $ PRECT1: num 271 249 276 222 221 ...
> $ SNOWT1: num 36.7 17.2 14.1 34.3 34.2 ...
You are of necessity going to have quite a few levels where NEST has only one value since 627 values are distributed of 930 rows. I think a cross-tabulation of those random effects will build a fairly sparse data object.
--
David Winsemius
Alameda, CA, USA
More information about the R-sig-mixed-models
mailing list