2-5. Another Quick Example
One of the most useful aspects of working in interactive mode is that you can quickly try different things without having to re-run an entire program. For example, we can type in and run the following short program, which defines a monthly dating scheme, reads in some data, and then uses the BOXJENK instruction to estimate an ARIMA(1,1,1) model:
CALENDAR 1982 1 12
ALLOCATE 1995:12
OPEN DATA MYDATA.RAT
DATA(FOR=RATS) / Y
BOXJENK(AR=1,DIFFS=1,MA=1) Y / RESIDS
Now, after looking at the output generated by the BOXJENK estimation, we want to try estimating an ARIMA(2,1,1) model (i.e. two autoregressive terms, rather than just one). We do not need to re-execute the CALENDAR, ALLOCATE, OPEN DATA, or DATA instructions. Instead, we can just execute another BOXJENK instruction with the appropriate options.
We could type in another BOXJENK instruction, but it's faster to just edit and re-run the existing instruction. In this case, we can simply change the "AR=1" option to "AR=2", so the instruction looks like this:
BOXJENK(AR=2,DIFFS=1,MA=1) Y / RESIDS
We can now hit the key (or click on the "Run" icon) to execute the line. RATS will estimate the ARIMA(2,1,1) model and add the output to the output window, so we can easily compare the output generated by the two models.
|