Skip to content
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

Unnecessary checks in check_model for NB models #500

Open
Tracked by #698 ...
mattansb opened this issue Oct 23, 2022 · 3 comments
Open
Tracked by #698 ...

Unnecessary checks in check_model for NB models #500

mattansb opened this issue Oct 23, 2022 · 3 comments
Labels
3 investigators ❔❓ Need to look further into this issue

Comments

@mattansb
Copy link
Member

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)

@strengejacke
Copy link
Member

@bwiernik ?

@strengejacke
Copy link
Member

strengejacke commented Mar 17, 2024

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

@strengejacke
Copy link
Member

(edit: sorry, wrong reprex, did not reinstall the pkg)

This was referenced Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 investigators ❔❓ Need to look further into this issue
Projects
None yet
Development

No branches or pull requests

2 participants