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

hurdle.lognormal() needs to trigger error message when zi_fixed is omitted #48

Closed
edseab opened this issue Mar 26, 2023 · 1 comment
Closed

Comments

@edseab
Copy link

edseab commented Mar 26, 2023

In the mixed_model function, this early if statement:

if (family$family %in% c("zero-inflated poisson", "zero-inflated negative binomial",
"hurdle poisson", "hurdle negative binomial", "hurdle beta",
"zero-inflated binomial") && is.null(zi_fixed)) {
stop("you have defined a family with an extra zero-part;\nat least argument ",
"'zi_fixed' needs to be defined, and potentially also argument 'zi_random'.")
}

should also include the hurdle lognormal family. Otherwise omitting zi_fixed leads to this confusing error:

'data' must be of a vector type, was 'NULL'

Thanks!

@drizopoulos
Copy link
Owner

Thanks for reporting. The corrected version is on GitHub now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants