Learn R Programming

insurancerating (version 0.5.2)

univariate_risk_premium: Univariate risk premium

Description

Risk premium for discrete risk factors in an insurance portfolio. For each level of the risk factor the risk premium is equal to the ratio between the severity and the exposure.

Usage

univariate_risk_premium(
  df,
  x,
  severity,
  exposure,
  nclaims = NULL,
  premium = NULL
)

Arguments

df

data.frame with insurance portfolio

x

column in df with risk factor

severity

column in df with severity (default is NULL)

exposure

column in df with exposure

nclaims

column in df with number of claims

premium

column in df with premium (default is NULL)

Value

An list of class univ_freq with components

df

data frame with risk premium

xvar

name of column in df with risk factor

severity

name of column in df with severity

nclaims

name of column in df with number of claims

exposure

name of column in df with exposure

premium

name of column in df with premium

Examples

Run this code
# NOT RUN {
univariate_risk_premium(MTPL2, x = area, severity = amount, exposure = exposure)
# }

Run the code above in your browser using DataLab