-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
check_model
check notmality in GLMs?
#501
Comments
the current normality check isn't really appropriate generally except for linear models. something like the DhARMA QQ plots would be more appropriate |
MASS package provides a QQ plot (with |
Aren't these also irrelevant? |
This is a classic GLM approach. When sample sizes are reasonably large (e.g. Poisson with 'large' mean (>5?), Binomial with Ben, Marta García, and Víctor J Yohai. 2004. “Quantile–Quantile Plot for Deviance Residuals in the Generalized Linear Model.” Journal of Computational and Graphical Statistics 13 (1): 36–47. https://doi.org/10.1198/1061860042949_a. Augustin, Nicole H., Erik-André Sauleau, and Simon N. Wood. 2012. “On Quantile Quantile Plots for Generalized Linear Models.” Computational Statistics & Data Analysis 56 (8): 2404–9. https://doi.org/10.1016/j.csda.2012.01.026. |
Also note that we have changed the behaviour and adopted the new computation for QQ-plot for GLMs that is implemented in R 4.3 (#571). That maybe resolves this issue? |
To be honest I don't fully understand the advantages of the base-R change, but I'm fine with this. I think it's a matter of taste whether you want to present these plots, or take something from |
Hello, thanks a lot for this package very useful and user-frienfly. What do you think about integrating the DHARMA check of residuals for (generalized) mixed models ? Best, Emeline |
We have an older issue where we discussed integrating DHARMa (#376), but I personally have rarely used that package, and I'm not sure if other easystats-members currently find the time to work on this. But it's definitely not forgotten... |
Should be fixed in #643 library(performance)
set.seed(3)
mu <- rpois(500, lambda = 3)
x <- rnorm(500, mu, mu * 3) |>
ceiling() |>
pmax(0)
quine.nb1 <- MASS::glm.nb(x ~ mu)
check_normality(quine.nb1)
#> There's no formal statistical test for normality for generalized linear
#> model.
#> Instead, please use `simulate_residuals()` and `check_residuals()` to
#> check for uniformity of residuals.
check_residuals(quine.nb1)
#> Warning: Non-uniformity of simulated residuals detected (p < .001).
plot(simulate_residuals(quine.nb1)) Created on 2024-03-15 with reprex v2.1.0 |
Is there a reason for this? What am I missing...
But…
check_model(quine.nb1)
Created on 2022-10-23 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: