*********************************** * 以下は SAS プログラムである * *********************************** ・AR(2) モデルに従う時系列データの生成と保存 options ls=65 ps=50; filename out "ar2.dat"; data ar2; do i=1 to 200; e=rannor(2784322); lags=sum(0.75*lag1y,-0.5*lag2y,e); y=15+lags; lag2y=lag1y;lag1y=y; if i>100 then output; end; data b;set ar2; file out;put y f7.3; proc print; ・上記のデータのグラフィック・プロット options ls=65 ps=50; filename in "ar2.dat"; filename graph 'ar2.ps'; goptions device=psepsf gsfmode=replace gsfname=graph; data ar2;infile in;input y; t=_n_; symbol i=join l=1 v=none; proc gplot;plot y*t; title1 f=simplex h=2 'Simulated Time Series from an AR(2) Model'; title2 f=gitalic h=1.5 'm=15, phi_1=0.75, phi_2=-0.5';