powered by
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.
univariate_average_premium( df, x, premium, exposure, nclaims = NULL, severity = NULL )
data.frame with insurance portfolio
column in df with risk factor
df
column in df with premium (default is NULL)
column in df with exposure
column in df with number of claims
column in df with severity (default is NULL)
An list of class univ_lossratio with components
univ_lossratio
data frame with average premium
name of column in df with risk factor
name of column in df with severity
name of column in df with number of claims
name of column in df with exposure
name of column in df with premium
# NOT RUN { univariate_average_premium(MTPL2, x = area, premium = premium, exposure = exposure) # }
Run the code above in your browser using DataLab