Description Usage Arguments Details Value Examples
Function to bound the total losses via the Markov inequality.
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 |
Cantelli's inequality states:
Pr( S ≥ s) ≤ E[S]/s,
A numeric matrix, containing the pre-specified losses s
in the first column and the upper bound for the exceedance probabilities in the second column.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(UShurricane)
# Compress the table to millions of dollars
USh.m <- compressELT(ELT(UShurricane), digits = -6)
EPC.Markov <- fMarkov(USh.m, s = 1:40)
plot(EPC.Markov, type = "l", ylim = c(0, 1))
# Assuming the losses follow a Gamma with E[X] = x, and Var[X] = 2 * x
EPC.Markov.Gamma <- fMarkov(USh.m, s = 1:40, theta = 2, cap = 5)
EPC.Markov.Gamma
plot(EPC.Markov.Gamma, type = "l", ylim = c(0, 1))
# Compare the two results:
plot(EPC.Markov, type = "l", main = "Exceedance Probability Curve", ylim = c(0,1))
lines(EPC.Markov.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
Warning message:
In ES/s :
Recycling array of length 1 in array-vector arithmetic is deprecated.
Use c() or as.vector() instead.
Warning message:
In ES/s :
Recycling array of length 1 in array-vector arithmetic is deprecated.
Use c() or as.vector() instead.
s Upper Pr[S>=s]
[1,] 1 1.00000000
[2,] 2 1.00000000
[3,] 3 1.00000000
[4,] 4 0.86068333
[5,] 5 0.68854667
[6,] 6 0.57378889
[7,] 7 0.49181905
[8,] 8 0.43034167
[9,] 9 0.38252593
[10,] 10 0.34427333
[11,] 11 0.31297576
[12,] 12 0.28689444
[13,] 13 0.26482564
[14,] 14 0.24590952
[15,] 15 0.22951556
[16,] 16 0.21517083
[17,] 17 0.20251373
[18,] 18 0.19126296
[19,] 19 0.18119649
[20,] 20 0.17213667
[21,] 21 0.16393968
[22,] 22 0.15648788
[23,] 23 0.14968406
[24,] 24 0.14344722
[25,] 25 0.13770933
[26,] 26 0.13241282
[27,] 27 0.12750864
[28,] 28 0.12295476
[29,] 29 0.11871494
[30,] 30 0.11475778
[31,] 31 0.11105591
[32,] 32 0.10758542
[33,] 33 0.10432525
[34,] 34 0.10125686
[35,] 35 0.09836381
[36,] 36 0.09563148
[37,] 37 0.09304685
[38,] 38 0.09059825
[39,] 39 0.08827521
[40,] 40 0.08606833
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.