linear_reg_bs_par: Linear Regression Using Bag of Little Bootstraps -...

Description Usage Arguments Value

View source: R/linear_reg_bs_par.R

Description

This function takes in a dataframe of observations, split into explanatory variables and response variable, and splits the data into a specified number of subsamples. Then, each subsample is resampled a specified number of times. Then, for each resample, a linear regression model is fit, and the estimates for each regression coefficient, as well as for the error variance. These estimates are returned to the user, and they can be used to determine confidence intervals for the error variance and each regression coefficient, and prediction intervals for new data. The difference between this function and linear_reg_bs is that this function uses parallel processing through furrr's future_map function.

Usage

1
linear_reg_bs_par(x, y, s = 10, r = 1000)

Arguments

x

A dataframe of the explanatory variables of all observations.

y

A numeric vector of the response variable of all observations.

s

The number of subsamples to split the data into. Default value is 10.

r

The number of bootstrap samples to generate from each subsample. Default value is 1000.

Value

bootstrap_coefficient_estimates: The BLB estimates of all regression coefficients. This list has an element for each subsample, and each element stores the estimates for each bootstrap sample in a matrix.

bootstrap_s2_estimates: The BLB estimates of sigma-squared (error variance). This list has an element for each subsample, and each element stores the estimates for each bootstrap sample in a vector.


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