plot_ExtDep: Graphical summaries of parametric representations of extremal...

View source: R/plot_ExtDep.R

plot_ExtDepR Documentation

Graphical summaries of parametric representations of extremal dependence.

Description

This function displays the angular density, Pickands dependence function and return levels for bivariate and trivariate extreme values models.

Usage

plot_ExtDep(object="angular", model, par, log=TRUE, data=NULL, contour=TRUE, 
            style, labels, cex.dat=1, cex.lab=1, cex.cont=1, 
            Q.fix, Q.range, Q.range0, cond=FALSE, ...)

Arguments

object

A character string indicating which graphical summary to plot. Takes value "angular" (default) "pickands" or"returns".

model

A string with the name of the model considered. Takes value "PB" (Pairwise Beta), "HR" (Husler-Reiss), "ET" (Extremal-t), "EST" (Extremal Skew-t), TD (Tilted Dirichlet) or AL (Asymmetric Logistic) when evaluating the angular density. Restricted to "HR", "ET" and "EST" for the Pickands dependence function.

par

A vector representing the parameters of the model.

log

A logical value specifying if the log density is computed. Required when object="angular".

data

A matrix representing angular data to be added to the density plot. Required when object="angular".

contour

A logical value; if TRUE the contour levels are displayed. Required for trivariate models only.

style

A character string indicating the plotting style of the data. Takes value "hist" or "ticks". See details.

labels

A vector of character strings indicating the labels. Must be of length 1 for bivariate models and 3 for trivariate models.

cex.dat

A positive real indicating the size of the data points. Required for the trivariate angular density.

cex.lab

A positive real indicating the size of the labels.

cex.cont

A positive real indicating the size of the contour labels.

Q.fix

A vector of length the dimension of the model, indicating some fixed quantiles to compute joint return levels. Must contain NA (maximum 2) for components whose quantiles are allowed to vary. Required when object="returns".

Q.range

A vector or matrix indicating quantile values on the unit Frechet scale, for the components that are allowed to vary. Must be a vector or a one-column matrix if there is one NA in Q.fix. Must be a two-column matrix if there are two NAs in Q.fix. Required when object="returns".

Q.range0

A object of the same format as Q.range, corresponding to the quantiles on the original scale. Required when object="returns".

cond

A logical value; if TRUE then conditional return levels are computed where the conditional event is the fixed event. Default if FALSE. Required when object="returns".

...

Additional graphical arguments for the hist() and plot() functions respectively used to compute the bivariate angular density and Pickands dependence function as well as for the plot() and contour() functionswhen object="returns".

Details

The angular density is computed using the function dExtDep with arguments method="Parametric" and angular=TRUE. The Pickands dependence function is computed using the function index.ExtDep with argument object="pickands".

When displaying the bivariate angular density and some data are provided (a 2-column matrix is specified for data), there is the choice to summarise the data using a histogram (style="hist") or to display the observations using tick marks (style="ticks").

When displaying return levels, there are two possibilities: univariate and bivariate return levels. Since the model dimensions are restricted to a maximum of three, in that case, aunivariate return level corresponds to fixing two components while a bivariate return level fixes only one component. The choice of the fixed component is decided by the position of the NA value(s) in the Q.fix argument. If par is a vector then the corresponding return level(s) are printed. However if par is a matrix then the return level(s) are evaluated for each value of the parameter vector and the mean, and empirical 95% empirical interval are displayed. Typically this is used when posterior samples are available. When par is a matrix with only two rows, resulting plots may not provide much information.

When contours are displayed, levels are chosen to be the deciles.

Author(s)

Simone Padoan, simone.padoan@unibocconi.it, https://faculty.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com https://www.borisberanger.com;

See Also

dExtDep, index.ExtDep.

Examples


data(pollution)

###############################
### Trivariate Husler-Reiss ###
###############################

if(interactive()){
  f.hr <- fExtDep(method="PPP", data=PNS, model="HR", par.start=rep(1,3))

  plot_ExtDep(object="angular", model="HR", par=f.hr$par, data=PNS, 
              labels=c(expression(PM[10]), expression(NO), expression(SO[2])), 
              cex.lab=2)
      
  plot_ExtDep(object="pickands", model="HR", par=f.hr$par, data=PNS, 
              labels=c(expression(PM[10]), expression(NO), expression(SO[2])), 
              cex.lab=2) # Takes time!      
}

###############################
### Bivariate Husler-Reiss ###
###############################            

if(interactive()){
  PN <- na.omit(Leeds.frechet[,1:2])
  PN <- cbind(PN, rowSums(PN))
  PN <- PN[order(PN[,3], decreasing = TRUE)[1:100],]
  PN <- PN[,1:2]/PN[,3]

  f.hr2 <- fExtDep(method="PPP", data=PN, model = "HR", par.start = 1)
  plot_ExtDep(model="HR", par=f.hr2$par, log=FALSE, data=PN, style="hist")
  plot_ExtDep(model="HR", par=f.hr2$par, log=FALSE, data=PN, style="ticks") 
  plot_ExtDep(object="pickands", model="HR", par=f.hr2$par) 

}
            

ExtremalDep documentation built on March 7, 2023, 3:16 p.m.