0

I am trying to get the confidence intervals with the predict function for a glm in R (so I can then plot them as a geom_ribbon in ggplot).

These three options give me exaclty the same answer, i.e. the confidence intervals and prediction intervals are not working.

predict(model, newdata = plotdat)

predict(model, newdata = plotdat, interval = "confidence")

predict(model, newdata = plotdat, interval = "prediction")

Please help!

  • Please read [(1)](https://stackoverflow.com/help/how-to-ask) how do I ask a good question, [(2)](https://stackoverflow.com/help/mcve) how to create a MCVE as well as [(3)](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example#answer-5963610) how to provide a minimal reproducible example in R. Then edit and improve your question accordingly. I.e., abstract from your real problem... – Christoph Oct 13 '20 at 09:35
  • `predict.glm` does not have an `interval` parameter. – Roland Oct 13 '20 at 10:22

0 Answers0