Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

looking at model errors #31

Open
adelegem opened this issue Aug 30, 2024 · 3 comments
Open

looking at model errors #31

adelegem opened this issue Aug 30, 2024 · 3 comments
Assignees

Comments

@adelegem
Copy link
Collaborator

No description provided.

@wcornwell
Copy link
Contributor

wcornwell commented Aug 30, 2024

looks like this is not a model problem. the model thinks that there is very little across site variance in that particular response variable:
Screenshot 2024-08-30 at 3 04 07 PM
10^-6 is very very small, so it's effectively not a mixed model at that point and residual r2 kinda loses it's meaning. In other words, not a major problem

Carry on.

@wcornwell
Copy link
Contributor

wcornwell commented Aug 30, 2024

i asked chatgpt the same question and they agree, but maybe explain it more clearly:

Insufficient Variation Across Groups: The random effect in your model ((1 | site)) is supposed to account for variability between different sites. If the variation in your outcome variable (shannon_diversity) across sites is minimal, the model can't estimate a meaningful variance for the random effect. This leads to a very small or zero variance component, triggering the singularity warning.

I feel chatGPT is the best when it agrees with me.

I'm also a bit befuddled by the use of the word "singularity" for multiple things in statistics. I guess it means that something internally is 0 and it's in a denominator somewhere so something else is infinity, but multiple different things can be 0 and/or infinity, which is confusing for non-robots.

@wcornwell
Copy link
Contributor

wcornwell commented Aug 30, 2024

chatGPT also suggested dropping the random effect for these cases:

model_simple <- glmmTMB(shannon_diversity ~ scale(CV), data = df_filtered)

which reminded me I did exactly that for this very reason in previous papers. this seems like a way forward although it will probably mess up your pretty four for loop code. Alternatively, we just leave it like it is and explain about the NA values for residual r2 in the caption of that table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants