0

I am running this model:

m1a <- lmer(DeltaMass ~ Box.type + Delta.Mass.Temps + 
    Individual..Hatch.order. + Age2 + (1|seasonnest), 
    data=AllDeltachickshistoric.df)

I get this error of singularity:

    (boundary (singular) fit: see help('isSingular'))

What could this be due to? Something in the model or the dataset? I tried checking for correlations, but none of my variables are correlated except for box type and the delta mass air temps because season confounds them. I also omitted missing values from my dataset and tried simplifying my models.

summary() output:

Linear mixed model fit by REML. t-tests use `Satterthwaite's` method [lmerModLmerTest]
Formula: DeltaMass ~ Box.type + Delta.Mass.Temps + Individual..Hatch.order. +  
    Age2 + (1 | seasonnest)
   Data: AllDeltachickshistoric.df

REML criterion at convergence: 181.1

Scaled residuals: Min 1Q Median 3Q Max -1.4176 -0.7285 0.1948 0.6413 1.4945

Random effects: Groups Name Variance Std.Dev. seasonnest (Intercept) 0.0 0.00
Residual 311.8 17.66
Number of obs: 24, groups: seasonnest, 12

Fixed effects: Estimate Std. Error df t value Pr(>|t|)
(Intercept) -100.2938 71.9114 19.0000 -1.395 0.1792
Box.typeInsulated 9.8175 10.1466 19.0000 0.968 0.3454
Delta.Mass.Temps 3.5703 1.8830 19.0000 1.896 0.0733 . Individual..Hatch.order. 4.7772 5.1949 19.0000 0.920 0.3693
Age2 -1.2829 0.6113 19.0000 -2.099 0.0495 *


Signif. codes: 0 ‘*’ 0.001 ‘’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects: (Intr) Bx.tyI Dl.M.T I..H.. Bx.typInslt -0.283
Dlt.Mss.Tmp -0.961 0.284
Indvdl..H.. -0.429 0.050 0.190
Age2 0.083 -0.158 -0.199 -0.005 optimizer (nloptwrap) convergence code: 0 (OK) boundary (singular) fit: see help('isSingular') ```

Ben Bolker
  • 43,543
  • 5
    See also https://stats.stackexchange.com/questions/512234/boundary-singular-fit-see-issingular, help("isSingular"), https://stats.stackexchange.com/questions/378939/dealing-with-singular-fit-in-mixed-models, https://stats.stackexchange.com/questions/509892/why-is-this-linear-mixed-model-singular, https://stackoverflow.com/questions/54597496/how-to-cope-with-a-singular-fit-in-a-linear-mixed-model-lme4, https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#singular-fits ... – Ben Bolker Jan 30 '24 at 15:48
  • 2
    Can you please edit your question to include the output of summary(m1a) (as text, not as an image)? – Ben Bolker Jan 30 '24 at 15:48
  • There can be a number of causes for singularity. As Ben noted, it will be helpful to have the model output from the summary() function. I'm most curious about the random effect variances here, which are often a culprit for these singularities. – Shawn Hemelstrand Jan 31 '24 at 00:43
  • I see that you (I think) tried to update with the output of summary(), but you posted as answer (now deleted) rather than editing your question. I put it in your question. – Ben Bolker Feb 13 '24 at 15:00

1 Answers1

0

As reported there are many reasons for singularity. Your example is not reproducible for the lack of data. Could you provide some characteristics of the data e.g. the levels of each factors and the general number of cases etc...

One problem could be the excessive number of factors compared to the total number of cases. Try simple model excluding some factors and/or try a simple lm model.

Alessio
  • 11