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