library(TSA) data(airmiles) ?airmiles plot((airmiles),ylab='(airmiles)',xlab='Year', ) plot(log(airmiles),ylab='Log(airmiles)',xlab='Year', ) ?filter S=c(rep(0,2),rep(1,108)) # step pulse of the post-intervention period plot(ts(S),type='p') abline(h=0) omega=-1 delta=.9 m=filter(x=omega*S, filter=c(delta),method='recursive') plot(ts(m),type='p',main='change in the mean function due to intervention at T=3')