Skip to contents

The generalized R-Pareto process is supported on (loc - scale / shape, Inf) if shape > 0, or (-Inf, loc - scale / shape) for negative shape parameters, conditional on \((X-r(loc))/r(scale)>0\). The standard Pareto process corresponds to scale = loc = rep(1, d).

Usage

rgparp(
  n,
  shape = 1,
  thresh = 1,
  riskf = c("mean", "sum", "site", "max", "min", "l2"),
  siteindex = NULL,
  d,
  loc,
  scale,
  param,
  sigma,
  model = c("log", "neglog", "bilog", "negbilog", "hr", "br", "xstud", "smith",
    "schlather", "ct", "sdir", "dirmix"),
  weights,
  vario,
  coord = NULL,
  ...
)

Arguments

n

number of observations

shape

shape parameter of the generalized Pareto variable

thresh

univariate threshold for the exceedances of risk functional

riskf

string indicating the risk functional.

siteindex

integer between 1 and d specifying the index of the site or variable

d

dimension of sample

loc

location vector

scale

scale vector

param

parameter vector for the logistic, bilogistic, negative bilogistic and extremal Dirichlet (Coles and Tawn) model. Parameter matrix for the Dirichlet mixture. Degree of freedoms for extremal student model. See Details.

sigma

covariance matrix for Brown-Resnick and extremal Student-t distributions. Symmetric matrix of squared coefficients \(\lambda^2\) for the Husler-Reiss model, with zero diagonal elements.

model

for multivariate extreme value distributions, users can choose between 1-parameter logistic and negative logistic, asymmetric logistic and negative logistic, bilogistic, Husler-Reiss, extremal Dirichlet model (Coles and Tawn) or the Dirichlet mixture. Spatial models include the Brown-Resnick, Smith, Schlather and extremal Student max-stable processes.

weights

vector of length m for the m mixture components. Must sum to one

vario

semivariogram function whose first argument must be distance. Used only if provided in conjunction with coord and if sigma is missing

coord

d by k matrix of coordinates, used as input in the variogram vario or as parameter for the Smith model. If grid is TRUE, unique entries should be supplied.

...

additional arguments for the vario function

Value

an n by d sample from the generalized R-Pareto process, with attributes

accept.rate if the procedure uses rejection sampling.

Examples

rgparp(n = 10, riskf = 'site', siteindex = 2, d = 3, param = 2.5,
   model = 'log', scale = c(1, 2, 3), loc = c(2, 3, 4))
#> Warning: longer object length is not a multiple of shorter object length
#>       [,1] [,2] [,3]
#>  [1,]    1    1    1
#>  [2,]    1    1    1
#>  [3,]    1    1    1
#>  [4,]    1    1    1
#>  [5,]    1    1    1
#>  [6,]    1    1    1
#>  [7,]    1    1    1
#>  [8,]    1    1    1
#>  [9,]    1    1    1
#> [10,]    1    1    1
#> attr(,"accept.rate")
#> [1] 1
rgparp(n = 10, riskf = 'max', d = 4, param = c(0.2, 0.1, 0.9, 0.5),
   scale = 1:4, loc = 1:4, model = 'bilog')
#>               [,1]         [,2]        [,3]         [,4]
#>  [1,] 0.0006178841  0.001685128  9.29815316  0.001798982
#>  [2,] 1.0336443059  1.638952959  3.82220506  2.824784843
#>  [3,] 0.3463753792  0.436664009  0.12161582  1.658228783
#>  [4,] 0.3681898038  1.003803544  0.76459068  1.177343941
#>  [5,] 1.6591443934  2.141095273  0.65556079  3.003799661
#>  [6,] 0.4147096140  1.076215146  0.23639320  1.739773536
#>  [7,] 1.0603637236  1.990356848  0.40652762  3.699056361
#>  [8,] 0.1246372190  0.235534601  0.08492149  2.333862118
#>  [9,] 7.4561392330 18.642215340 73.04767832 20.004289236
#> [10,] 0.5584019012  1.492700141  1.76092295  1.870341412
#> attr(,"accept.rate")
#> [1] 0.4137931
rgparp(n = 10, riskf = 'sum', d = 3, param = c(0.8, 1.2, 0.6, -0.5),
   scale = 1:3, loc = 1:3, model = 'sdir')
