Skip to contents

Cumulative distribution of the exceedances of a time series

Usage

mcdf(x, dist = "weibull")

Arguments

x

An NHPP model returned by fit_nhpp()

dist

Name of the distribution. Currently only weibull is implemented.

Value

a numeric vector of length equal to the exceedances of x

See also

Examples

# Fit an NHPP model using the mean as a threshold
nhpp <- fit_nhpp(DataCPSim, tau = 826)

# Compute the cumulative exceedances of the mean
mcdf(nhpp)
#>   [1]   3.738619   9.053361  10.555888  36.180831  36.953736  38.034224
#>   [7]  43.869833  49.508440  56.467001  65.618787  76.474264  85.328884
#>  [13]  86.064271  86.505326  86.652316  87.240128  87.387044  87.974567
#>  [19]  88.708649  89.295659  90.175751  90.469004  91.348429  91.494952
#>  [25]  92.373800  92.666641  93.544840  93.691160  94.276305  94.861238
#>  [31]  95.007438  95.153625  95.592107  95.738242  96.030473  96.322651
#>  [37]  97.052871  97.198876  97.782770  97.928712  99.095789  99.533235
#>  [43]  99.679025  99.824803 100.116322 100.844902 100.990581 101.136248
#>  [49] 101.281903 101.573175 102.155574 102.592245 102.883299 103.319790
#>  [55] 103.465263 104.192449 104.337851 104.628618 104.773985 105.645935
#>  [61] 105.791219 106.662679 107.098253 107.243421 108.114190 108.259278
#>  [67] 108.404355 108.694475 109.129570 109.419577 109.854503 109.999456
#>  [73] 110.289329 110.724054 111.158680 111.448376 111.593207 111.738027
#>  [79] 112.317199 113.040918 113.475019 114.198306 114.487546 114.632150
#>  [85] 115.210459 115.499549 116.366569 116.655491 116.944372 117.377615
#>  [91] 117.810765 118.243821 118.676785 119.109657 119.686676 119.830905
#>  [97] 120.551900 120.696069 120.840228 121.128515 121.704969 122.425313
#> [103] 123.289399 123.433378 123.865259 124.440963 125.160375 125.304228
#> [109] 125.448072 125.591906 125.735730 127.643153 129.549553 130.502371
#> [115] 131.454934 132.407243 133.359299 135.262650 136.213946 137.164991
#> [121] 138.115783 139.066324 140.016613 140.966652 141.916441 142.865979
#> [127] 143.815268 144.764307 146.661639 147.609933 148.557978 149.505776
#> [133] 150.453327 151.400631 152.347688 154.241065 155.187386 156.133461
#> [139] 157.079291 158.024877 158.970219 159.915317 160.860172 161.804784
#> [145] 162.749153 163.693280 164.637165 165.580809 167.467372 168.410292
#> [151] 169.352973 172.179575 173.121297 174.062781 175.004027 175.945035
#> [157] 176.885805 177.826338 178.766633 179.706693 180.646516 181.586103
#> [163] 182.525454 183.464570 184.403451 185.342098 186.280510 187.218688
#> [169] 188.156632 189.094343 190.031821 190.969066 191.906079 192.842859
#> [175] 193.779408 194.715726 195.651812 196.587667 198.458687 199.393851
#> [181] 200.328786 202.197969 203.132217 205.000029 205.933593 206.866929
#> [187] 208.732921 209.665577 210.598007 212.462189 213.393942 214.325470
#> [193] 215.256773 217.118706 218.049337 219.909928 221.769628 222.699144
#> [199] 223.628438 224.557510 225.486361 226.414990 227.343399 228.271586
#> [205] 229.199554 230.127302 231.054829 231.982138 232.909227 233.836097
#> [211] 235.689182 236.615397 237.541395 238.467175 239.392737 240.318083
#> [217] 241.243213 242.168125 243.092822 244.941569 245.865619 246.789454
#> [223] 248.636480 250.482650 251.405415 252.327966 253.250304 254.172429
#> [229] 255.094341 256.937530 257.858807 258.779872 259.700726 260.621369
#> [235] 261.541802 262.462024 263.382036 264.301838 265.221430 266.140813
#> [241] 267.059988 267.978953 268.897709 269.816258 270.734598 271.652731
#> [247] 272.570656 273.488374 274.405885 275.323189 276.240286 277.157178
#> [253] 278.073863 278.990343 279.906617 280.822686 281.738550 282.654209
#> [259] 283.569664 284.484915 285.399962 286.314805 287.229444 288.143880
#> [265] 289.058114 289.972144 290.885973 291.799599 292.713023 293.626245
#> [271] 294.539266 295.452085 296.364704 297.277122 298.189339 299.101356
#> [277] 300.013173 300.924790 301.836208 302.747426 303.658446 304.569266
#> [283] 305.479888 306.390312 307.300537 308.210565 309.120395 310.030027
#> [289] 310.939463 311.848701 312.757743 313.666589 314.575238 315.483691
#> [295] 316.391948 317.300010 318.207877 319.115548 320.023025 320.930307
#> [301] 321.837394 322.744288 323.650988 324.557493 325.463806 326.369925
#> [307] 327.275851 328.181585 329.087126 329.992474 330.897631 331.802595
#> [313] 332.707368 333.611950 334.516340 335.420539 336.324548 337.228366
#> [319] 338.131993 339.035431 339.938678 340.841736 341.744605 342.647284
#> [325] 343.549774 344.452076 345.354189 346.256113 347.157850 348.059398
#> [331] 348.960759 349.861932 350.762918 351.663717 352.564329 353.464755
#> [337] 354.364994 355.265046 356.164913 357.064594 357.964090 358.863400
#> [343] 359.762524 360.661464 361.560220 362.458790 363.357176 364.255379
#> [349] 365.153397 366.051232 366.948883 367.846350 368.743635 369.640737
#> [355] 370.537656 371.434393 372.330947 373.227320 374.123510 375.019519

# Fit an NHPP model using another threshold
nhpp <- fit_nhpp(DataCPSim, tau = 826, threshold = 200)

# Compute the cumulative exceedances of the threshold
mcdf(nhpp)
#>  [1] 12.13302 13.69434 14.39212 14.85568 15.62543 15.70221 16.00897 16.31517
#>  [9] 17.15437 18.21645 18.29206 18.74501 18.89572 19.49727 19.94704 20.17149
#> [17] 20.61952 20.76860 21.06638 22.32630 22.47393