#Example
data(TS)
plot(TS[,1], TS[,2], type='l')
nVar <- 3
dMax <- 2
pMax <- choose(nVar+dMax,dMax)
whatTerms <- c(1,1,0,1,1,1,1,1,1,1)
# apply pTimEv
statio <- pTimEv(TS[,2], nVar, dMax, TS[,1], whatTerms = whatTerms,
wlength = 1000, onestep = 20, removeExtr = 0.15)
# Plot the results
dev.new()
layout(matrix(1:12, nrow=4, ncol=3, byrow = TRUE))
what <- which(statio$whatTerms!=0)
for (i in what) {
plot(statio$TSdate[statio$W==1], statio$slidingoutGM[statio$W==1,i],
xlab='TSdate', ylab='coeff', main=poLabs(nVar,dMax)[i])
}
plot(statio$TSdate[statio$W==1], statio$slidingoutGM[statio$W==1,pMax+1],
xlab='date', ylab='Epsilon', main='Resid', log = 'y')
Run the code above in your browser using DataLab