PI: Prediction Intervals and Estimates for New Data

Description Usage Arguments Value

View source: R/PI.R

Description

This function takes in a list of linear regression coefficient estimates generated by a Bag of Little Bootstraps procedure, and a dataframe of observations without the response variable. The response variable for each observation is predicted using each vector of coefficient estimates for each sample. Then, empirical prediction intervals and point estimates for the response variable of each observation are determined for each sample. Afterwards, the endpoints of all intervals are averaged to form overall prediction intervals, and point estimates are averaged to form overall predictions. It should be noted that the prediction intervals are not multiple prediction intervals. For Bonferroni-corrected prediction intervals, divide the desired value of alpha by the number of observations.

Usage

1
PI(lrbs, x, alpha = 0.05)

Arguments

lrbs

A linear_reg_bs or linear_reg_bs_par object containing BLB regression coefficient estimates.

x

A dataframe of the explanatory variables of unseen observations.

alpha

The significance level. Default value is 0.05.

Value

The prediction intervals and estimates for the response variable of each unseen observation.


nvarshney20/STA141CFinal documentation built on March 20, 2020, 12:48 a.m.