bolker_ci | R Documentation |
This function takes a mixed effect model (lme object) and a new dataframe as input and creates predictions, confidence intervals and prediction intervals using the method described by Ben Bolker.
bolker_ci(model, newdat, pred_int = FALSE, conf_level = 0.95)
model |
The lme-model used for prediction. |
newdat |
The data.frame to use for prediction. |
pred_int |
Calculate prediction intervals (logical). |
conf_level |
Confidence level for the calculation of both intervals. |
A datafame which has predictions, standarderrors, confidence and. prediction intervals
# depends on an lme object from the nlme-package m <- nlme::lme(mpg ~ disp + hp, random = ~1|cyl, data = mtcars) # create new data.frame new <- data.frame(disp = c(160, 170), hp = c(90, 100)) bolker_ci(m, new)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.