[R-sig-ME] Error in MEEM(object, conLin, control$niterEM) : Singularity in backsolve at level 0, block 1 in LME model
Ben Bolker
bbo|ker @end|ng |rom gm@||@com
Thu Jul 8 01:46:57 CEST 2021
If expressing the model in the R-friendliest form doesn't resolve
the problem, then you almost certainly have a *real* multicollinearity
problem, which in turn is almost certainly driven by combinations of
factors that are missing from your data set (e.g. if you have provenance
A, B, C and treatment a, b, c and the combination {provenance = A,
treatment = a} doesn't occur in your data set, then your model matrix is
multicollinear/unidentifiable.
Some options:
* fit in lme4 or another package that automatically handles
multicollinear terms. Looking at the mixed model comparison table
<https://docs.google.com/spreadsheets/d/19itelYaVW0U0gtNtRfqh76ZGt1awlamNcJwT71u_5Uk/edit#gid=0>,
if you want an AR1 model *and* automatic rank deficiency, you might need
the INLA package (off-CRAN) ...
* You can construct the model matrix manually and drop collinear terms
yourself: at least one example is given here:
https://github.com/glmmTMB/glmmTMB/issues/522
* you can expand the two-way interaction manually and build a one-way model.
I don't know how to interpret "There is a problem with repetition
only when I use lmer model".
cheers
Ben Bolker
On 7/7/21 11:37 AM, Arivoara Rabarijaona wrote:
> I can see my data in the attached file.
>
> Arivoara Rabarijaona
>
> Le mer. 7 juil. 2021 à 17:20, Arivoara Rabarijaona <arivoara using gmail.com
> <mailto:arivoara using gmail.com>> a écrit :
>
> Thank you for your explanation. I really appreciate it.
> However, there is no change using nlme (Error in MEEM(object,
> conLin, control$niterEM) : Singularity in backsolve at level 0,
> block 1 in LME model) and lmer (fixed-effect model matrix is rank
> deficient so dropping 6 columns / coefficients). My problem is not
> resolved.
> There is a problem with repetition only when I use lmer model.
>
> Arivoara Rabarijaona
>
> Le mer. 7 juil. 2021 à 16:26, Ben Bolker <bbolker using gmail.com
> <mailto:bbolker using gmail.com>> a écrit :
>
> You have constructed a model with multicollinear predictors
> (another
> way to put this is that your model matrix is rank-deficient). R's
> formula interface usually takes care of discarding redundant
> columns,
> but when interactions are spelled out explicitly with it can't
> always
> manage. You might do better expressing the fixed effects
> component of
> the model as
>
> (provenance + treatment + status)^2
> '
> As is often stated in this forum, you may have trouble fitting a
> random
> effect with only four levels (repetition).
>
> Ben Bolker
>
> On 7/7/21 4:01 AM, Arivoara Rabarijaona wrote:
> > Thank you,
> > provenance:treatment is normal, nothing is unexpected
> > I think the problem is with provenance:status, but I don't
> know how to
> > resolve it.
> > Using lmer, I get the message: fixed-effect model matrix is
> rank deficient
> > so dropping 18 columns / coefficients
> >
> > Ari
> >
> > Le mer. 7 juil. 2021 à 09:52, romunov <romunov using gmail.com
> <mailto:romunov using gmail.com>> a écrit :
> >
> >> Have you tried plotting this? My guess is that you will find
> something
> >> unexpected in the provenance:treatment level combination.
> >>
> >> Cheers,
> >> Roman
> >>
> >> On Wed, Jul 7, 2021 at 9:03 AM Arivoara Rabarijaona
> <arivoara using gmail.com <mailto:arivoara using gmail.com>>
> >> wrote:
> >>
> >>> Hi,
> >>> I hope someone can help me. I'm using nlme to fit models.
> >>>
> >>> My dataframe (1785 obs) :
> >>> $ id: Factor w/595 levels
> >>> $ treatment: Factor w/3 levels
> >>> $ provenance: Factor w/16 levels
> >>> $ repetition: Factor w/4 levels
> >>> $ bloc: Factor w/66 levels # nested to repetition
> >>> $ response: num ... (1777 obs and 8 NA) # 3 repeated
> measures by id
> >>> $ status: Factor w/3 levels,
> "dominant","codominant","suppressed" # there
> >>> are 6 provenances without suppressed trees
> >>>
> >>> I want to run a modele like this :
> >>>
> >>> modele <- lme(response ~ provenance + treatment +
> provenance:treatment +
> >>> status + status:treatment + statuts:provenance,
> >>> random = ~ 1|repetition/bloc,
> >>> correlation = corAR1(form = ~
> 1|repetition/bloc/id),
> >>> data, method= "ML", na.action =na.omit)
> >>>
> >>> I get the message :
> >>> Error in MEEM(object, conLin, control$niterEM) :
> Singularity in
> >>> backsolve
> >>> at level 0, block 1 in LME model
> >>>
> >>> If I run the modele without the interaction
> statuts:provenance, it works.
> >>>
> >>> Can anyone tell me how to resolve this error ?
> >>>
> >>> Thanks,
> >>> Arivoara Rabarijaona
> >>>
> >>> [[alternative HTML version deleted]]
> >>>
> >>> _______________________________________________
> >>> R-sig-mixed-models using r-project.org
> <mailto:R-sig-mixed-models using r-project.org> mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
> >>>
> >>
> >>
> >> --
> >> In God we trust, all others bring data.
> >>
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org
> <mailto:R-sig-mixed-models using r-project.org> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
> >
>
> _______________________________________________
> R-sig-mixed-models using r-project.org
> <mailto:R-sig-mixed-models using r-project.org> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
>
--
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
Graduate chair, Mathematics & Statistics
More information about the R-sig-mixed-models
mailing list