You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm quite new and would like to apologise if this is not the correct place to post my question.
I'm currently trying to compute model prediction and associated prediction intervals. My model is a Poisson regression. I currently use 2 methods to derive the prediction intervals: insight::get_predicted and ggeffects::ggpredict. The two methods lead to quite different PI. Moreover the PI obtained when using ggpredict are extremely large (in some cases the upper limit > the maximum observed value). How is that possible? I'm missing something?
I get the same issue when using a very simple model (see code below). I would greatly appreciate some help.
Many thanks in advance,
Marie
A basic example
data("Salamanders")
m <- glm( count ~ mined , family = poisson(link = "log"), data = Salamanders)
d <- data_grid(m, terms = c("mined"))
Using insight::get_predicted
cbind(d,insight::get_predicted(mm, d, ci = 0.95,predict = "prediction") )
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm quite new and would like to apologise if this is not the correct place to post my question.
I'm currently trying to compute model prediction and associated prediction intervals. My model is a Poisson regression. I currently use 2 methods to derive the prediction intervals: insight::get_predicted and ggeffects::ggpredict. The two methods lead to quite different PI. Moreover the PI obtained when using ggpredict are extremely large (in some cases the upper limit > the maximum observed value). How is that possible? I'm missing something?
I get the same issue when using a very simple model (see code below). I would greatly appreciate some help.
Many thanks in advance,
Marie
A basic example
data("Salamanders")
m <- glm( count ~ mined , family = poisson(link = "log"), data = Salamanders)
d <- data_grid(m, terms = c("mined"))
Using insight::get_predicted
cbind(d,insight::get_predicted(mm, d, ci = 0.95,predict = "prediction") )
mined Predicted CI_low CI_high
1 yes 0.2954545 2.220446e-16 2
2 no 2.2648810 2.220446e-16 6
Using ggpredict
ggpredict(m, terms = c("mined"), interval = "prediction" )
mined | Predicted | 95% CI
yes | 0.30 | [0.01, 6.41]
no | 2.26 | [0.11, 48.83]
Beta Was this translation helpful? Give feedback.
All reactions