View source: R/graph-specdens.R
specdens | R Documentation |
Plot the spectral density for a bivariate extreme value distribution or an extreme Markov chain model.
specdens(object, main, plot = TRUE, ...)
object |
An object of class |
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 |
Any bivariate extreme value distribution has the following representation:
G(z_1, z_2) = exp{ -int_0^1 max[q/z_1, (1-q)/z_2] dH(q)}
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.
Plot the spectral density for a fitted bivariate extreme value distribution. Moreover, the spectral density is returned invisibly.
Mathieu Ribatet
retlev.bvpot
, pickdep
and
plot.bvpot
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.