Description Usage Arguments Value References Examples
Function to calculate the total losses via the Panjer recursion.
1 |
ELT |
Data frame containing two numeric columns. The column |
s |
Scalar or numeric vector containing the total losses of interest. |
t |
Scalar representing the time period of interest. The default value is |
theta |
Scalar containing information about the variance of the Gamma distribution: sd[X] = x * |
cap |
Scalar representing the financial cap on losses for a single event, i.e. the maximum possible loss caused by a single event. The default value is |
nq |
Scalar, number of quantiles added when |
verbose |
A logical, if |
A numeric matrix containing the pre-specified losses s
in the first column and the exceedance probabilities in the second column.
Panjer, H.H. (1980), ‘The aggregate claims distribution and stop-loss reinsurance,’ Transactions of the Society of Actuaries, 32, 523-545.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data(UShurricane)
# Compress the table to millions of dollars
USh.m <- compressELT(ELT(UShurricane), digits = -6)
EPC.Panjer <- fPanjer(USh.m, s = 1:40, verbose = TRUE)
EPC.Panjer
plot(EPC.Panjer, type = "l", ylim = c(0,1))
# Assuming the losses follow a Gamma with E[X] = x, and Var[X] = 2 * x and cap = 5m
EPC.Panjer.Gamma <- fPanjer(USh.m, s = 1:40, theta = 2, cap = 5, verbose = TRUE)
EPC.Panjer.Gamma
plot(EPC.Panjer.Gamma, type = "l", ylim = c(0,1))
# Compare the two results:
plot(EPC.Panjer, type = "l", main = 'Exceedance Probability Curve',
ylim = c(0, 1))
lines(EPC.Panjer.Gamma, col = 2, lty = 2)
legend("topright", c("Dirac Delta", expression(paste("Gamma(",
alpha[i] == 1 / theta^2, ", ", beta[i] ==1 / (x[i] * theta^2), ")", " cap =", 5))),
lwd = 2, lty = 1:2, col = 1:2)
|
Loading required package: MASS
s Pr[S>=s]
[1,] 1 0.9489108550
[2,] 2 0.8594287811
[3,] 3 0.7477449503
[4,] 4 0.6334183244
[5,] 5 0.5253521622
[6,] 6 0.4307337185
[7,] 7 0.3510849510
[8,] 8 0.2860437103
[9,] 9 0.2337385382
[10,] 10 0.1921291964
[11,] 11 0.1582239146
[12,] 12 0.1305722769
[13,] 13 0.1075865020
[14,] 14 0.0887456243
[15,] 15 0.0734744550
[16,] 16 0.0609800050
[17,] 17 0.0501791361
[18,] 18 0.0407901389
[19,] 19 0.0327461999
[20,] 20 0.0260247522
[21,] 21 0.0205103060
[22,] 22 0.0160799222
[23,] 23 0.0125654326
[24,] 24 0.0098119809
[25,] 25 0.0076688773
[26,] 26 0.0060055041
[27,] 27 0.0047061870
[28,] 28 0.0036872862
[29,] 29 0.0028841632
[30,] 30 0.0022541658
[31,] 31 0.0017623862
[32,] 32 0.0013775596
[33,] 33 0.0010730422
[34,] 34 0.0008315485
[35,] 35 0.0006408943
[36,] 36 0.0004916184
[37,] 37 0.0003756169
[38,] 38 0.0002861869
[39,] 39 0.0002176375
[40,] 40 0.0001653850
attr(,"PMF")
s Pr[S=s]
[1,] 0 5.108915e-02
[2,] 1 8.948207e-02
[3,] 2 1.116838e-01
[4,] 3 1.143266e-01
[5,] 4 1.080662e-01
[6,] 5 9.461844e-02
[7,] 6 7.964877e-02
[8,] 7 6.504124e-02
[9,] 8 5.230517e-02
[10,] 9 4.160934e-02
[11,] 10 3.390528e-02
[12,] 11 2.765164e-02
[13,] 12 2.298577e-02
[14,] 13 1.884088e-02
[15,] 14 1.527117e-02
[16,] 15 1.249445e-02
[17,] 16 1.080087e-02
[18,] 17 9.388997e-03
[19,] 18 8.043939e-03
[20,] 19 6.721448e-03
[21,] 20 5.514446e-03
[22,] 21 4.430384e-03
[23,] 22 3.514490e-03
[24,] 23 2.753452e-03
[25,] 24 2.143104e-03
[26,] 25 1.663373e-03
[27,] 26 1.299317e-03
[28,] 27 1.018901e-03
[29,] 28 8.031229e-04
[30,] 29 6.299974e-04
[31,] 30 4.917796e-04
[32,] 31 3.848267e-04
[33,] 32 3.045173e-04
[34,] 33 2.414937e-04
[35,] 34 1.906542e-04
[36,] 35 1.492760e-04
[37,] 36 1.160015e-04
[38,] 37 8.942994e-05
[39,] 38 6.854938e-05
[40,] 39 5.225251e-05
[41,] 40 3.969696e-05
s Pr[S>=s]
[1,] 1 7.369430e-01
[2,] 2 5.943893e-01
[3,] 3 4.798564e-01
[4,] 4 4.230495e-01
[5,] 5 3.721764e-01
[6,] 6 2.468037e-01
[7,] 7 1.773231e-01
[8,] 8 1.266214e-01
[9,] 9 1.007523e-01
[10,] 10 7.942863e-02
[11,] 11 4.976469e-02
[12,] 12 3.320421e-02
[13,] 13 2.198388e-02
[14,] 14 1.615765e-02
[15,] 15 1.168322e-02
[16,] 16 7.038365e-03
[17,] 17 4.449880e-03
[18,] 18 2.795941e-03
[19,] 19 1.928753e-03
[20,] 20 1.302207e-03
[21,] 21 7.606284e-04
[22,] 22 4.610047e-04
[23,] 23 2.784010e-04
[24,] 24 1.822821e-04
[25,] 25 1.164294e-04
[26,] 26 6.625475e-05
[27,] 27 3.878696e-05
[28,] 28 2.268548e-05
[29,] 29 1.421261e-05
[30,] 30 8.672057e-06
[31,] 31 4.822902e-06
[32,] 32 2.741643e-06
[33,] 33 1.560696e-06
[34,] 34 9.413792e-07
[35,] 35 5.527349e-07
[36,] 36 3.011141e-07
[37,] 37 1.668642e-07
[38,] 38 9.276950e-08
[39,] 39 5.413200e-08
[40,] 40 3.075713e-08
attr(,"PMF")
s Pr[S=s]
[1,] 0 2.630570e-01
[2,] 1 1.425537e-01
[3,] 2 1.145329e-01
[4,] 3 5.680693e-02
[5,] 4 5.087315e-02
[6,] 5 1.253727e-01
[7,] 6 6.948061e-02
[8,] 7 5.070167e-02
[9,] 8 2.586909e-02
[10,] 9 2.132368e-02
[11,] 10 2.966394e-02
[12,] 11 1.656048e-02
[13,] 12 1.122032e-02
[14,] 13 5.826235e-03
[15,] 14 4.474424e-03
[16,] 15 4.644860e-03
[17,] 16 2.588485e-03
[18,] 17 1.653939e-03
[19,] 18 8.671878e-04
[20,] 19 6.265458e-04
[21,] 20 5.415787e-04
[22,] 21 2.996236e-04
[23,] 22 1.826037e-04
[24,] 23 9.611889e-05
[25,] 24 6.585275e-05
[26,] 25 5.017463e-05
[27,] 26 2.746779e-05
[28,] 27 1.610148e-05
[29,] 28 8.472870e-06
[30,] 29 5.540551e-06
[31,] 30 3.849156e-06
[32,] 31 2.081259e-06
[33,] 32 1.180946e-06
[34,] 33 6.193172e-07
[35,] 34 3.886443e-07
[36,] 35 2.516208e-07
[37,] 36 1.342499e-07
[38,] 37 7.409471e-08
[39,] 38 3.863750e-08
[40,] 39 2.337487e-08
[41,] 40 1.431477e-08
attr(,"ELT")
ID Rate Loss
1 1 0.54191196 1
2 2 0.28855760 2
3 3 0.03305258 3
4 4 0.08788428 4
5 5 0.38397824 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.