scoreEstimation: Gradient score function for the Brown-Resnick model.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/gradient_score.R

Description

Compute the peaks-over-threshold gradient score function for the Brown–Resnick model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
scoreEstimation(
  obs,
  loc,
  vario,
  weightFun = NULL,
  dWeightFun = NULL,
  nCores = 1L,
  cl = NULL,
  ...
)

Arguments

obs

List of vectors exceeding an R-threshold, see de Fondeville and Davison (2018) for more details.

loc

Matrix of coordinates as given by expand.grid().

vario

Semi-variogram function taking a vector of coordinates as input.

weightFun

Function of weights.

dWeightFun

Partial derivative function of weightFun.

nCores

Number of cores used for the computation

cl

Cluster instance as created by makeCluster of the parallel package.

...

Parameters for weightFun and dWeightFun.

Details

The function computes the gradient score based on the representation developed by Wadsworth et al. (2014). Margins must have been standardized. The weighting function must be differentiable and verify some properties for consistency, see de Fondeville and Davison (2018) for more details.

Value

Evaluation of the gradient score function for the set of observations obs and semi-variogram vario.

Author(s)

Raphael de Fondeville

References

de Fondeville, R. and Davison A. (2018). High-dimensional peaks-over-threshold inference. Biometrika, 105(3), 575-592.

Wadsworth, J. L. and J. A. Tawn (2014). Efficient inference for spatial extreme value processes associated to log-Gaussian random functions. Biometrika, 101(1), 1-15.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#Define variogram function
vario <- function(h){
   1 / 2 * norm(h,type = "2")^1.5
}

#Define locations
loc <- expand.grid(1:4, 1:4)

#Simulate data
obs <- simulPareto(1000, loc, vario)

#Evaluate risk functional
sums <- sapply(obs, sum)

#Define weighting function
weightFun <- function(x, u){
 x * (1 - exp(-(sum(x / u) - 1)))
}

#Define partial derivative of weighting function
dWeightFun <- function(x, u){
(1 - exp(-(sum(x / u) - 1))) + (x / u) * exp( - (sum(x / u) - 1))
}

#Select exceedances
threshold <- quantile(sums, 0.9)
exceedances <- obs[sums > threshold]

#Evaluate gradient score function
scoreEstimation(exceedances, loc, vario, weightFun = weightFun, dWeightFun, u = threshold)

r-fndv/mvPot documentation built on Jan. 10, 2020, 2:43 a.m.