Description Usage Arguments Details Value See Also Examples

The conditional Heffernan–Tawn model is used to fit the dependence in time of a stationary series. A standard 2-stage procedure is used.

1 2 3 |

`ts` |
numeric vector; time series to be fitted. |

`u.mar` |
marginal threshold; used when transforming the time series to Laplace scale. |

`u.dep` |
dependence threshold; level above which the dependence is modelled. |

`lapl` |
logical; is |

`method.mar` |
a character string defining the method used to estimate the marginal GPD; either |

`nlag` |
integer; number of lags to be considered when modelling the dependence in time. |

`conditions` |
logical; should conditions on |

Consider a stationary time series *(X_t)* with Laplace marginal distribution; the fitting procedure consists of fitting

*X_t = α_t * x_0 + x_0^{β_t} * Z_t, t=1,…,m,*

with *m* the number of lags considered. A likelihood is maximised assuming *Z_t ~ N(μ_t, σ^2_t)*, then an empirical distribution for the *Z_t* is derived using the estimates of *α_t* and *β_t* and the relation

*Z_t = (X_t - α_t * x_0) / x_0^{β_t}.*

`conditions`

implements additional conditions suggested by Keef, Papastathopoulos and Tawn (2013) on the ordering of conditional quantiles. These conditions help with getting a consistent fit by shrinking the domain in which *(α,β)* live.

`alpha ` |
parameter controlling the conditional extremal expectation. |

`beta ` |
parameter controlling the conditional extremal expectation and variance. |

`res ` |
empirical residual of the model. |

`pars.se ` |
vector of length 2 giving the estimated standard errors for |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
## 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 margin
ar <- qlapl(pnorm(ar))
## fit model without constraints...
fit1 <- dep2fit(ts=ar, u.mar = 0.95, u.dep=0.98, conditions=FALSE)
fit1$a; fit1$b
## ...and compare with a fit with constraints
fit2 <- dep2fit(ts=ar, u.mar = 0.95, u.dep=0.98, conditions=TRUE)
fit2$a; fit2$b# should be similar, as true parameters lie well within the constraints
``` |

tsxtreme documentation built on May 30, 2017, 3:32 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.