Simulation from R-Pareto processes
Arguments
- n
number of observations
- shape
shape tail index of Pareto variable
- riskf
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.
- weights
vector of length
m
for them
mixture components. Must sum to one- 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 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, riskf='site', siteindex=2, d=3, param=2.5, model='log')
#> [,1] [,2] [,3]
#> [1,] 0.5205532 1.169529 0.3019653
#> [2,] 8.3212908 20.872509 14.3216828
#> [3,] 3.3079391 2.062201 2.3010762
#> [4,] 3.1409314 10.194357 2.5849316
#> [5,] 4.4333279 3.569126 5.0587967
#> [6,] 0.2875454 1.522112 0.2000385
#> [7,] 3.2483324 3.627769 4.5665723
#> [8,] 3.8668812 7.218984 2.9432878
#> [9,] 0.8773408 1.567841 0.5226220
#> [10,] 2.1739006 1.431146 1.6115397
rparp(n=10, riskf='min', d=3, param=2.5, model='neglog')
#> [,1] [,2] [,3]
#> [1,] 2.774302 2.188398 4.040038
#> [2,] 2.204818 2.704259 2.204541
#> [3,] 1.412945 1.262686 2.915136
#> [4,] 36.498084 33.047126 33.512590
#> [5,] 2.849560 2.164274 1.291494
#> [6,] 2.423900 4.476641 4.098832
#> [7,] 3.684942 2.125312 1.741565
#> [8,] 1.872165 1.410299 1.521108
#> [9,] 52.053831 27.990095 27.469476
#> [10,] 3.249972 5.661364 3.050884
#> attr(,"accept.rate")
#> [1] 0.06470588
rparp(n=10, riskf='max', d=4, param=c(0.2,0.1,0.9,0.5), model='bilog')
#> [,1] [,2] [,3] [,4]
#> [1,] 1.6499266 1.5719955 0.28164929 1.42753677
#> [2,] 2.7076038 2.1237916 0.09405382 2.14822469
#> [3,] 1.0298746 1.4015951 0.97216797 0.47878698
#> [4,] 0.2309301 0.2502851 0.03897558 1.15916300
#> [5,] 0.8219053 0.7741385 0.19059151 1.60879388
#> [6,] 3.9471682 2.7851823 0.21142681 1.89020168
#> [7,] 27.9535028 20.8606122 2.12565893 38.62623416
#> [8,] 1.6136564 1.6628993 0.12853638 1.13007441
#> [9,] 1.7452394 1.2869224 0.10842765 0.84493730
#> [10,] 0.1389264 0.1104088 6.57042273 0.05079526
#> attr(,"accept.rate")
#> [1] 0.575
rparp(n=10, riskf='sum', d=3, param=c(0.8,1.2,0.6, -0.5), model='sdir')
#> [,1] [,2] [,3]
#> [1,] 6.739490e-01 6.119699e-01 0.25174931
#> [2,] 5.368571e-01 3.716128e-01 0.09773564
#> [3,] 4.163048e-01 8.894680e-01 0.17349280
#> [4,] 2.541475e-01 9.144824e-01 0.45629686
#> [5,] 4.254960e-01 7.518886e-01 0.41517212
#> [6,] 2.590442e-01 1.622627e+00 0.18439240
#> [7,] 9.798641e-01 1.655554e+00 0.40448557
#> [8,] 1.022937e+00 1.021145e+00 0.19466411
#> [9,] 9.837010e-01 4.446923e-01 0.24405041
#> [10,] 2.429242e-05 2.839243e-05 1.08409276
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, riskf='max', vario=vario, coord=grid.coord, model='br')
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 2.1565628 3.5032289 1.0687349 1.6845863 2.5052101 2.7687469
#> [2,] 1.8073013 2.5808173 0.7238747 1.3664819 1.5527122 2.4479852
#> [3,] 0.9641883 1.4078066 1.1652096 1.2651282 1.1846826 1.4529367
#> [4,] 24.2960136 21.1677515 25.3849052 31.2993152 23.4522527 19.8038423
#> [5,] 0.2623399 0.1610200 0.5148942 0.3100824 0.2588904 0.1576458
#> [6,] 0.6224662 0.5954993 0.6931661 0.6256595 0.7467028 0.4242889
#> [7,] 4.4068790 7.6818033 6.6809653 4.2161763 4.7688218 5.3468709
#> [8,] 0.4485540 0.5397275 0.2529820 0.3382310 0.4272794 0.5437028
#> [9,] 4.8924758 2.8373914 3.7709922 3.2998754 5.1397967 3.5227807
#> [10,] 3.5283197 6.5822710 3.2302438 3.4746952 3.5548155 6.0103387
#> [,7] [,8] [,9] [,10] [,11] [,12]
#> [1,] 0.8765050 1.8044312 2.0623018 2.7025699 2.9746768 2.4851607
#> [2,] 0.6372505 1.2954497 1.6654801 2.1342890 0.4559204 1.3503820
#> [3,] 1.2059621 0.8178160 0.7728189 0.6371853 1.5488882 0.8972392
#> [4,] 25.1549211 40.8428690 17.8647918 21.6815953 19.0815408 24.0091171
#> [5,] 0.5490413 0.2893498 0.3455399 0.3083367 1.4003553 0.4725351
#> [6,] 0.8719878 0.6229794 0.9287061 0.6324174 1.2036147 1.0648592
#> [7,] 4.6158347 4.2115794 4.9902882 4.4109813 4.5037516 3.5333300
#> [8,] 0.2500920 0.2703083 0.5777348 0.6742344 0.2447332 0.3648714
#> [9,] 4.8942015 3.3455813 4.2551062 5.2560588 4.2094760 2.8490155
#> [10,] 3.5451940 3.4321743 7.8024140 6.2994353 12.0595200 11.5968547
#> [,13] [,14] [,15] [,16]
#> [1,] 2.3094830 2.7880425 1.9123535 3.5442142
#> [2,] 1.2903689 1.7837315 0.5557769 1.3141529
#> [3,] 0.9660834 1.2738701 1.5119081 1.1301826
#> [4,] 22.6644653 28.7974071 17.5812823 18.7864854
#> [5,] 0.5045917 0.2321418 0.8596123 0.4938763
#> [6,] 1.0624686 1.0695272 0.8229585 0.7225962
#> [7,] 3.4451189 3.8594817 3.8816716 5.2058317
#> [8,] 0.6963661 1.3273849 0.2345849 0.5242572
#> [9,] 3.7267325 3.3082127 4.2070548 4.0071518
#> [10,] 4.3428326 6.2809951 8.7437129 6.2523605
#> attr(,"accept.rate")
#> [1] 0.09589041