lm.boot: Parametric and non-parametric bootstrap for linear regression...

View source: R/lm.boot.R

Parametric and non-parametric bootstrap for linear regression modelR Documentation

Parametric and non-parametric bootstrap for linear regression model

Description

Parametric and non-parametric bootstrap for linear regression model.

Usage

lm.boot(x, y, R = 1000, type = "param")
lm.parboot(x, y, R = 1000)
lm.nonparboot(x, y, R = 1000)

Arguments

x

The predictor variables, a vector or a matrix or a data frame.

y

The response variable, a numerical vector with data.

R

The number of parametric bootstrap replications to perform.

type

This is either "param" for parametric bootstrap, or "nonparam" for non-parametric bootstrap.

Details

An efficient implementation of parametric or non-parametric bootstrapping the residuals for linear models is provided.

Value

A matrix with R columns and rows equal to the number of the regression parameters. Each column contains the set of a bootstrap beta regression coefficients.

Author(s)

Michail Tsagris with some help from Nikolaos Kontemeniotis.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Efron Bradley and Robert J. Tibshirani (1993). An introduction to the bootstrap. New York: Chapman & Hall/CRC.

See Also

lm.drop1, leverage, pc.sel, mmpc

Examples


y <- rnorm(50)
x <- matrix( rnorm( 50 * 2), ncol = 2 )
a <- lm.boot(x, y, 500)


Rfast2 documentation built on April 11, 2025, 6:15 p.m.