##generate series:
y <- rnorm(40)
##make matrix of impulse indicators:
mIIM <- iim(40)
##make matrix of step indicators:
mSIM <- sim(y)
##make matrix of trend indicators, but only every third:
mTIM <- tim(y, which.ones=seq(1,40,3))Run the code above in your browser using DataLab