lm.boot.methods: Methods for linear model bootstrap.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Methods for "lm.simpleboot" class objects.

Usage

1
2
3
4
5
6
## S3 method for class 'lm.simpleboot'
summary(object, ...)
## S3 method for class 'summary.lm.simpleboot'
print(x, ...)
## S3 method for class 'lm.simpleboot'
fitted(object, ...)

Arguments

object

An object of class "lm.simpleboot", as returned by lm.boot.

x

An object of class "summary.lm.simpleboot", a result of a call to summary.lm.simpleboot.

...

Other arguments passed to and from other methods.

Details

print is essentially the same as the usual printing of a linear model fit, except the bootstrap standard errors are printed for each model coefficient.

fitted returns the fitted values from each bootstrap sample for the predictor values specified by the new.xpts in lm.boot (or from the grid if new.xpts was not specified). This is a p x R matrix where p is the number of points where prediction was desired and R is the number of bootstrap samples specified. Using fitted is the equivalent of using samples(object, name = "fitted").

Value

summary returns a list containing the original estimated coefficients and their bootstrap standard errors.

Author(s)

Roger D. Peng

See Also

lm.boot.

Examples

1
2
3
4
5
data(airquality)
attach(airquality)
lmodel <- lm(Ozone ~ Wind + Solar.R)
lboot <- lm.boot(lmodel, R = 300)
summary(lboot)

Example output

Loading required package: boot
Simple Bootstrap Routines (1.1-3 2008-04-30)
BOOTSTRAP OF LINEAR MODEL  (method = rows)

Original Model Fit
------------------
Call:
lm(formula = Ozone ~ Wind + Solar.R)

Coefficients:
(Intercept)         Wind      Solar.R  
    77.2460      -5.4018       0.1004  

Bootstrap SD's:
(Intercept)         Wind      Solar.R  
 9.50049611   0.80303990   0.02304877  

simpleboot documentation built on May 2, 2019, 4:16 a.m.