View source: R/lb_plot_lm_bands.R
lb_plot_lm_bands | R Documentation |
Creates a plot object of a fitted linear model with confidence bands and a loess smoother
lb_plot_lm_bands(df, x, y, band_type = "whbands", level = 0.95)
df |
a data frame to be modeled |
x |
a character name of an explanatory variable from the data frame |
y |
a character name of a response variable from the data frame |
band_type |
A character value for the type of confidence band. Includes "whbands". |
level |
a number between 0 and 1 for the confidence level of the bands |
a ggplot2 object with the fitted line, the confidence bands and a loess smoother
lb_plot_lm_bands(mtcars, "disp", "mpg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.