predict_intervals | R Documentation |
Computes CI from posterior, and PI for Tweedie and scat gams.
predict_intervals(object_fit, new_data, n = 1000, CI = TRUE, PI = TRUE, ...)
object_fit |
[gam OR bam] The fit to use for predictions. |
new_data |
[data.frame] The data to predict onto. |
n |
[numeric] The number of simulations to run for parameters. |
CI |
[logical] Whether to compute the CI. |
PI |
[logical] Whether to compute the PI. |
... |
further arguments passed to the quantile function. |
A data.frame
with intervals.
gam1 <- gam(cyl ~ mpg, data=mtcars, family = tw)
predict_intervals(gam1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.