Skip to content
Prev 9764 / 20628 Next

Error en mer_finalize(ans) : Downdated X'X is not positive definite, 1. What is wrong with my model?

Dear Ben

This is what the summary(M_bud_type0) says. As expected, there are  
plenty of NAs in the interactions between (uncrossed) levels of the  
interaction between the nested factors (fBud_type:Species):


Call:
glm(formula = Dead ~ Treatment * fBud_type + fBud_type:Species,
     family = binomial, data = species)

Deviance Residuals:
     Min       1Q   Median       3Q      Max
-5.8281  -0.2220   0.0703   0.3323   2.3882

Coefficients: (18 not defined because of singularities)
                       Estimate Std. Error z value Pr(>|z|)
(Intercept)           -7.77657    0.85126  -9.135  < 2e-16 ***
Treatment             -0.31190    0.03200  -9.747  < 2e-16 ***
fBud_typena            0.19449    1.38718   0.140  0.88850
fBud_typesc            5.36751    0.91869   5.843 5.14e-09 ***
Treatment:fBud_typena -0.05374    0.05892  -0.912  0.36172
Treatment:fBud_typesc  0.06949    0.03837   1.811  0.07012 .
fBud_typehy:SpeciesEc  3.96261    0.52793   7.506 6.10e-14 ***
fBud_typena:SpeciesEc       NA         NA      NA       NA
fBud_typesc:SpeciesEc       NA         NA      NA       NA
fBud_typehy:SpeciesEn  3.01308    0.48926   6.158 7.35e-10 ***
fBud_typena:SpeciesEn       NA         NA      NA       NA
fBud_typesc:SpeciesEn       NA         NA      NA       NA
fBud_typehy:SpeciesLp       NA         NA      NA       NA
fBud_typena:SpeciesLp  1.21835    0.49753   2.449  0.01433 *
fBud_typesc:SpeciesLp       NA         NA      NA       NA
fBud_typehy:SpeciesRf       NA         NA      NA       NA
fBud_typena:SpeciesRf       NA         NA      NA       NA
fBud_typesc:SpeciesRf  0.14214    0.39921   0.356  0.72180
fBud_typehy:SpeciesRh       NA         NA      NA       NA
fBud_typena:SpeciesRh       NA         NA      NA       NA
fBud_typesc:SpeciesRh -1.18370    0.37535  -3.154  0.00161 **
fBud_typehy:SpeciesVm       NA         NA      NA       NA
fBud_typena:SpeciesVm       NA         NA      NA       NA
fBud_typesc:SpeciesVm -1.09756    0.37513  -2.926  0.00344 **
fBud_typehy:SpeciesVu       NA         NA      NA       NA
fBud_typena:SpeciesVu       NA         NA      NA       NA
fBud_typesc:SpeciesVu       NA         NA      NA       NA
fBud_typehy:SpeciesVv       NA         NA      NA       NA
fBud_typena:SpeciesVv       NA         NA      NA       NA
fBud_typesc:SpeciesVv       NA         NA      NA       NA
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1

(Dispersion parameter for binomial family taken to be 1)

     Null deviance: 1797.06  on 1385  degrees of freedom
Residual deviance:  736.43  on 1374  degrees of freedom
AIC: 760.43

Number of Fisher Scoring iterations: 7


### If I try your second suggestion and run the model in glm, the  
number of NAs goes down, but there are still a few:

Call:
glm(formula = Dead ~ Treatment * fBud_type + budspecies, family = binomial,
     data = species)

Deviance Residuals:
     Min       1Q   Median       3Q      Max
-5.8281  -0.2220   0.0703   0.3323   2.3882

Coefficients: (2 not defined because of singularities)
                       Estimate Std. Error z value Pr(>|z|)
(Intercept)           -7.77657    0.85126  -9.135  < 2e-16 ***
Treatment             -0.31190    0.03200  -9.747  < 2e-16 ***
fBud_typena            0.19449    1.38718   0.140  0.88850
fBud_typesc            5.36751    0.91869   5.843 5.14e-09 ***
budspecieshy.Ec        3.96261    0.52793   7.506 6.10e-14 ***
budspecieshy.En        3.01308    0.48926   6.158 7.35e-10 ***
budspeciesna.Lp        1.21835    0.49753   2.449  0.01433 *
budspeciessc.Rf        0.14214    0.39921   0.356  0.72180
budspeciessc.Rh       -1.18370    0.37535  -3.154  0.00161 **
budspeciessc.Vm       -1.09756    0.37513  -2.926  0.00344 **
budspeciessc.Vu             NA         NA      NA       NA
budspecieshy.Vv             NA         NA      NA       NA
Treatment:fBud_typena -0.05374    0.05892  -0.912  0.36172
Treatment:fBud_typesc  0.06949    0.03837   1.811  0.07012 .
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1

(Dispersion parameter for binomial family taken to be 1)

     Null deviance: 1797.06  on 1385  degrees of freedom
Residual deviance:  736.43  on 1374  degrees of freedom
AIC: 760.43

Number of Fisher Scoring iterations: 7

I also don't know how to include the new factor with droplevels in the  
glmer model... should this new factor replace the nested one?

Cheers,

Sara




Quoting Ben Bolker <bbolker at gmail.com>: