Description Usage Arguments Details Value References Examples
View source: R/spectral_likelihood.R
Compute the negative spectral log-likelihood function for Brown–Resnick model with peaks-over-threshold.
1 | spectralLikelihood(obs, loc, vario, nCores = 1L, cl = NULL)
|
obs |
List of observations vectors for which |
loc |
Matrix of coordinates as given by |
vario |
Semi-variogram function taking a vector of coordinates as input. |
nCores |
Number of cores used for the computation |
cl |
Cluster instance as created by |
The function compute the negative log-likelihood function based on the spectral representation developed
by Engelke et al. (2015). This simplified expression is obtained by conditioning on the event
'sum(x)
exceeds a high threshold u > 1
'. Margins must have been standardized.
Negative spectral log-likelihood function evaluated at the set of observations obs
with semi-variogram vario
.
Engelke, S. et al. (2015). Estimation of Huesler-Reiss distributions and Brown-Resnick processes. Journal of the Royal Statistical Society: Series B, 77(1), 239-265
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #Define semi-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)
#Select exceedances
exceedances <- obs[sums > quantile(sums, 0.9)]
#Evaluate the spectral function
spectralLikelihood(exceedances, loc, vario)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.