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)
.
Arguments
- n
number of observations
- shape
shape parameter of the generalized Pareto variable
- thresh
univariate threshold for the exceedances of risk functional
- risk
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. Max linear models are also supported
- weights
vector of length
m
for them
mixture components that sum to one. For the"maxlin"
model, weights should be a matrix withd
columns that represent the weight of the components and whose column sum to one (if provided, this argument overridesasy
).- vario
semivariogram function whose first argument must be distance. Used only if provided in conjunction with
coord
and ifsigma
is missing- coord
d
byk
matrix of coordinates, used as input in the variogramvario
or as parameter for the Smith model. Ifgrid
isTRUE
, 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, risk = '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, risk = '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.16708294 0.84822858 0.0972277 1.5847869
#> [2,] 0.54178861 1.06026266 0.3278755 0.9523174
#> [3,] 0.18320648 0.41630489 0.0415351 1.3124610
#> [4,] 0.51300988 1.22361722 0.3163796 1.5027287
#> [5,] 0.04647777 0.08431727 0.1096085 1.2651984
#> [6,] 0.46184319 1.09822713 0.5917206 3.6846269
#> [7,] 0.55111207 1.14657949 0.1599802 1.9248288
#> [8,] 0.38445423 0.81078795 4.2529464 6.2350637
#> [9,] 0.20722129 0.39159880 0.1411901 3.8802689
#> [10,] 0.97773079 2.61363525 3.0832785 3.2748642
#> attr(,"accept.rate")
#> [1] 0.425
rgparp(n = 10, risk = '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,] 1.910703289 10.227383209 0.6664815
#> [2,] 1.905321208 3.949975171 69.5366495
#> [3,] 2.944172088 0.953649788 0.4577316
#> [4,] 56.665476826 7.542547592 4.6172216
#> [5,] 4.929917270 2.036208724 1.2816897
#> [6,] 2.478666942 7.245128077 3.7793809
#> [7,] 0.411258103 1.163707773 6.3278698
#> [8,] 0.006839741 0.006774305 9.4990915
#> [9,] 1.914708100 1.501158342 1.5245586
#> [10,] 1.623081281 13.729665409 81.0419152
#> 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, risk = 'max', vario = vario, coord = grid.coord,
model = 'br', scale = runif(16), loc = rnorm(16))
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] -2.975997 -1.649098 -0.04782119 0.2163726 -1.767358 -2.218900
#> [2,] -3.076005 -2.925881 -1.56208458 -0.6447922 -1.808855 -2.463810
#> [3,] -3.285106 -5.170135 -0.96529235 0.5759286 -2.016755 -8.286711
#> [4,] -3.252408 -3.266976 -1.41537414 0.5996892 -1.865884 -3.433610
#> [5,] -3.040683 -2.794275 0.15429560 0.9437330 -1.824155 -2.582566
#> [6,] -2.954477 -2.024722 -0.74602130 -0.1377545 -1.739974 -1.344229
#> [7,] -3.109310 -2.954373 -0.32241898 0.7182453 -1.895561 -4.378893
#> [8,] -4.034499 -18.774690 -6.09310721 -17.6278359 -2.099146 -10.111957
#> [9,] -3.311906 -7.183397 -2.52191152 -6.7623727 -2.001773 -9.268944
#> [10,] -3.174855 -3.579029 -0.62510775 0.2277307 -1.800448 -2.787185
#> [,7] [,8] [,9] [,10] [,11] [,12] [,13]
#> [1,] -0.9132273 -2.464539 -1.591269 -2.900593 -0.812110 -1.4943176 1.619361
#> [2,] -2.3498990 -2.604959 -2.765860 -4.375954 -1.687790 -1.9135135 1.581973
#> [3,] -2.2226005 -1.842195 -4.872853 -12.416238 -1.488860 -1.2938327 1.485450
#> [4,] -2.3317053 -1.802833 -2.894217 -4.476507 -1.137947 -1.5833872 1.597314
#> [5,] -0.8666341 -1.688941 -2.074563 -3.514826 -0.763012 -0.6999166 1.591352
#> [6,] -1.3026493 -2.353987 -1.102975 -2.216203 -1.439773 -1.9943447 1.631801
#> [7,] -2.0947424 -1.597832 -4.205934 -7.784464 -1.601200 -0.6118442 1.567423
#> [8,] -8.0705527 -19.736783 -8.068216 -19.135874 -4.707461 -27.3795501 1.350833
#> [9,] -2.0534034 -6.772165 -4.326546 -7.708982 -1.894134 -6.1014218 1.507648
#> [10,] -1.5609782 -2.349590 -2.554410 -5.480664 -1.214084 -1.4781656 1.598181
#> [,14] [,15] [,16]
#> [1,] -1.101950 -0.18766566 -3.565759
#> [2,] -1.320125 -1.86742032 -3.750749
#> [3,] -3.345406 -0.96832255 -3.496404
#> [4,] -1.540604 -1.74731883 -3.508608
#> [5,] -1.481214 -0.03431142 -3.379791
#> [6,] -1.047704 -0.78664121 -3.615796
#> [7,] -1.656449 -1.59121166 -3.417975
#> [8,] -3.821685 -7.25720535 -6.494530
#> [9,] -2.660784 -1.94550797 -4.279763
#> [10,] -1.297163 -0.62875180 -3.571205
#> attr(,"accept.rate")
#> [1] 0.7857143