Description Usage Arguments Details Value See Also Examples
View source: R/pred_int_tdist.R
Simple wrapper for 'lm' and 'predict' which returns a prediction interval. This method assumes iid normally distributed observations.
1 | pred_int_tdist(x, level = 0.95, interval = c("prediction", "confidence"))
|
x |
should be an object of class "numeric" |
level |
coverage level with default 0.95 |
interval |
type of interval, by default is "prediction" |
Calculate prediction interval based on the t-distribution. It uses 'lm' and 'predict'
the prediction is at the mean of 'x'. Missing values are not allowed.
a prediction interval
function 'lm' and 'predict.lm'
1 2 3 4 5 6 | ## Not run:
## Prediciton interval for simulated data
x <- rnorm(100)
pdi <- pred_int_tdist(x)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.