View source: R/gam_construct_tariff_classes.R
| autoplot.tariff_segments | R Documentation |
autoplot() method for objects created by derive_tariff_segments().
Produces a ggplot2::ggplot() of the fitted GAM together with the derived
tariff segment boundaries. Optionally, confidence intervals and observed data
points
can be added.
## S3 method for class 'tariff_segments'
autoplot(
object,
confidence = FALSE,
color_gam = "steelblue",
show_observations = FALSE,
color_splits = "grey50",
size_points = 1,
color_points = "black",
rotate_labels = FALSE,
remove_outliers = NULL,
conf_int = NULL,
...
)
object |
An object of class |
confidence |
Logical, whether to plot 95% confidence intervals.
Default = |
color_gam |
Color of the fitted GAM line. Default = |
show_observations |
Logical, whether to add observed data points for each
level of the risk factor. Default = |
color_splits |
Color of the vertical split lines. Default = |
size_points |
Numeric, size of points if |
color_points |
Color of observed points. Default = |
rotate_labels |
Logical, whether to rotate x-axis labels by 45 degrees.
Default = |
remove_outliers |
Numeric, exclude observations above this value from
the plot (helps with extreme outliers). Default = |
conf_int |
Deprecated. Use |
... |
Additional arguments passed to |
A ggplot2::ggplot object.
Martin Haringa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.