Description Usage Arguments Value
View source: R/linear_reg_bs.R
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.
1 | linear_reg_bs(x, y, s = 10, r = 1000)
|
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. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.