/* This program generates a Percentage Growth model */ data mc; x1 = 0; iseed = 333; do t = 0 to 100; a = rannor(iseed); x2 = .03 + 1.0*x1 + a*(.03); if t > 0 then output; x1 = x2; end; keep t x2; run; data mc; set mc; y = exp(x2); time=_N_; run; proc gplot data=mc; symbol v=dot c=black i=join h=.8; title1 'Monte Carlo Growth Data'; title2 'X=Time Y=Growth Series'; axis1 order=(0 to 100 by 10) label=(f=duplex 'Obs'); axis2 order=(0 to 25 by 5) label=(f=duplex 'Growth Series'); plot y*time / haxis=axis1 vaxis=axis2; proc arima data=mc; identify var=y; run; data mc; set mc; ydif = dif(y); run; proc gplot data=mc; symbol v=dot c=black i=join h=.8; title1 'Difference of Monte Carlo Growth Data'; title2 'X=Time Y=Diff. of Growth Series'; axis1 order=(0 to 100 by 10) label=(f=duplex 'Obs'); axis2 order=(-2.0 to 2.0 by .2) label=(f=duplex 'Delta Y'); plot ydif*time / haxis=axis1 vaxis=axis2 vref = 0; run; title; data mc; set mc; logy = x2; logydif = dif(logy); run; proc gplot data=mc; symbol v=dot c=black i=join h=.8; title1 'Log of Series'; title2 'X=Time Y=Log of Series'; axis1 order=(0 to 100 by 10) label=(f=duplex 'Obs'); axis2 order=(-1 to 4 by 1) label=(f=duplex 'Log Y'); plot logy*time / haxis=axis1 vaxis=axis2; run; title; proc arima data=mc; identify var=logy; run; proc gplot data=mc; symbol v=dot c=black i=join h=.8; title1 'Differenced Growth Series = Percentage Change'; title2 'X=Time Y=Diff. Growth Series = Percentage Change'; axis1 order=(0 to 100 by 10) label=(f=duplex 'Obs'); axis2 order=(-.15 to .20 by .05) label=(f=duplex 'Perc. Change'); plot logydif*time / haxis=axis1 vaxis=axis2 overlay vref = 0.03; run; title; proc arima data=mc; identify var=logy(1); run;