exp_stats {actxps}R Documentation

Summarize experience study records


Create a summary data frame of termination experience for a given target status.


  target_status = attr(.data, "target_status"),
  col_exposure = "exposure",
  col_status = "status",
  wt = NULL,
  credibility = FALSE,
  conf_level = 0.95,
  cred_r = 0.05,
  conf_int = FALSE

## S3 method for class 'exp_df'
summary(object, ...)



A data frame with exposure-level records, ideally of type exposed_df


A character vector of target status values


A character vector containing column names in .data with expected values


Name of the column in .data containing exposures


Name of the column in .data containing the policy status


Optional. Length 1 character vector. Name of the column in .data containing weights to use in the calculation of claims, exposures, partial credibility, and confidence intervals.


If TRUE, the output will include partial credibility weights and credibility-weighted termination rates.


Confidence level used for the Limited Fluctuation credibility method and confidence intervals


Error tolerance under the Limited Fluctuation credibility method


If TRUE, the output will include confidence intervals around the observed termination rates and any actual-to-expected ratios.


An exp_df object


Groups to retain after summary() is called


If .data is grouped, the resulting data frame will contain one row per group.

If target_status isn't provided, exp_stats() will use the same target status from .data if it has the class exposed_df. Otherwise, all status values except the first level will be assumed. This will produce a warning message.


A tibble with class exp_df, tbl_df, tbl, and data.frame. The results include columns for any grouping variables, claims, exposures, and observed termination rates (q_obs).

Expected values

The expected argument is optional. If provided, this argument must be a character vector with values corresponding to columns in .data containing expected experience. More than one expected basis can be provided.


If credibility is set to TRUE, the output will contain a credibility column equal to the partial credibility estimate under the Limited Fluctuation credibility method (also known as Classical Credibility) assuming a binomial distribution of claims.

Confidence intervals

If conf_int is set to TRUE, the output will contain lower and upper confidence interval limits for the observed termination rate and any actual-to-expected ratios. The confidence level is dictated by conf_level. If no weighting variable is passed to wt, confidence intervals will be constructed assuming a binomial distribution of claims. Otherwise, confidence intervals will be calculated assuming that the aggregate claims distribution is normal with a mean equal to observed claims and a variance equal to:

Var(S) = E(N) * Var(X) + E(X)^2 * Var(N),

Where S is the aggregate claim random variable, X is the weighting variable assumed to follow a normal distribution, and N is a binomial random variable for the number of claims.

If credibility is TRUE and expected values are passed to expected, the output will also contain confidence intervals for any credibility-weighted termination rates.

summary() Method

Applying summary() to a exp_df object will re-summarize the data while retaining any grouping variables passed to the "dots" (...).


Herzog, Thomas (1999). Introduction to Credibility Theory


toy_census |> expose("2022-12-31", target_status = "Surrender") |>

exp_res <- census_dat |>
           expose("2019-12-31", target_status = "Surrender") |>
           group_by(pol_yr, inc_guar) |>

summary(exp_res, inc_guar)

[Package actxps version 1.4.0 Index]