Learn R Programming

extremogram (version 1.0.2)

permfn2: Confidence bands for the sample cross extremogram

Description

The function estimates empirical confidence bands for the sample cross extremogram via a permutation procedure under the assumption that the data are independent.

Usage

permfn2(x, p1, p2, m, type, exttype, maxlag, start = 1, alpha = 0.05)

Arguments

x
Bivariate time series (n by 2 matrix).
p1
Quantile of the first time series to indicate an extreme event (a number between 0 and 1).
p2
Quantile of the second time series to indicate an extreme event (a number between 0 and 1).
m
Number of permutations (an integer).
type
Type of confidence bands. If type=1, it adds all permutations to the sample extremogram plot. If type=2, it adds the alpha/2 and (1-alpha)/2 empirical confidence bands for each lag. If type=3, it calculates the lag 1 alpha/2 and (1-alpha)/2 empirical confidence bands lag and uses them for all of the lags.
exttype
Extremogram type (see extremogram2).
maxlag
Number of lags to include in the extremogram (an integer).
start
The lag that the extremogram plots starts at (an integer not greater than maxlag, default is 1).
alpha
Significance level for the confidence bands (a number between 0 and 1, default is 0.05).

Value

The empirical confidence bands are added to the sample cross extremogram plot.

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
  2. Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.

Examples

Run this code
# generate a GARCH(1,1) process
omega   = 1
alpha1  = 0.1
beta1   = 0.6
alpha2  = 0.11
beta2   = 0.78
n       = 1000
quant   = 0.95
exttype = 1
maxlag  = 70
df      = 3
type    = 3
m       = 10
G1      = extremogram:::garchsim(omega,alpha1,beta1,n,df)
G2      = extremogram:::garchsim(omega,alpha2,beta2,n,df)
data    = cbind(G1, G2)

extremogram2(data, quant, quant, maxlag, type, 1, 1, 0)
permfn2(data, quant, quant, m, type, exttype, maxlag, 1, 0.05)

Run the code above in your browser using DataLab