curve.funct: Creates extreme level curves for copulae

Description Usage Arguments Value Examples

View source: R/level_curves.R

Description

The function creates extreme level curves for copulae. The function divides the 2D space into 3 subspaces to model level curves with extreme low probability 'pobj' (<0.001). Two types of level curves can be modeled: conditional or joint exceedance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
curve.funct(
  pxf,
  pyf,
  mar1,
  mar2,
  pos,
  pobje,
  ng = 100,
  inter = "comb",
  coco,
  c1,
  logm = FALSE
)

Arguments

pxf

Uniform values of the first margin with a mixed distribution (empirical below and gpd above a threshold)

pyf

Uniform values of the second margin with a mixed distribution (empirical below and gpd above a threshold)

mar1

Values of the first margin

mar2

Values of the second margin

pos

part of the curve to be modelled 'l' for the left part, 'm' for the middle part and 'r' for the right part

pobje

probability of the level curve to be modelled

ng

number of points to be interpolated

inter

type of hazard interrelation 'comb' for compound (joint exceedance probability) and 'casc' for cascade (conditional porbability)

coco

a copula function from the following: GHcop,NORMcop,FGMcop,GLcop

c1

the parameter of the copula

logm

log tranformation of the margins 'TRUE'or 'FALSE'

Value

two column matrix representing the level curve for a given probability

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
data(porto)
tr1=0.9
tr2=0.9
fire01meantemp=na.omit(fire01meantemp)
u=fire01meantemp

#Compute uniform margins
marg=Margins.mod(tr1,tr2,u=fire01meantemp)
pp=marg$uvar_ext
uu=marg$val_ext

#Copula parameters
c1=1.5
copu<-copBasic::GHcop

upobj=0.001
interh="comb"

#compute the curve on 3 subdomains
cl1<-curve.funct(pxf=pp[,1],pyf=pp[,2],mar1=uu[,1],mar2=uu[,2],pos="l",
pobje=upobj,ng=100,inter=interh,coco=copu,c1=c1)
cl2<-curve.funct(pxf=pp[,1],pyf=pp[,2],mar1=uu[,1],mar2=uu[,2],pos="m",
pobje=upobj,ng=100,inter=interh,coco=copu,c1=c1)
cl3<-curve.funct(pxf=pp[,1],pyf=pp[,2],mar1=uu[,1],mar2=uu[,2],pos="r",
pobje=upobj,ng=100,inter=interh,coco=copu,c1=c1)

cl<-rbind(cl1,cl2,cl3)

mobirep documentation built on April 22, 2021, 5:07 p.m.