para_boot: carry out parametric bootstrap to get CIs for model...

View source: R/para_boot.R

para_bootR Documentation

carry out parametric bootstrap to get CIs for model predictions

Description

carry out parametric bootstrap to get CIs for model predictions

Usage

para_boot(model, new_data, predictor, nboot, conf_level = 0.95)

Arguments

model

a fitted model object created by lm() or glm() or geeglm()

new_data

data frame with data for which to make predictions and generate bootstrap CIs

predictor

the covariate for which to make predictions. other predictors in the model will be held constant at their median value, or the most commonly observed value in the dataset.

nboot

number of bootstrap iterations. Defaults to 1000. Ignored if boot is FALSE.

conf_level

confidence level as a proportion, default is 0.95 for 95 percent confidence

Value

a data.frame with variables CIlower and CIupper, the lower and upper bounds of the parametric bootstrap CI


stacyderuiter/s245 documentation built on July 31, 2023, 11:04 p.m.