Predicting to zero-inflated truncated poisson model does not work for some prediction types #231
Labels
3 investigators ❔❓
help us 👀
Help is needed to implement something
wontfix 🚫
This will not be worked on
Hi,
[I am new to GitHub and also a beginner (but interested) in statistics and would kindly ask you to excuse possible flaws in my way presenting the issue]
For my count data of attack events by bark beetles on small bark windows, I fitted a zero-inflated GLMM with truncated poisson family using the glmmTMB package.
I then wanted to plot the predictions with 95% CI to obtain conditional plots.
This worked perfectly with the ggpredict()-function for the conditional part of the model (type = "fe"). I also obtained the probabilities from the zi part of the model (using type = "zi_prob").
However, when I try to predict to the full model (type = "zi_random" or "zero_inflated" or "zero_inflated_random") - all other parameters to specify the predictions of the ggpredict-function remain the same - I receive the following error message:
"Error in get_predictions_glmmTMB(model, data_grid, ci.lvl, linv, type, :
'list' object cannot be coerced to type 'double'"
My R skills are not profound enough to find out myself why the input from the model causes a problem at this point, but not for the other types of predictions. I am not sure whether it might be a bug or whether it is a problem of my model (or my understanding from it).
I would very much appreciate any hint or councel to solve this.
Many thanks in advance
Tobias
P.S.: Of course I can provide code and data supporting the issue if this helps solving it
The text was updated successfully, but these errors were encountered: