Simulated IMA Model

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: ariex01.sas
 Description: Example program from SAS/ETS User's Guide,
              The ARIMA Procedure
       Title: Simulated IMA Model
     Product: SAS/ETS Software
        Keys: time series analysis
        PROC: ARIMA
       Notes:

--------------------------------------------------------------*/

ods graphics on;

title1 'Simulated IMA(1,1) Series';
data a;
  u1 = 0.9; a1 = 0;
  do i = -50 to 100;
     a = rannor( 32565 );
     u = u1 + a - .8 * a1;
     if i > 0 then output;
     a1 = a;
     u1 = u;
  end;
run;

/*-- Simulated IMA Model --*/
proc arima data=a;
  identify var=u;
  run;
  identify var=u(1);
  run;
  estimate q=1 ;
  run;
quit;