lb_create_lm_bandsf: Create data frame with confidence bands data based on a...

View source: R/lb_create_lm_bands.R

lb_create_lm_bandsfR Documentation

Create data frame with confidence bands data based on a linear model formula

Description

This function takes formula input for a linear model and the type of confidence band and alpha level and creates a data frame of values that can be plotted to show the confidence bands.

Usage

lb_create_lm_bandsf(formula, data, band_type = "whbands", level = 0.95)

Arguments

formula

a formula for a linear model with variables from the data data frame

data

a data frame containing at least three observations of two variables for a linear regression

band_type

a character for the type of band desired. Includes: "whbands".

level

a number between 0 and 1 for the confidence level

Value

a data frame of the 100 x and predicted values along with lower and upper values for the confidence band with level

Examples

lb_create_lm_bandsf(mpg ~ disp, data = mtcars)

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