new doc 1 - Internet Archive · 2016. 9. 9. · Title: new doc 1 Author: CamScanner Subject: new doc 1
arSimulation (1).doc
2
/*SAS examples */ /* Simulate white noise time series process with n=200*/ title "WN process"; data wn; do i=1 to 200; y=rannor(123); if i>0 then output; end; run; proc arima data=wn; identify var=y nlag=15; run; /* Simulate MA(1) time series process with n=200*/ title "MA1 process"; data ma1; etm1=rannor(123); do i=-50 to 200; et=rannor(123); yt=et+.9*etm1; if i>0 then output; etm1= e t; end; run; proc arima data=ma1; identify var=yt nlag=15; run; /* Simulate AR(1) time series process with n=200*/ title "AR1 process"; data ar1; ytm1=rannor(123); do i=-50 to 200; et=rannor(123); yt=0.9*ytm1+et; if i>0 then output;
-
Upload
samuel-yip -
Category
Documents
-
view
217 -
download
0
description
arSimulation (1).doc
Transcript of arSimulation (1).doc
![Page 1: arSimulation (1).doc](https://reader036.fdocuments.net/reader036/viewer/2022082505/55cf9145550346f57b8c2cf5/html5/thumbnails/1.jpg)
/*SAS examples*/
/* Simulate white noise time series process with n=200*/
title "WN process";
data wn;
do i=1 to 200;
y=rannor(123);
if i>0 then output;
end;
run;
proc arima data=wn;
identify var=y nlag=15;
run;
/* Simulate MA(1) time series process with n=200*/
title "MA1 process";
data ma1;
etm1=rannor(123);
do i=-50 to 200;
et=rannor(123);
yt=et+.9*etm1;
if i>0 then output;
etm1=et;
end;
run;
proc arima data=ma1;
identify var=yt nlag=15;
run;
/* Simulate AR(1) time series process with n=200*/
title "AR1 process";
data ar1;
ytm1=rannor(123);
do i=-50 to 200;
et=rannor(123);
yt=0.9*ytm1+et;
if i>0 then output;
![Page 2: arSimulation (1).doc](https://reader036.fdocuments.net/reader036/viewer/2022082505/55cf9145550346f57b8c2cf5/html5/thumbnails/2.jpg)
ytm1=yt;
end;
run;
proc arima data=ar1;
identify var=yt nlag=15;
run;