Description Usage Arguments Details Value See Also Examples
Appropriate marginal transforms are done before the fit using standard procedures, before the dependence model is fitted to the data. Then the measure of dependence θ(x,m) is derived using a method described in Eastoe and Tawn (2012).
1 2 3 4 5 |
ts |
numeric vector; time series to be fitted. |
lapl |
logical; is |
nlag |
integer; number of lags to be considered when modelling the dependence in time. |
R |
integer; the number of samples used for estimating θ(x,m). |
u.mar |
marginal threshold; used when transforming the time series to Laplace scale if |
u.dep |
dependence threshold; level above which the dependence is modelled. |
probs |
vector of probabilities; the values of x for which to evaluate θ(x,m). |
method.mar |
a character string defining the method used to estimate the marginal GPD; either |
method |
a character string defining the method used to estimate the dependence measure; either |
silent |
logical ( |
R.boot |
integer; the number of samples used for the block bootstrap for the confidence intervals. |
block.length |
integer; the block length used for the block-bootstrapped confidence intervals. |
levels |
vector of probabilities; the quantiles of the bootstrap distribution of the extremal measure to be computed. |
The standard procedure (method="prop"
) to estimating probabilities from a Heffernan-Tawn fit best illustrated in the bivariate context (Y | X > u):
1. sample X from an exponential distribution above v ≥ u,
2. sample Z (residuals) from their empirical distribution,
3. compute Y using the relation Y = α * X + X^β * Z,
4. estimate Pr(X > v_x, Y > v_y) by calculating the proportion p of Y samples above v_y and multiply p with the marginal survival distribution evaluated at v_x.
With method="MCi"
a Monte Carlo integration approach is used, where the survivor distribution of Z is evaluated at pseudo-residuals of the form
(v_y - α * X)/X^β,
where X is sampled from an exponential distribution above v_x. Taking the mean of these survival probabilities, we get the Monte Carlo equivalent of p in the proportion approach.
List containing:
depfit |
an object of class 'stepfit' |
probs |
|
levels |
|
theta |
a matrix with proportion or Monte Carlo estimates of θ(x,m). Rows correspond to values in |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## generate data from an AR(1)
## with Gaussian marginal distribution
n <- 10000
dep <- 0.5
ar <- numeric(n)
ar[1] <- rnorm(1)
for(i in 2:n)
ar[i] <- rnorm(1, mean=dep*ar[i-1], sd=1-dep^2)
plot(ar, type="l")
plot(density(ar))
grid <- seq(-3,3,0.01)
lines(grid, dnorm(grid), col="blue")
## rescale the margin (focus on dependence)
ar <- qlapl(pnorm(ar))
## fit the data
fit <- theta2fit(ts=ar, u.mar=0.95, u.dep=0.98)
## plot theta(x,1)
plot(fit)
abline(h=1, lty="dotted")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.