#>               [,1]        [,2]         [,3]
#>  [1,]  4.790862312  0.01032648 2.193012e-03
#>  [2,]  0.009859696  0.03745091 9.635744e+00
#>  [3,] 12.936481605  6.14352004 1.363821e+00
#>  [4,]  0.181337733  0.39745850 3.721127e+01
#>  [5,]  2.200792027  0.92473635 1.869372e+00
#>  [6,]  0.751530870  4.18018890 9.843943e-01
#>  [7,]  3.780335206  6.37163408 1.434532e+00
#>  [8,]  8.192618544 39.18135029 4.893656e+00
#>  [9,]  0.672241559  1.55617823 1.114769e+02
#> [10,] 13.863862463 31.72293440 1.456349e+01
#> attr(,"accept.rate")
#> [1] 1
vario <- function(x, scale = 0.5, alpha = 0.8){ scale*x^alpha }
grid.coord <- as.matrix(expand.grid(runif(4), runif(4)))
rgparp(n = 10, riskf = 'max', vario = vario, coord = grid.coord,
   model = 'br', scale = runif(16), loc = rnorm(16))
#>            [,1]       [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
#>  [1,] 0.8131132 -1.0201245 -1.012336 0.1289821 -1.093509 1.0347484 0.3934998
#>  [2,] 0.8128315 -1.0376203 -1.012814 0.1291347 -1.092575 0.9520569 0.3810090
#>  [3,] 0.8125650 -0.9786162 -1.028973 0.1306269 -1.096913 1.0835454 0.3898558
#>  [4,] 0.8120891 -0.9782802 -1.021704 0.1303578 -1.124843 1.0671353 0.3773491
#>  [5,] 0.8131356 -1.0098537 -1.011041 0.1300492 -1.101756 0.9928481 0.3855674
#>  [6,] 0.8129728 -1.0376149 -1.008736 0.1293803 -1.100383 0.9897208 0.3792453
#>  [7,] 0.8125853 -0.9781316 -1.011748 0.1301468 -1.093596 1.0741062 0.3786765
#>  [8,] 0.8129230 -0.9639166 -1.008473 0.1306683 -1.124330 1.0782159 0.3794997
#>  [9,] 0.8134280 -1.0385922 -1.001636 0.1288303 -1.083310 1.0922922 0.3945636
#> [10,] 0.8130283 -0.9812439 -1.009823 0.1305610 -1.091652 1.0837451 0.3882692
#>             [,8]      [,9]     [,10]     [,11]     [,12]     [,13]    [,14]
#>  [1,] -0.9518330 -1.232997 -2.902765 -2.025643 -1.833081 0.6723882 1.138928
#>  [2,] -0.9984800 -1.238813 -2.943585 -2.053805 -1.843602 0.6400419 1.111419
#>  [3,] -0.9294300 -1.260937 -2.880665 -2.092224 -1.802201 0.6952242 1.131607
#>  [4,] -0.9335313 -1.258497 -2.900660 -2.072263 -1.823244 0.6805283 1.132111
#>  [5,] -0.9967743 -1.238425 -2.920725 -2.030700 -1.823680 0.5223860 1.118087
#>  [6,] -1.0134395 -1.235314 -2.919007 -2.023749 -1.836525 0.6168533 1.113628
#>  [7,] -0.9177161 -1.254359 -2.900054 -2.034860 -1.824908 0.6938025 1.139935
#>  [8,] -0.9225261 -1.236694 -2.871461 -2.014178 -1.795755 0.6396206 1.135119
#>  [9,] -0.9192352 -1.224811 -2.949016 -2.003990 -1.852326 0.7031268 1.142410
#> [10,] -0.9331708 -1.236176 -2.878832 -2.038804 -1.803844 0.6950481 1.137635
#>           [,15]    [,16]
#>  [1,] -1.172673 1.235146
#>  [2,] -1.245759 1.174119
#>  [3,] -1.159101 1.226116
#>  [4,] -1.172936 1.227901
#>  [5,] -1.325217 1.164613
#>  [6,] -1.285469 1.128961
#>  [7,] -1.167054 1.242987
#>  [8,] -1.281553 1.235689
#>  [9,] -1.140690 1.237267
#> [10,] -1.159233 1.234506
#> attr(,"accept.rate")
#> [1] 1