X=runif(120, min = 0, max = 100) # 10-year monthly data
Y=runif(120, min = 0, max = 100) # 10-year monthly data
fit<-JDSI(X,Y,ts=6)
z=matrix(t(fit$JDSI),ncol=1)
plot(z, type="l", col=1, lwd=2, lty=1, xlim=c(0,120),xlab="Time",ylab="JDSI")
Run the code above in your browser using DataLab