Skip to contents

A collection of common metrics used in an actuarial environment are provided. Two versions of each metric functions have been developed: one where it takes a measure set for an experience study as its primary argument, and one where vectors can be provided instead.

Usage

avg_observed(measure_set, ...)

avg_observed_vec(actuals, exposures, ...)

avg_expected(measure_set, ...)

avg_expected_vec(expecteds, exposures, ...)

ci_fctr(measure_set, se_conf = 0.95, two_tailed = TRUE, ...)

ci_fctr_vec(exposures, variances, se_conf = 0.95, two_tailed = TRUE, ...)

ae_ratio(measure_set, ...)

ae_ratio_vec(actuals, expecteds, ...)

credibility(measure_set, distance_from_mean = 0.05, cred_conf = 0.95, ...)

credibility_vec(
  expecteds,
  variances,
  distance_from_mean = 0.05,
  cred_conf = 0.95,
  ...
)

Arguments

measure_set

A named character vector or list with each element mapping a column in the experience study to one of the following measures: actuals, expecteds, exposures, or variances.

...

Not used directly and be left blank.

actuals, expecteds, exposures, variances

Columns in experience study that correspond to individual measures for vector versions of metric functions.

se_conf

A number between 0 and 1 corresponding to the confidence level surrounding the standard error calculation.

two_tailed

A boolean indicating whether or not a two-tailed hypothesis test should be utilized.

distance_from_mean

A number between 0 and 1 representing the precision of the credibility estimate.

cred_conf

A number between 0 and 1 corresponding to the confidence level surrounding the credibility calculation.

Value

Measure set versions return a (quosure)rlang::quo() to be evaluated in mutate_metrics(). Vector versions numeric vector of the same length of measures used in the calculation per group (if grouping applied).

Details

Metric functions that use a measure set as its primary argument are intended to be used with mutate_metrics() and return a (quosure)rlang::quo(). Use the vector versions (those ending in _vec) if instead a numeric vector result is desired.

Functions

  • avg_observed(): Calculates the average actual decrements observed per unit of exposure.

  • avg_expected(): Calculates the average expected decrements per unit of exposure.

  • ci_fctr(): Calculates the additive factor which constructs a confidence interval around the expected decrement rate for a given level of confidence.

  • ae_ratio(): Calculates the ratio of actual decrements to expected decrements, also referred to as the AE ratio.

  • credibility(): Calculates the credibility score according to limited fluctuation credibility theory.