View source: R/lb_plot_lm_bands.R
lb_plot_lm_bandsf | R Documentation |
Creates a plot object of a fitted linear model with confidence bands and a loess smoother based on a formula
lb_plot_lm_bandsf( formula, data, band_type = "whbands", level = 0.95, smoother = "None" )
formula |
a formula object to be fit by a linear model |
data |
a data frame with the variables in the formula |
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 |
smoother |
any of the accepted methods for the ggplot2::geom_smooth() should be in quotes unless the desired option is NULL |
a ggplot2 object with the points, the fitted line, the confidence bands and a loess smoother
lb_plot_lm_bandsf(mpg ~ wt, data = mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.