relm: Resample a Linear Model

View source: R/resample.R

relmR Documentation

Resample a Linear Model

Description

Fit a new model to data created using resample(model).

Usage

relm(model, ..., envir = environment(formula(model)))

Arguments

model

a linear model object produced using lm().

...

additional arguments passed through to resample().

envir

an environment in which to (re)evaluate the linear model.

See Also

resample()

Examples

mod <- lm(length ~ width, data = KidsFeet)
do(1) * mod 
do(3) * relm(mod) 
# use residual resampling to estimate standard error (very crude because so few replications)
Boot <- do(100) * relm(mod)
sd(~ width, data = Boot)
# standard error as produced by summary() for comparison
mod |> summary() |> coef() 


mosaic documentation built on Nov. 10, 2023, 1:11 a.m.