[R] lmer, CHOLMOD warning: matrix not positive definite

Seyed Reza Jafarzadeh srjafarzadeh at gmail.com
Tue Apr 3 02:29:30 CEST 2007


Hi,

I am getting a warning message when I am fitting a generalized linear
mixed model (m1.2 below).


CHOLMOD warning: matrix not positive definite
 Error in objective(.par, ...) : Cholmod error `matrix not positive
definite' at file:../Supernodal/t_cholmod_super_numeric.c, line 614


Any idea?

Thanks for your help,
Reza



 > sessionInfo()
R version 2.4.1 (2006-12-18)
 i386-pc-mingw32

locale:
 LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
 [1] "stats"     "graphics"  "grDevices" "utils"     "datasets"
"methods"   "base"

 other attached packages:
       lme4      Matrix     lattice
"0.9975-13" "0.9975-11"   "0.14-17"


 > m1.1 <- lmer(o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (1 |
prov) + (1 | pm), data = mydata[1:1392,], family = quasipoisson)
 > m1.1
Generalized linear mixed model fit using Laplace
 Formula: o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (1 | prov) + (1 | pm)
   Data: mydata[1:1392, ]
 Family: quasipoisson(log link)
  AIC  BIC logLik deviance
 2622 2675  -1301     2602
Random effects:
 Groups   Name        Variance Std.Dev.
 prov     (Intercept) 0.495021 0.70358
 pm       (Intercept) 0.047755 0.21853
 Residual             1.935867 1.39135
number of obs: 1392, groups: prov, 24; pm, 12

Fixed effects:
             Estimate Std. Error t value
(Intercept) -0.207562   0.202715  -1.024
 pv1o         0.056575   0.006861   8.246
pv2o         0.023042   0.007216   3.193
 pv1toa       0.026497   0.003309   8.008
pv2toa      -0.001075   0.003467   -0.310
sesblf2      0.307805   0.195291   1.576
 sesblf3      0.067867   0.194097   0.350
sesblf4      0.232652   0.194075   1.199

Correlation of Fixed Effects:
         (Intr) pv1o   pv2o   pv1toa pv2toa ssblf2 ssblf3
pv1o     0.035
pv2o    -0.014 -0.568
 pv1toa   0.017 -0.239  0.050
pv2toa  -0.104  0.035 -0.267 -0.772
sesblf2 -0.498 -0.038  0.037 -0.067  0.102
 sesblf3 -0.483 -0.042  0.021 -0.096  0.085  0.508
sesblf4 -0.483 -0.052  0.029 -0.099  0.083  0.508  0.518


> m1.2 <- lmer(o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (pv1o | prov) + (1 | pm), data = mydata[1:1392,], family = quasipoisson)
CHOLMOD warning: matrix not positive definite
 Error in objective(.par, ...) : Cholmod error `matrix not positive
definite' at file:../Supernodal/t_cholmod_super_numeric.c, line 614


> m1.3 <- lmer(o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (pv1toa | prov) + (1 | pm), data = mydata[1:1392,], family = quasipoisson)
> m1.3
Generalized linear mixed model fit using Laplace
Formula: o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (pv1toa | prov)
+      (1 | pm)
   Data: mydata[1:1392, ]
 Family: quasipoisson(log link)
  AIC  BIC logLik deviance
 2459 2522  -1218     2435
Random effects:
 Groups   Name        Variance   Std.Dev. Corr
 prov     (Intercept) 0.88071235 0.938463
          pv1toa      0.00065327 0.025559 -0.712
 pm       (Intercept) 0.04588791 0.214215
 Residual             1.76873748 1.329939
number of obs: 1392, groups: prov, 24; pm, 12

Fixed effects:
              Estimate Std. Error t value
(Intercept) -0.3854583  0.2384690  -1.616
pv1o         0.0545945  0.0069507   7.855
pv2o         0.0266912  0.0072733   3.670
pv1toa       0.0369315  0.0063083   5.854
pv2toa      -0.0008906  0.0034099  -0.261
sesblf2      0.3326815  0.1908401   1.743
sesblf3      0.1012759  0.1896883   0.534
sesblf4      0.1968002  0.1899092   1.036

Correlation of Fixed Effects:
        (Intr) pv1o   pv2o   pv1toa pv2toa ssblf2 ssblf3
pv1o     0.016
pv2o    -0.023 -0.306
pv1toa  -0.485 -0.143 -0.014
pv2toa  -0.080 -0.055 -0.306 -0.367
sesblf2 -0.414 -0.037  0.033 -0.028  0.099
sesblf3 -0.402 -0.034  0.027 -0.046  0.080  0.509
sesblf4 -0.399 -0.039  0.031 -0.056  0.079  0.507  0.517



More information about the R-help mailing list