bootstrap_parametric_predict: Perform parametric bootstrap for predictions of generalized...

View source: R/bootstrap_glm.R

bootstrap_parametric_predictR Documentation

Perform parametric bootstrap for predictions of generalized linear model.

Description

This is the workhorse for the estimate_mean_response() function when a generalized linear model is specified and parametric bootstrap is required. This is not meant to be called by the user directly.

Usage

bootstrap_parametric_predict(fit, newdata, reps)

Arguments

fit

glm object defining the model for which the parameters are estimated.

newdata

new data set used to construct the predictions.

reps

scalar; number of bootstrap replications to perform.

Value

matrix with the same number of rows as rows of newdat and reps columns. Each row contains the bootstrap estimates of the corresponding prediction.

Examples

## Not run: 
fit <- glm(mpg ~ hp, data = mtcars)
bootstrap_parametric_predict(fit, mtcars, reps = 4999)

## End(Not run)


reyesem/IntroAnalysis documentation built on March 29, 2025, 3:29 p.m.