/* This program generates Monte Carlo data for an ARIMA(0,1,1) model. */ options pagesize=60 linesize=74 nodate; goptions device=win gsfname=plot rotate=landscape gsfmode=append target=hpljs3; *border; data mc; y1 = 0.9; a1 = 0; do t = 0 to 100; a = rannor(14398); y = y1 + a - 0.7 * a1 + 0.2; if t > 0 then output; a1 = a; y1 = y; end; proc gplot data=mc; symbol v=dot c=black i=join h=.8; title1 'Monte Carlo IMA(1) data with theta(1) = -0.7'; title2 'X=Time Y=IMA(1) Series'; axis1 order=(0 to 100 by 10) label=(f=duplex 'Obs'); axis2 order=(-5 to 30 by 5) label=(f=duplex 'IMA(1) Series'); plot y*t / haxis=axis1 vaxis=axis2; data mc; set mc; dy = y - lag1(y); run; title 'ACF and PACF for Nonstationary ARIMA(0,1,1) series'; proc arima data=mc; identify var = y; run; title 'ACF and PACF for Differenced ARIMA(0,1,1) series'; proc arima data=mc; identify var = y(1); run; proc gplot data=mc; symbol v=dot c=black i=join h=.8; title1 'Differenced IMA(1) data with theta(1) = -0.7'; title2 'X=Time Y=DY(1) Series'; axis1 order=(0 to 100 by 10) label=(f=duplex 'Obs'); axis2 order=(-10 to 10 by 5) label=(f=duplex 'IMA(1) Series'); plot dy*t / haxis=axis1 vaxis=axis2; run;