Learn R Programming

insurancerating (version 0.5.2)

univariate_loss_ratio: Univariate loss ratio

Description

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

Usage

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

Arguments

df

data.frame with insurance portfolio

x

column in df with risk factor

severity

column in df with severity (default is NULL)

premium

column in df with premium (default is NULL)

exposure

column in df with exposure

nclaims

column in df with number of claims

Value

An list of class univ_lossratio with components

df

data frame with average loss ratio

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_loss_ratio(MTPL2, x = area, severity = amount, premium = premium)
# }

Run the code above in your browser using DataLab