-
Notifications
You must be signed in to change notification settings - Fork 22
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
Issue Interpreting residual patterns for a GLMER Binomial Logistic Regression Model #448
Comments
Hi @coanv,
If I had >10,000 data points the plot would be a smoothScatter, also ignoring asFactor=T
Regarding the Zero Inflation test: On the one hand, your model expects more zeros than the real data has. So, I was wondering if it could be the "one-inflated" case (? you could use On the other hand, given that you have such a huge dataset (>85,000?), the chance that a small departure from the expected zeros (or ones) will be significant is large. I'd then interpret the ratio value, which is pretty much close to 1. So, I'd not bother too much about it. However, take a look at the values of the KS and dispersion tests, too (not much the significance). :) |
Hi,
Best |
Hi,
I am using a multi-level "within/between" or "hybrid" model specification to predict the likelihood of holding credit card debt (0 = no, 1 = yes) as a function of caregiving status (0 = not caregiver, 1 = caregiver) and a slew of control predictors. I have 6 waves of panel data where observations are nested in people (grouping variable: HHIDPN). I've determined that a hybrid model specification (using group centered means and deviations for time variant predictors) is a better fit than a mixed model specification via an LR test using anova(). My hybrid model currently has multiple random effects (Random Intercept on Person ID (HHIDPN) and Random Slope on Year2)
This is the model specification I'm attempting to run diagnostics on using DHARMA
mHF2<- glmer(haveccd ~ gender + coll + race + year2 + care2a.m + rmstatc.m+ employ.m+homeown.m + selfhlth.m +scale(rageyb.m) +hhhres.m +loghinc_real.m+ care2a.d+rmstatc.d+employ.d+homeown.d+selfhlth.d+scale(rageyb.d)+hhhres.d+ loghinc_real.d+(1|HHIDPN)+(year2-1|HHIDPN) ,data=ch1anly, family=binomial, control=glmerControl(optimizer="nlminbwrap"))
Following the instructions outlined here I have run the following code
simulationOutput <- simulateResiduals(fittedModel = mHF2) plot(simulationOutput, asFactor = TRUE)
Which gives me these plots
My understanding is I should be seeing a boxplot for the graph on the right given that I specified asFactor = TRUE and I'm not sure why that is not happening.
I then tried to test for possible zero-inflation given that the majority of my sample does not have credit card debt and is therefore coded as 0.
testZeroInflation(simulationOutput)
And I get this output
I think this is telling me that I do have zero inflation and need to adjust for that. But I'm not sure if I'm understanding the output correctly and if I am, what my next step should be. I'm hoping someone can help me understand why I am not getting a boxplot for my residuals despite specifying asFactor = TRUE, and also help me understand what this output means and what my next steps should be in trying to find the best fitting model.
The text was updated successfully, but these errors were encountered: