You are on page 1of 23

Statistical

Modeling of
Loss
Distributions
Using
actuar

Vincent
Goulet
Statistical Modeling of Loss
Probability
Distributions Using actuar
Laws

Grouped
Data

Minimum
Vincent Goulet
Distance
Estimation
École d’actuariat, Université Laval
Censored
Data Québec, Canada
actuar

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
Goulet Provides additional Actuarial Science
Probability
functionality to R
Laws
Current version covers
Grouped
Data Loss distribution modeling
Minimum Risk theory (including ruin theory)
Distance
Estimation
Simulation of compound hierarchical models
Censored
Credibility theory
Data
Summary

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
1 Probability Laws
Goulet

Probability
Laws 2 Grouped Data
Grouped
Data

Minimum
Distance 3 Minimum Distance Estimation
Estimation

Censored
Data
4 Censored Data
Summary

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
1 Probability Laws
Goulet

Probability
Laws
2 Grouped Data
Grouped
Data
3 Minimum Distance Estimation
Minimum
Distance
Estimation

Censored
4 Censored Data
Data
At a Glance

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
Goulet

Probability
Support for 18 probability laws not in base R
Laws
Mostly positive, heavy tail distributions
Grouped
Data New utility functions in addition to dfoo, pfoo,
Minimum
Distance
qfoo, rfoo
Estimation

Censored
Data
Supported Distributions

Statistical
Modeling of
Loss
Distributions
Using
actuar
Transformed Beta Family
Vincent
Goulet 9 special cases (including Burr and Pareto)
Probability Transformed Gamma Family
Laws
5 special cases (including inverse distributions)
Grouped
Data Loggamma
Minimum
Distance Single parameter Pareto
Estimation

Censored Generalized Beta


Data
Phase-type distributions
New Utility Functions

Statistical
Modeling of
Loss
mfoo to compute theoretical raw moments
Distributions
Using
actuar mk = E[X k ]
Vincent
Goulet
levfoo to compute theoretical limited moments
Probability

E[(X ∧ )k ] = E[min(X, )k ]


Laws

Grouped
Data

Minimum mgffoo to compute the moment generating


Distance
Estimation function
Censored MX (t) = E[etX ]
Data

when it exists
Also support for: beta, exponential, chi-square,
gamma, lognormal, normal (no lev), uniform,
Weibull, inverse Gaussian
New Utility Functions

Statistical
Modeling of
Loss
mfoo to compute theoretical raw moments
Distributions
Using
actuar mk = E[X k ]
Vincent
Goulet
levfoo to compute theoretical limited moments
Probability

E[(X ∧ )k ] = E[min(X, )k ]


Laws

Grouped
Data

Minimum mgffoo to compute the moment generating


Distance
Estimation function
Censored MX (t) = E[etX ]
Data

when it exists
Also support for: beta, exponential, chi-square,
gamma, lognormal, normal (no lev), uniform,
Weibull, inverse Gaussian
Summary

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
1 Probability Laws
Goulet

Probability
Laws
2 Grouped Data
Grouped
Data
3 Minimum Distance Estimation
Minimum
Distance
Estimation

Censored
4 Censored Data
Data
Definition and Rationale

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent Data presented in an interval-frequency manner:


Goulet
Group Line 1 Line 2
Probability
Laws
(0, 25] 30 26
Grouped
Data (25, 50] 31 33
Minimum (50, 100] 57 31
Distance
Estimation
Need for a “standard” storage method
Censored
Data
Useful for minimum distance estimation
Creation and Manipulation of Objects

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent > x <- grouped.data(Group = c(0, 25,


Goulet
+ 50, 100), Line.1 = c(30, 31, 57),
Probability + Line.2 = c(26, 33, 31))
Laws

Grouped
> x
Data

Minimum
Group Line.1 Line.2
Distance
Estimation
1 (0, 25] 30 26
Censored
2 (25, 50] 31 33
Data
3 (50, 100] 57 31
Calculation of Empirical Moments

Statistical
Modeling of
Loss
Distributions
Using
actuar
> mean(x)
Vincent
Goulet
Line.1 Line.2
49.25847 43.19444
Probability
Laws
> emm(x, 2)
Grouped
Data
Line.1 Line.2
Minimum
Distance 3253.884 2604.167
Estimation

Censored > E <- elev(x[, -3])


Data
> E(c(25, 50))
[1] 21.82203 37.18220
Plot of the Histogram and Ogive

Statistical
Modeling of
Loss
Distributions
Using
actuar
> hist(x[, -3]) > plot(ogive(x[, -3]))
Vincent
Goulet
Histogram of x[, −3] ogive(x[, −3])

Probability

1.0

Laws
0.008

0.8
Grouped

0.6
Density

F(x)
Data ●
0.004

0.4
Minimum ●

0.2
Distance
0.000

0.0
Estimation ●

0 20 40 60 80 100 0 20 40 60 80 100
Censored
Data x[, −3] x
Summary

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
1 Probability Laws
Goulet

Probability
Laws
2 Grouped Data
Grouped
Data
3 Minimum Distance Estimation
Minimum
Distance
Estimation

Censored
4 Censored Data
Data
mde() Supports Three Distance Measures

Statistical
Modeling of 1 Cramér-von Mises
Loss
Distributions
Using
n
X
actuar
d(θ) = j [F(j ; θ) − Fn (j ; θ)]2
Vincent
Goulet j=1

Probability 2 Modified chi-square


Laws

Grouped r
X
d(θ) = j [n(F(cj ; θ) − F(cj−1 ; θ)) − nj ]2 ,
Data

Minimum
Distance j=1
Estimation

Censored 3 Layer average severity


Data
r
X
d(θ) = ˜ n (cj−1 , cj ; θ)]2 ,
j [LAS(cj−1 , cj ; θ) − LAS
j=1

where LAS(, y) = E[min(X, y)] − E[min(X, )]


mde() Supports Three Distance Measures

Statistical
Modeling of 1 Cramér-von Mises
Loss
Distributions
Using
n
X
actuar
d(θ) = j [F(j ; θ) − Fn (j ; θ)]2
Vincent
Goulet j=1

Probability 2 Modified chi-square


Laws

Grouped r
X
d(θ) = j [n(F(cj ; θ) − F(cj−1 ; θ)) − nj ]2 ,
Data

Minimum
Distance j=1
Estimation

Censored 3 Layer average severity


Data
r
X
d(θ) = ˜ n (cj−1 , cj ; θ)]2 ,
j [LAS(cj−1 , cj ; θ) − LAS
j=1

where LAS(, y) = E[min(X, y)] − E[min(X, )]


mde() Supports Three Distance Measures

Statistical
Modeling of 1 Cramér-von Mises
Loss
Distributions
Using
n
X
actuar
d(θ) = j [F(j ; θ) − Fn (j ; θ)]2
Vincent
Goulet j=1

Probability 2 Modified chi-square


Laws

Grouped r
X
d(θ) = j [n(F(cj ; θ) − F(cj−1 ; θ)) − nj ]2 ,
Data

Minimum
Distance j=1
Estimation

Censored 3 Layer average severity


Data
r
X
d(θ) = ˜ n (cj−1 , cj ; θ)]2 ,
j [LAS(cj−1 , cj ; θ) − LAS
j=1

where LAS(, y) = E[min(X, y)] − E[min(X, )]


Summary

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
1 Probability Laws
Goulet

Probability
Laws
2 Grouped Data
Grouped
Data
3 Minimum Distance Estimation
Minimum
Distance
Estimation

Censored
4 Censored Data
Data
Context

Statistical
Modeling of
Loss Common in statistical and actuarial applications
Distributions
Using to work with censored data
actuar

Vincent Actuarial terminology:


Goulet
left censoring ⇔ (ordinary) deductible
Probability
Laws
right censoring ⇔ policy limit
Grouped Left Censoring Right Censoring

0.12
Data

Minimum

0.10
0.12

Distance
Estimation 0.08 ●

Censored
0.08

0.06

Data
0.04
0.04

0.02
0.00
0.00

0 5 10 15 0 5 10 15
A Different Approach

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
Goulet
Package survival has extensive support for
censored distributions
Probability
Laws Our approach is different
Grouped
Data coverage() returns pdf or cdf of censored
Minimum distribution (with many options)
Distance
Estimation function can be used in fitting as usual
Censored
Data
(fitdistr(), mde(), ...)
Example With Left and Right Censoring

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
Goulet
> f <- coverage(pdf = dgamma, cdf = pgamma,
+ deductible = 1, limit = 10)
Probability
Laws
> fitdistr(y, f, start = list(shape = 2,
Grouped
Data + rate = 0.5))
Minimum
Distance shape rate
Estimation
4.5822202 0.8634705
Censored
Data (0.7672822) (0.1518537)
Example With Left and Right Censoring

Statistical
Modeling of
Loss
Distributions
Using
actuar

Vincent
Goulet
> f <- coverage(pdf = dgamma, cdf = pgamma,
+ deductible = 1, limit = 10)
Probability
Laws
> fitdistr(y, f, start = list(shape = 2,
Grouped
Data + rate = 0.5))
Minimum
Distance shape rate
Estimation
4.5822202 0.8634705
Censored
Data (0.7672822) (0.1518537)
More Information

Statistical
Modeling of
Loss
Distributions Project’s web site
Using
actuar http://www.actuar-project.org
Vincent
Goulet
Package vignettes
Probability
Laws actuar Introduction to actuar
Grouped
Data
coverage Complete formulas used by
Minimum
coverage
Distance
Estimation
credibility Risk theory features
Censored lossdist Loss distributions modeling
Data
features
risk Risk theory features

Demo files

You might also like