View source: R/model_refinement_plot.R
| autoplot.rating_refinement | R Documentation |
Takes a rating_refinement object and plots one refinement step before
refit() is called. This is useful for checking whether manual tariff
restrictions, smoothing or expert-based relativities behave as intended
before they are used in a refined pricing model.
For objects produced by add_relativities(), original levels that are split
into new levels are removed from the connected original line and from the
x-axis. Instead, the original level is shown as a horizontal blue segment
spanning all child categories, with the original level label centred above
the segment.
## S3 method for class 'rating_refinement'
autoplot(
object,
variable = NULL,
step = NULL,
x_max = NULL,
y_max = NULL,
remove_underscores = FALSE,
rotate_angle = NULL,
custom_theme = NULL,
...
)
object |
Object of class |
variable |
Optional character string specifying the risk factor to plot.
If |
step |
Optional integer specifying which refinement step to plot.
This is mainly relevant when multiple refinement steps have been applied
(e.g. multiple calls to
This makes it possible to inspect intermediate refinement stages before
calling |
x_max |
Optional single finite numeric value. Maximum value displayed on
the x-axis of a smoothing plot. This changes only the visible plotting
range; it does not remove observations, alter the fitted smoothing curve or
affect |
y_max |
Optional single finite numeric value. Maximum relativity
displayed on the y-axis of a smoothing plot. Like |
remove_underscores |
Logical; if |
rotate_angle |
Optional numeric value for the angle of x-axis labels. |
custom_theme |
Optional list passed to |
... |
Additional plotting arguments passed to ggplot2 geoms. |
A ggplot2 object.
Martin Haringa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.