-
-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Labels
3 investigators ❔❓Need to look further into this issueNeed to look further into this issue
Description
check_overdispersion()
seems to just be returning the same results for poisson and quasipoisson. I think the latter should be based on simulated residuals, but that's not enabled yet so maybe that's why?
library(easystats)
#> # Attaching packages: easystats 0.7.2
#> ✔ bayestestR 0.13.2.2 ✔ correlation 0.8.4
#> ✔ datawizard 0.11.0.2 ✔ effectsize 0.8.8.1
#> ✔ insight 0.20.1 ✔ modelbased 0.8.8
#> ✔ performance 0.12.0 ✔ parameters 0.21.7.4
#> ✔ report 0.5.8 ✔ see 0.8.4
Poisson - correct
fit <- glm(
formula = DriversKilled ~ PetrolPrice,
family = poisson(link = "log"),
data = Seatbelts
)
check_overdispersion(fit)
#> # Overdispersion test
#>
#> dispersion ratio = 4.470
#> Pearson's Chi-Squared = 849.362
#> p-value = < 0.001
#> Overdispersion detected.
simulate_residuals(fit)
#> Simulated residuals from a model of class `glm` based on 250
#> simulations. Use `check_residuals()` to check uniformity of residuals or
#> `residuals()` to extract simulated residuals. It is recommended to refer
#> to `?DHARMa::simulateResiudals` and `vignette("DHARMa")` for more
#> information about different settings in particular situations or for
#> particular models.
Quasi-poisson - incorrect?
fit2 <- glm(
formula = DriversKilled ~ PetrolPrice,
family = quasipoisson(link = "log"),
data = Seatbelts
)
check_overdispersion(fit2)
#> # Overdispersion test
#>
#> dispersion ratio = 4.470
#> Pearson's Chi-Squared = 849.362
#> p-value = < 0.001
#> Overdispersion detected.
simulate_residuals(fit2)
#> Error in simulate.lm(object, nsim = nsim, ...): family 'quasipoisson' not implemented
Created on 2024-06-13 with reprex v2.1.0
Metadata
Metadata
Assignees
Labels
3 investigators ❔❓Need to look further into this issueNeed to look further into this issue