0
$\begingroup$

I want to fit a zero-inflated neg. binomial model using zeronfl(outcol ~ vm + Thursday + Saturday |Saturday + Thursday + vm, data, family="negbin") from the pscl package (this is just a simplied formula). I am receiving an error

Error in solve.default(as.matrix(fit_count$hessian)) : Lapack routine dgesv: system is exactly singular: U[2,2] = 0

By searching the internet I found that Achim Zeileis, the maintainer of the package told other people that the vaiance in the outcome for some covariates may be too small. Now I know that my outcome is always zero for Saturday==1, which is one reason I have so many zeros in the outcome and hence want to use a zeroinflated model.

When I do not use Saturday as covariate then I do not get the error. So is this the problem and, if yes, how can I fix it? And why is this even a problem? I used a common Poisson model as well and it doesn't mind the zeros in the outcome for Saturday==1. I understand that I probably should not use Saturday for the count model, but for the zero model it makes sense to it I guess?

$\endgroup$
  • $\begingroup$ You are probably dealing with separation problem in logistic regression. There are some questions and answers about it on this website. In your case, check out brms package for Bayesian modeling of the problem. The use of weakly informative priors should help. $\endgroup$ – Heteroskedastic Jim May 16 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.