# Simulate a dependent series of random variables.
x <- runif(1000,-1,1)
x[2:1000] <- x[1:999]*0.6
# -- DON'T RUN
# pacf( x)
# use runs and intervals declustering using the 90th percentile as the threshold.
u <- quantile(x, 0.9)
z <- x > u
exi.intervals(z)
tmp1 <- decluster.runs(z, 1)
tmp2 <- decluster.intervals( z, exi.intervals(z))
data(FCwx)
x <- FCwx$MxT # Fort Collins, Colorado daily maximum temperature series (degrees Fahrenheit).
y <- FCwx$Year # corresponding years.
id <- is.element(FCwx$Mn,7:8) # July and August time points.
x <- x[id]
y <- y[id]
exi.intervals(x>93.5, blocks=y)
tmp1 <- decluster.runs(x>93.5, 1, blocks=y)
tmp2 <- decluster.intervals(x>93.5, 0.555, blocks=y)
Run the code above in your browser using DataLab