Learn R Programming

insurancerating (version 0.5.2)

univariate_average_premium: Univariate average premium

Description

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

Usage

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

Arguments

df

data.frame with insurance portfolio

x

column in df with risk factor

premium

column in df with premium (default is NULL)

exposure

column in df with exposure

nclaims

column in df with number of claims

severity

column in df with severity (default is NULL)

Value

An list of class univ_lossratio with components

df

data frame with average 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_average_premium(MTPL2, x = area, premium = premium, exposure = exposure)
# }

Run the code above in your browser using DataLab