Aggregate observed claim, exposure and premium experience for one or more discrete risk factors. The result supports exploratory pricing analysis by showing how portfolio volume and unadjusted actuarial metrics vary across factor levels.
factor_analysis(
data = NULL,
risk_factors = NULL,
claim_amount = NULL,
claim_count = NULL,
exposure = NULL,
premium = NULL,
group_by = NULL,
df = NULL,
x = NULL,
severity = NULL,
nclaims = NULL,
by = NULL
)A data frame with classes "factor_analysis", "univariate" and
"data.frame". It contains the grouping columns, aggregated input columns
and all actuarial measures supported by the supplied inputs. The original
column names are retained for claim amount, claim count, exposure and
premium.
A data frame containing portfolio observations.
Non-empty character vector naming the discrete risk factors to analyse.
Optional character string naming the total claim-amount column.
Optional character string naming the claim-count column.
Optional character string naming the exposure column.
Optional character string naming the premium-amount column.
Optional character vector naming additional grouping variables, such as underwriting year or product segment.
Deprecated argument names. Use data,
risk_factors, claim_amount, claim_count, and group_by instead.
Martin Haringa
Depending on the supplied columns, the function calculates:
frequency = claim_count / exposure;
average_severity = claim_amount / claim_count;
risk_premium = claim_amount / exposure;
loss_ratio = claim_amount / premium;
average_premium = premium / exposure.
Input amount columns are summed before ratios are calculated. A measure is
omitted when its required inputs were not supplied. A zero or missing
denominator produces NA_real_ rather than an infinite value.
These are observed, univariate or stratified portfolio measures. They are not adjusted for correlation between rating factors and should not be interpreted as conditional GLM effects. Differences between levels may reflect portfolio mix, small exposure, claim volatility or changes over time. Claim counts, exposure and stability should therefore be reviewed alongside the ratios.
group_by can be used to compare the same risk-factor pattern across
periods or portfolio segments. autoplot.factor_analysis() provides the
corresponding graphical review. Modelled effects can subsequently be
inspected with rating_table().
Column names are supplied as character strings. Deprecated univariate()
remains available for compatibility with its former interface.
autoplot.factor_analysis(), rating_table(),
add_portfolio_experience()
area_experience <- factor_analysis(
MTPL2,
risk_factors = "area",
claim_amount = "amount",
claim_count = "nclaims",
exposure = "exposure",
premium = "premium"
)
area_experience
autoplot(area_experience, metrics = c("frequency", "risk_premium"))
Run the code above in your browser using DataLab