bootMSE: MSE for bootstrap samples of linear regression coefficients

Description Usage Arguments Details Value Author(s)

View source: R/bootMSE.R

Description

MSE of a bootstrap sample of simple linear regression coefficients

Usage

1
bootMSE(B, lmodObs, x, ncovs)

Arguments

B

The number of bootstrap replicates. Usually this will be a single positive integer.

lmodObs

The observed linear model estimated by least squares. A fitted model object of class inheriting from 'lm'.

x

A B x (k+1) data frame containing B samples from the distributions of each of the (k+1) model parameters, where k is the number of predictors in the model.

ncovs

The number of covariates in the observed model. A positive integer.

Details

This function calculates the mean square error for bootstrap samples of linear regression coefficients.

Value

A vector of size (k+1) containing the mean square error of the bootstrap sample of each regression coefficient.

Author(s)

Natalie DelRocco


ndelrocco/lmBootCompare documentation built on Dec. 10, 2019, 12:38 p.m.