0
$\begingroup$

Forgive me if I am missing important information this is my first time posting here. I am trying to build a mixed model to see effects of a management treatment (gridtype) on body condition of certain species of birds (JAWE & KAEL for this example). I am using the same code to build the model for two different species but getting very different looking residual vs fitted plots and I am wondering why. The plot for the JAWE species is clustered into two groups where KAEL is not.

JAWE.mixed.lmer <- lmer(bc ~ gridtype + (1|bandingstation), data = JAWE_bd)

KAEL.mixed.lmer <- lmer(bc ~ gridtype + (1|bandingstation), data = KAEL_bd)

This is how the JAWE plot comes out plot(JAWE.mixed.lmer)

enter image description here

This is how the KAEL plot comes out plot(KAEL.mixed.lmer) enter image description here

I think it has something to do with this error I am getting on the JAWE model but I can't figure out what it is.

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

I've tried setting gridtype and banding station as factors because they upload as characters, I've looked for missing data in the raw data but everything looks fine, I've checked the code over and over to see if there are any differences in the input but I can't find anything.

Here is the str() of the JAWE data enter image description here

and here is the str() of the KAEL data

enter image description here

If anyone would be able to help me solve this mystery I would greatly appreciate it.

$\endgroup$
2
  • $\begingroup$ your two examples look exactly the same except for the data, which we can see $\endgroup$ Commented Jun 3, 2022 at 23:12
  • $\begingroup$ The str() output shows are lots of variables that have nothing to do with the model. Instead it will be more helpful to plot the bc as a function of gridtype and bandingstation, eg. for each dataset and each gridtype (ON/OFF), plot bandingstation on the x axis and bc on the y axis. (That will make four scatterplots.) $\endgroup$
    – dipetkov
    Commented Jun 6, 2022 at 22:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.