Learn R Programming

insurancerating (version 0.8.2)

Actuarial Tools for Insurance Pricing Models

Description

Provides actuarial tools and building blocks for analysing, modelling, refining, and validating insurance rating models. Designed to support common GLM-based pricing tasks and the translation of statistical model output into practical tariff structures. The package supports the construction of insurance tariff classes using a data-driven approach, based on the methodology of Antonio and Valdez (2012) .

Copy Link

Version

Install

install.packages('insurancerating')

Monthly Downloads

362

Version

0.8.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin Haringa

Last Published

September 1st, 2026

Functions in insurancerating (0.8.2)

add_tariff_segments

Add derived tariff segments to portfolio data
autoplot.bootstrap_performance

Plot the resampled performance distribution
autoplot.factor_analysis

Plot observed portfolio experience by risk factor
as_gt.refinement_audit

Present a refinement audit as a gt table
autoplot.check_residuals

Inspect simulation-based residual uniformity
assess_excess_threshold

Assess possible excess-loss thresholds
audit_refinement

Audit the effect of a fitted model refinement
as_gt

Convert an object to a gt table
autoplot.rating_refinement

Inspect a model refinement step
add_smoothing

Smooth grouped tariff relativities in a refinement workflow
calibrate_model

Calibrate the overall level of a refined pricing model
check_overdispersion

Check overdispersion of a Poisson claim frequency model
bootstrap_rmse

Deprecated alias for bootstrap_performance()
bootstrap_performance

Assess performance stability under repeated resampling
autoplot.tariff_segments

Inspect smooth risk-factor effects and tariff-segment boundaries
autoplot.rating_table

Compare fitted risk-factor effects graphically
bootstrap_coefficients

Assess GLM coefficient stability by portfolio-row bootstrap
autoplot.truncated_severity

Plot a fitted truncated severity distribution
biggest_reference

Deprecated alias for set_reference_level()
$.rating_table

Backward-compatible access to rating-table contents
extract_model_data

Recover the portfolio data used by a fitted model
derive_tariff_segments

Derive candidate tariff segments from a smooth risk-factor effect
default_extrapolation_break_size

Default extrapolation break size based on existing tariff breaks
fisher_classify

Fisher's natural breaks classification
check_residuals

Check simulation-based model residuals
edit_smoothing

Edit a smoothing curve in a refinement workflow
factor_analysis

Summarise observed portfolio experience by risk factor
construct_model_points

Deprecated alias for rating_grid()
fisher

Deprecated alias for fisher_classify()
construct_tariff_classes

Deprecated alias for derive_tariff_segments()
histbin

Deprecated alias for outlier_histogram()
model_performance

Compare fitted GLMs using common performance measures
merge_date_ranges_db

Merge connected portfolio periods in DuckDB
outlier_histogram

Portfolio histogram with tail bins
merge_date_ranges

Reduce portfolio periods by merging adjacent date ranges
fit_truncated_severity

Fit severity distributions to truncated claim data
make_stars

Convert p-values into significance stars
fit_gam

Deprecated NSE wrapper for risk_factor_gam()
model_data

Deprecated alias for extract_model_data()
fit_truncated_dist

Deprecated alias for fit_truncated_severity()
rating_table

Present fitted pricing-model effects as a rating table
rating_factors

Deprecated alias for rating_table()
rating_grid_db

Reduce a database portfolio to observed rating-grid points
plot_severity_distribution

Exploratory severity diagnostics by category
premium_change

Interpret the premium effect of a smoothing curve
redistribute_excess_loss

Redistribute large losses for severity or risk-premium modelling
prepare_refinement

Prepare a model refinement workflow
rating_grid

Construct observed rating-grid points
rating_factors2

Deprecated single-model rating table helper
period_to_months

Deprecated alias for split_periods_to_months()
rlnormt

Simulate severities from a truncated lognormal distribution
riskfactor_gam

Deprecated alias for risk_factor_gam()
relativity_specification

Define sublevel relativity specifications
refit

Fit a prepared refinement specification
rgammat

Simulate severities from a truncated gamma distribution
risk_factor_gam

Estimate a smooth effect for a continuous risk factor
reduce

Deprecated alias for merge_date_ranges()
reexports

Objects exported from other packages
restrict_coef

Deprecated restriction helper
refit_glm

Deprecated refit wrapper
set_reference_level

Set the reference level of a factor
scale_second_axis

Scale secondary axis for background plotting
split_periods_to_months

Split portfolio periods into calendar months
rmse

Calculate response-scale prediction error
split_relativities

Deprecated low-level relativity constructor
summary.excess_redistribution

Summarise redistributed large-loss experience
summary.bootstrap_coefficients

Summarise bootstrap coefficient stability
rows_per_date

Deprecated alias for active_rows_by_date()
smooth_coef

Deprecated smoothing helper
summary.rating_refinement

Summarise a prepared refinement specification
summary.refinement_audit

Summarise a refinement audit
univariate

Deprecated alias for factor_analysis()
summary.tariff_segments

Summarise candidate tariff segments
update_glm

Deprecated alias for refit_glm()
update_formula_add

Create new offset-term and new formula
add_restriction

Add coefficient restrictions to a refinement workflow
active_rows_by_date

Match event dates to active portfolio periods
add_shrinkage

Shrink categorical tariff relativities towards a common level
add_rebasing

Rebase categorical tariff relativities to a reference level
add_relativities

Add sublevel relativities to a refinement workflow
add_observed_experience

Deprecated alias for add_portfolio_experience()
MTPL2

Motor Third Party Liability (MTPL) portfolio (3,000 policyholders)
add_portfolio_experience

Add portfolio experience to a rating table
add_prediction

Add model predictions to a pricing data set
MTPL

Motor Third Party Liability (MTPL) portfolio