Learn R Programming

insurancerating (version 0.5.2)

univariate_frequency: Univariate claim frequency

Description

Claim frequency for discrete risk factors in an insurance portfolio. For each level of the risk factor the claim frequency is equal to the ratio between the number of claims and the exposure.

Usage

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

Arguments

df

data.frame with insurance portfolio

x

column in df with risk factor

nclaims

column in df with number of claims

exposure

column in df with exposure

severity

column in df with severity (default is NULL)

premium

column in df with premium (default is NULL)

Value

An list of class univ_freq with components

df

data frame with claim frequency

xvar

name of column in df with risk factor

nclaims

name of column in df with number of claims

exposure

name of column in df with exposure

severity

name of column in df with severity

premium

name of column in df with premium

Examples

Run this code
# NOT RUN {
univariate_frequency(MTPL2, x = area, nclaims = nclaims, exposure = exposure)
# }

Run the code above in your browser using DataLab