# NOT RUN {
x <- arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
sd = sqrt(0.1796))
y <- x + rnorm(63)
taildep.test(x, y)
# Recall that null hypothesis is tail dependence!
# }
# NOT RUN {
data(PORTw)
taildep.test(PORTw$TMX1, PORTw$TMN0, cthresh=-0.3)
data(FCwx)
taildep.test(FCwx$MxT, FCwx$Prec, cthresh=-0.4)
# Run the example (13.3.6) in Reiss and Thomas (2007)
# using the 'wavesurge' dataset from package 'ismev'.
data(wavesurge)
cth <- seq(-0.46,-0.35,0.01)
tab13.1 <- matrix(NA, 2, 12)
colnames(tab13.1) <- as.character(cth)
for(i in 1:12) {
tmp <- taildep.test(wavesurge, cthresh=cth[i], ties.method="max")
tab13.1[1,i] <- tmp$parameter["m"]
tab13.1[2,i] <- tmp$p.value
} # end of for 'i' loop.
rownames(tab13.1) <- c("m", "p-value")
tab13.1
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab