* * Example AIRLINEI.DAT from pp 522-527 * open data airlinei.dat calendar(m) 1949 data(format=free,org=columns) 1949:1 1960:12 date airline * * Generate the dummy for the intervention range * set ads = t>=121 * * Transform data to logs * set logair = log(airline) * graph(footer="Figure 12-16 Logs of Airline Passengers with Intervention at Month 121",grid=(t==121)) # logair * * Pre-intervention estimation * boxjenk(diffs=1,sdiffs=1,ma=1,sma=1) logair * 120 * diff(sdiffs=1) logair / d12logair graph(footer="Figure 12-17 Seasonal Differences of Airline Passengers",grid=(t==121)) # d12logair * * With 0,0,0 intervention over full data set * boxjenk(diffs=1,sdiffs=1,ma=1,sma=1,inputs=1,applydiffs) logair # ads 0 0 0 * prj fitted graph(footer="Figure 12-18 Fitted and actual values of zero-order interventions",grid=(t==121)) 2 # fitted 1957:1 * # logair 1957:1 * * * With denominator term * boxjenk(diffs=1,sdiffs=1,ma=1,sma=1,inputs=1,applydiffs) logair # ads 0 1 0 * * Computations for table 12-18 * set impact 1 16 = .2758*(.5172)**(t-1) acc impact 1 16 cimpact set expimpact 1 16 = exp(impact) set expcimpact 1 16 = exp(cimpact) print(nodates,picture="*.####") 1 16 impact cimpact expimpact expcimpact