Skip to contents

Simulation from R-Pareto processes

Usage

rparp(
  n,
  shape = 1,
  risk = c("sum", "site", "max", "min", "l2"),
  siteindex = NULL,
  d,
  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 tail index of Pareto variable

risk

string indicating risk functional.

siteindex

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

d

dimension of sample

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 the m mixture components that sum to one. For the "maxlin" model, weights should be a matrix with d columns that represent the weight of the components and whose column sum to one (if provided, this argument overrides asy).

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 R-Pareto process, with attributes accept.rate if the procedure uses rejection sampling.

Details

For riskf=max and riskf=min, the procedure uses rejection sampling based on Pareto variates sampled from sum and may be slow if d is large.

Examples

rparp(n=10, risk = 'site', siteindex=2, d=3, param=2.5, model='log')
#>            [,1]      [,2]      [,3]
#>  [1,] 1.5105721  2.062201 3.8114402
#>  [2,] 0.8278662 10.194357 0.6829412
#>  [3,] 4.6320032  3.569126 6.0419012
#>  [4,] 0.2875454  1.522112 0.2000385
#>  [5,] 3.2483324  3.627769 4.5665723
#>  [6,] 3.8668812  7.218984 2.9432878
#>  [7,] 0.8773408  1.567841 0.5226220
#>  [8,] 2.1739006  1.431146 1.6115397
#>  [9,] 0.5602710  1.180479 0.4143992
#> [10,] 1.1366353  1.338458 0.9827565
rparp(n=10, risk = 'min', d=3, param=2.5, model='neglog')
#>            [,1]      [,2]      [,3]
#>  [1,] 33.651282 32.628657 36.777860
#>  [2,]  2.289407  1.320429  1.082012
#>  [3,]  3.890172  4.142920  3.105207
#>  [4,] 17.213907 44.376318 25.882896
#>  [5,]  1.003407  4.835356  4.503946
#>  [6,]  1.735442  2.468705  1.749003
#>  [7,]  3.783245  7.845791  5.585949
#>  [8,] 18.959474 28.104456  4.498391
#>  [9,]  2.505521  2.831427  2.555628
#> [10,]  3.590155  4.091380  4.485327
#> attr(,"accept.rate")
#> [1] 0.06034483
rparp(n=10, risk = 'max', d=4, param=c(0.2,0.1,0.9,0.5), model='bilog')
#>               [,1]         [,2]       [,3]         [,4]
#>  [1,] 5.615579e-01 7.241260e-01 7.52868001 6.990548e-01
#>  [2,] 4.247099e-09 5.490106e-09 1.53206026 5.865514e-09
#>  [3,] 9.049350e-09 8.407775e-09 1.43406741 2.951890e-09
#>  [4,] 4.397482e-01 5.616788e-01 0.04895930 1.297957e+00
#>  [5,] 5.413925e-01 5.394913e-01 1.03096453 2.550636e-01
#>  [6,] 7.770202e-01 8.359705e-01 0.34935358 1.565462e+00
#>  [7,] 6.494626e-01 9.130293e-01 0.05727966 1.063859e+00
#>  [8,] 1.797197e+00 2.673083e+00 1.96182400 1.714274e+00
#>  [9,] 1.500466e+00 1.102379e+00 0.58961832 3.720106e+00
#> [10,] 1.606594e+00 2.410398e+00 0.90506318 3.345717e+00
#> attr(,"accept.rate")
#> [1] 0.5217391
rparp(n=10, risk = 'sum', d=3, param=c(0.8,1.2,0.6, -0.5), model='sdir')
#>               [,1]         [,2]      [,3]
#>  [1,] 9.104744e-05 2.071385e-04 1.6097458
#>  [2,] 5.476041e-08 3.672983e-08 2.9336700
#>  [3,] 9.973839e-01 1.472759e+00 0.1723525
#>  [4,] 1.351353e+00 1.861590e+00 0.1766897
#>  [5,] 2.347773e-05 4.848226e-05 1.2938706
#>  [6,] 4.442986e-05 4.845116e-05 1.7039216
#>  [7,] 4.365792e-04 4.318277e-04 1.1434435
#>  [8,] 5.990411e-01 1.652170e+00 0.5050968
#>  [9,] 6.962892e-01 3.485243e-01 0.1028635
#> [10,] 2.572016e-03 1.499202e-03 1.6158909
vario <- function(x, scale=0.5, alpha=0.8){ scale*x^alpha }
grid.coord <- as.matrix(expand.grid(runif(4), runif(4)))
rparp(n=10, risk = 'max', vario=vario, coord=grid.coord, model='br')
#>            [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
#>  [1,] 0.5528546 0.8751382 1.6173497 0.9656937 0.5154121 0.6764602 1.8710370
#>  [2,] 0.9280015 1.1937342 1.3297882 1.1801997 0.7815639 0.7331329 0.7901323
#>  [3,] 0.6274595 0.7155517 0.1400654 0.6796430 0.6718651 0.8651137 0.4186019
#>  [4,] 1.4667472 1.4653086 1.6198180 1.3881891 2.0053048 1.9622947 2.8102139
#>  [5,] 2.5137263 2.8814500 2.3622395 2.8055104 1.6969590 1.9390104 2.1811882
#>  [6,] 0.5590363 0.5289341 1.0113552 0.5708733 0.4750926 0.3556360 2.6846267
#>  [7,] 1.8931829 0.8590269 0.5054569 0.9543044 1.4664657 2.3200105 1.4442089
#>  [8,] 0.5237581 0.2283091 0.8040367 0.2845403 0.5585327 0.5996641 1.7552698
#>  [9,] 0.6597270 1.2522140 0.5133811 1.0038005 1.2805866 1.1756161 2.2335945
#> [10,] 0.6786599 0.4851475 1.6656314 0.3678618 0.5230716 0.8875996 0.7015881
#>            [,8]      [,9]     [,10]     [,11]     [,12]     [,13]     [,14]
#>  [1,] 0.8293672 0.9418955 1.1789628 1.0270113 1.1057200 0.5941734 0.4327573
#>  [2,] 0.6969163 1.2321408 1.2240548 0.8597080 0.9896628 0.7095739 0.7067637
#>  [3,] 0.7198967 0.8530125 0.6301378 0.1198791 0.8439146 0.8512862 1.1018493
#>  [4,] 1.8458849 1.5147027 1.5736124 4.3638941 1.3615597 2.3475146 1.7560127
#>  [5,] 2.2384305 2.2457703 3.4125943 2.1209164 3.6950584 1.0986633 1.3369853
#>  [6,] 0.3435974 0.5490592 0.4009056 0.9220610 0.3967821 0.5385041 0.3011957
#>  [7,] 1.8315710 0.9149645 1.1706802 0.7519990 1.2788392 2.5338628 1.9646215
#>  [8,] 0.6168899 0.8926574 0.3584376 1.3454552 0.3299555 0.4365769 0.4102402
#>  [9,] 1.0828572 0.7379972 1.2130437 1.1070612 1.0900599 1.6078698 1.8702422
#> [10,] 0.9793814 0.9013966 1.0245878 0.8860415 0.9826741 0.6466970 0.5603992
#>           [,15]     [,16]
#>  [1,] 1.5861529 0.3990939
#>  [2,] 0.6995806 0.7634090
#>  [3,] 0.5690132 0.9920307
#>  [4,] 2.7637642 2.0629867
#>  [5,] 1.4554163 1.4246000
#>  [6,] 1.6644094 0.4484652
#>  [7,] 1.4124012 1.9674712
#>  [8,] 1.4366822 0.4007914
#>  [9,] 2.3090938 1.5884943
#> [10,] 0.5471703 0.7588555
#> attr(,"accept.rate")
#> [1] 0.09444444