[R-sig-ME] Error en mer_finalize(ans) : Downdated X'X is not positive definite, 1. What is wrong with my model?

Ben Bolker bbolker at gmail.com
Mon Mar 4 15:06:05 CET 2013


On 13-03-04 08:58 AM, PALACIO BLASCO, SARA wrote:
> Dear Ben,
> 
> Thanks for your response. I had read a very similar response to FAQs
> explaining why the error relates to rank deficient models. I have tried
> to center Treatment (a continuous variable, sorry I didn't specify
> this!) but this does not remove the error.
> 
> I think the problem comes with the nested nature of "Species" within
> "Bud_type", since not all species are in all Bud_types, I have a rank
> deficient design and lme4 cannot cope with it. I  do not think there is
> a solution to this problem other than including "Species" as a random
> effect, but then I will not be able to know its effect...
> 
> Cheers,
> 
> Sara Palacio

  Did you try to fit

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

as suggested in the FAQ to see where the rank-deficiencies are
(i.e. are there NA-valued coefficients?)

  It's not immediately obvious to me that the fBud_type:Species
interaction should be causing trouble, because lme4 internally
drops unused levels of factors. You could *try*

species$budspecies <- with(species,
   droplevels(interaction(fBud_type,Species)))

just to check that, but I don't think it will help.

  Using Species as a random effect does *not* mean you "will not be able
to know its effect" -- you just won't be able to test hypotheses about
differences between particular species/combinations of species.
You can still use ranef() to get a value (technically not an "estimate")
for the conditional mode of each species.


> 
> Quoting Ben Bolker <bbolker at gmail.com>:
> 
>> PALACIO BLASCO, SARA <s.palacio at ...> writes:
>>
>> [snip]
>>
>>> I am trying to run the following model in glmer:
>>>
>>> > M_bud_type1=glmer(Dead~Treatment* fBud_type + fBud_type:Species +
>>> > (1|fRep), family=binomial, data=species)
>>>
>>> where:
>>> - Dead is a binomial response variable
>>> - fBud_type is a fixed factor with 3 levels
>>> - Species is a fixed factor with 9 levels nested within fBud_type and
>>> - fRep is a random factor with 27 levels nested within Species
>>>
>>> I have 1386 observations.
>>> The error message I receive reads:
>>>
>>> Error en mer_finalize(ans) : Downdated X'X is not positive definite, 1.
>>>
>>
>>   Did you already read the http://glmm.wikidot.com/faq#errors section?
>>
>>   It sounds like all your predictors are categorical (although we don't
>> know about Treatment), so centering isn't really as important/as
>> practical
>> an option (you can use sum-to-zero contrasts, but it probably won't
>> make a big difference).
>>
>>   Ben Bolker
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 
> 
>



More information about the R-sig-mixed-models mailing list