knitr::opts_chunk$set( collapse = TRUE, comment = "#>", results = "asis", message = FALSE, warning = FALSE ) library(summarytools) library(kableExtra) library(actuar) library(fplot) st_options(plain.ascii = FALSE, style = "rmarkdown")
devtools::load_all() # library(lossrx) data("claims_transactional") data("losses") data("exposures") latest_eval <- losses |> dplyr::filter(eval_date == max(.data$eval_date)) wc_dat <- latest_eval |> dplyr::filter(coverage == "WC") al_dat <- latest_eval |> dplyr::filter(coverage == "AL")
lossrx
Datasetslossrx
comes with some built in data for example usage, including:
plot_distr( ~ total_incurred | coverage, latest_eval, mod.method = "split" )
Top 10 Rows:
head(losses) |> kable(format = "html", digits = 2) |> kable_styling()
Summary:
print(dfSummary(losses, varnumbers = FALSE, valid.col = FALSE, graph.magnif = 0.76), method = 'render')
Distribution of Claims
library(fplot) fplot::plot_distr(wc_dat$total_incurred) plot_distr(~ total_incurred | cause, wc_dat, cumul = TRUE)
plot_lines( total_incurred ~ program_year, losses )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.