powered by
Takes an object produced by univariate_loss_ratio(), and plots the loss ratio.
univariate_loss_ratio()
# S3 method for univ_lossratio autoplot( x, background = TRUE, labels = TRUE, sort = FALSE, dec.mark = ",", color = "dodgerblue", color_bg = "#E7B800" )
univ_lossratio object produced by univariate_loss_ratio()
show exposure as a histogram (default is TRUE)
show labels with the exposure (default is TRUE)
sort (or order) risk factor into descending order by exposure (default is FALSE)
control the format of the decimal point, as well as the mark between intervals before the decimal point, choose either "," (default) or "."
change the color of the points and line ("dodgerblue" is default)
change the color of the histogram ("#E7B800" is default)
a ggplot2 object
# NOT RUN { library(ggplot2) x <- univariate_loss_ratio(MTPL2, x = area, severity = amount, premium = premium) autoplot(x) # }
Run the code above in your browser using DataLab