Comments (2)
Hello,
this doesn't look super concerning to me, but it does confirm the point in the vignette that you can have perfectly fine patterns per data point, but once you look per group you see certain patterns.
Before interpreting the pattern, I wanted to check that this is not a fluke, because RE estimates are known to be biased towards the mean, so was considering if a pattern could emerge from that. I therefore played around with variations of the following code:
testData = createData(sampleSize = 500,
overdispersion = 0,
family = binomial(),
randomEffectVariance = 2,
numGroups = 100)
library(lme4)
fit <- glmer(observedResponse ~ Environment1 + (1|group),
family = "binomial", data = testData)
summary(fit)
res <- simulateResiduals(fit, plot = T)
res2 <- recalculateResiduals(res, group = testData$group)
plot(res2)
I didn't really see any spurious patterns emerge. Thus, I would conclude that this is real and that you have a bit of underdispersion and a bit of heteroskedasticity in your RE-grouped residuals.
Underdispersion is often as sign of overfitting, so it could be that you have quite a lot of REs in relation to your number of observations, and thus your REs overfit a bit. As underdispersion is usually conservative (i.e. your p-values are larger than they should be), I would not be concerned about this, i.e. I would think the model is probably still acceptable, but you could consider.
Feel free to comment on this. I'll leave this issue open as a reminder to check in a bit more detail if it's a good idea to group by RE, and to add comments on this in the vignette!
from dharma.
Thank you so much for your answer!
from dharma.
Related Issues (20)
- Diagnostic plots for model using glmmTMB and Beta distibution HOT 6
- could not find function "ensureDHARMa"
- plotResiduals() falls back to predict and doesn't create a warning if variable doesn't exist
- Implement option to use DHARMa plots on general residual definition (bypassing simulation)
- Power of the KS test HOT 1
- How to resolve the residual versus predicted quantile devation (Dharma plot)?
- Could not find documentation on red-shaded area around smooth spline HOT 2
- Adjust DHARMa plots for color blindness
- DHARMa: fittedModel not in class of supported models for a glmmTMB model HOT 3
- Dispersion calculations for mdcv tweedie distribution HOT 1
- Clarify dispersion tests
- Extracted Pearson residuals wrong for mccv (type should be "scaled.pearson")
- Adding support for multinomial family in mcvc::gam HOT 4
- Simulations with infitite values for weighted binomial GAM, interpreting plots HOT 3
- Move all function links to me md syntax [simulateResiduals]
- How to reject a model with underdispersion but low AIC
- DHARMa residual checks with with GLMMadaptive using ‘hurdle semi-continous’ or ‘hurdle log-normal’ HOT 1
- DHARMa: residuals and predictor do not have the same length. HOT 4
- plotResiduals() - automatically handle NA and extend form = ~
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dharma.