brnsims: Simulate non-stationary Brown-Resnick process

View source: R/brnsims.R

brnsimsR Documentation

Simulate non-stationary Brown-Resnick process

Description

Simulate a non-stationary (or stationary) Brown-Resnick process using the 'stopping rule' methodology of Dieker and Mikosch (2015). Non-stationary Brown-Resnick processes are simulated using the non-stationary semivariogram. detailed in the help file for gamsv.

Usage

brnsims(reps, locs, kappa, lambda, tau, centre = NULL)

Arguments

reps

Number of realisations, n.

locs

A p by 2 matrix of coordinates.

kappa

Value of κ. See help(gamsv).

lambda

Value of λ. See help(gamsv).

tau

A p by p matrix of correlation values.

centre

Vector of length 2 giving coordinates of centre of non-stationarity for semivariogram. If NULL, stationary semivariogram used. See help(gamsv).

Value

n by p matrix

References

Dieker and Mikosch (2015) Extremes, 18(2):301-314, (doi)

Examples

##Creating correlation values to simulate non-stationary Brown-Resnick process.

lambda<-2
centre<-c(0,0)
kappa<-0.8

n.grid<-8
sim.coords<-as.matrix(expand.grid(seq(-1,1,length=n.grid),seq(-1,1,length=n.grid)))

p<-dim(sim.coords)[1]
tau<-matrix(NA,nrow=p,ncol=p)

for(i in 1:p){
for(j in 1:p){
tau[i,j]<-gamsv(s1=sim.coords[i,],s2=c(0,0),lam=lambda,kap=kappa,centre=NULL)+
gamsv(s1=sim.coords[j,],s2=c(0,0),lam=lambda,kap=kappa,centre=NULL)-
gamsv(s1=sim.coords[i,],s2=sim.coords[j,],lam=lambda,kap=kappa,centre=centre)
}
}

##Simulates 10 realisations of non-stationary BR process. 

Sim<-brnsims(reps=10,locs=sim.coords,kappa=kappa,lambda=lambda,centre=centre,tau=tau)



Jbrich95/sdfExtreme documentation built on March 24, 2022, 11:15 a.m.