View source: R/lb_create_lm_bands.R
lb_create_lm_bandsf | R Documentation |
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.
lb_create_lm_bandsf(formula, data, band_type = "whbands", level = 0.95)
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 |
a data frame of the 100 x and predicted values along with lower and upper values for the confidence band with level
lb_create_lm_bandsf(mpg ~ disp, data = mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.