performance
performance copied to clipboard
Unnecessary checks in `check_model` for NB models
Dispersion plot does not seem to account for the theta parameter in the model?
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_model(quine.nb1)
Created on 2022-10-23 by the reprex package (v2.0.1)
@bwiernik ?
Not sure, do you still think the plot is inaccurate? The results from simulate_residuals()
(DHARMa) look in line with the plot?
library(performance)
set.seed(3)
mu <- rpois(500, lambda = 3)
x <- rnorm(500, mu, mu * 3) |>
ceiling() |>
pmax(0)
m <- MASS::glm.nb(x ~ mu)
check_overdispersion(simulate_residuals(m))
#> # Overdispersion test
#>
#> dispersion ratio = 0.410
#> p-value = < 0.001
#> Underdispersion detected.
check_model(m)
Created on 2024-03-17 with reprex v2.1.0
(edit: sorry, wrong reprex, did not reinstall the pkg)