lb_whbands: Working-Hotelling bands for simple linear regression.

View source: R/lb_conf_bands.R

lb_whbandsR Documentation

Working-Hotelling bands for simple linear regression.

Description

Intervals of the form "fit +/- w * standard-error", where w^2 is found by p * qf(level, p, n - p).

Usage

lb_whbands(object, new_data, level = 0.95)

Arguments

object

An object of class "lm".

new_data

A data frame containing the new data.

level

The confidence level of the band.

Value

a list of 4 elements to include the predicted values as $fit

Author(s)

David Gerard, American University

Examples

lb_whbands(object = lm(mpg ~ disp, data = mtcars),
new_data = data.frame("disp" = seq(from = min(mtcars$disp),
to = max(mtcars$disp), length.out = 100)), level = .95)

rressler/lbutils documentation built on Oct. 23, 2022, 11:20 p.m.