specdens: Spectral Density Plot

View source: R/graph-specdens.R

specdensR Documentation

Spectral Density Plot

Description

Plot the spectral density for a bivariate extreme value distribution or an extreme Markov chain model.

Usage

specdens(object, main, plot = TRUE, ...)

Arguments

object

An object of class 'bvpot' or 'mcpot'. Most often, the return object of the fitbvgpd or fitmcgpd function.

main

The title of the graphic window. May be missing.

plot

Logical. Should the spectral density be plotted? The default is to plot it.

...

Other options to be passed to the plot function.

Details

Any bivariate extreme value distribution has the following representation:

G(y_1, y_2) = \exp\left[ - \int_0^1 \max\left( \frac{q}{z_1}, \frac{1-q}{z_2} \right) dH(q) \right]

where H holds:

\int_0^1 q dH(q) = \int_0^1 (1-q) dH(q) = 1

H is called the spectral measure with density h. Thus, h is called the spectral density. In addition, H has a total mass of 2.

For two independent random variables, the spectral measure consists of two points of mass 1 at q =0,1. For two perfect dependent random variables, the spectral measure consists of a single point of mass 2 at q=0.5.

Value

Plot the spectral density for a fitted bivariate extreme value distribution. Moreover, the spectral density is returned invisibly.

Author(s)

Mathieu Ribatet

See Also

retlev.bvpot, pickdep and plot.bvpot

Examples

par(mfrow=c(1,2))
##Spectral density for a Markov Model
mc <- simmc(1000, alpha = 0.25, model = "log")
mc <- qgpd(mc, 0, 1, 0.1)
Mclog <- fitmcgpd(mc, 0, "log")
specdens(Mclog)
##Spectral density for a bivariate POT model
x <- rgpd(500, 5, 1, -0.1)
y <- rgpd(500, 2, 0.2, -0.25)
Manlog <- fitbvgpd(cbind(x,y), c(5,2), "anlog")
specdens(Manlog)

POT documentation built on Oct. 17, 2024, 5:06 p.m.