1、对前三种因素进行时间序列分析CPI程序:data a;input year CPI;cards;201102 104.9201101 104.9201012 104.6201011 105.1201010 104.4201009 103.6201008 103.5201007 103.3201006 102.9201005 103.1201004 102.8201003 102.4201002 102.7201001 101.5200912 101.9200911 100.6200910 99.5200909 99.2200908 98.8200907 98.2200906 98.320090
2、5 98.6200904 98.5200903 98.8200902 98.4200901 101200812 101.2200811 102.4200810 104200809 104.6200808 104.9200807 106.3200806 107.1200805 107.7200804 108.5200803 108.3200802 108.7200801 107.1;proc gplot; plot CPI*year=1;symbol1 v=diamond i=join c=red;run;quit;proc arima data=a;identify var=CPI; esti
3、mate p=1 method=ml;Run;图一图二样本自相关图延迟 3阶后,自相关系数落入 2倍范围以内,而且自相关系数向零递减的速度非常快,可以认为该序列非常平稳。图三因此,我们可以考虑用 AR(1)模型来拟合该观察值序列。图四图四残差白噪声检验显示只有延迟 6阶 LB检验统计量的 P值明显大于 0.05,所以该 AR(1)模型无效。GDP:程序如下:data A;input year GDP;cards;201102 107.2201101 106.6201012 105.9201011 106.1201010 105201009 104.3201008 104.3201007 104
4、.8201006 106.4201005 107.1201004 106.8201003 105.9201002 105.4201001 104.3200912 101.7200911 97.9200910 94.2200909 93200908 92.1200907 91.8200906 92.2200905 92.8200904 93.4200903 94200902 95.5200901 96.7200812 98.9200811 102200810 106.6200809 109.1200808 110.1200807 110200806 108.8200805 108.2200804
5、 108.1200803 108200802 106.6200801 106.1200712 105.4200711 104.6200710 103.2200709 102.7200708 102.6200707 102.4200706 102.5200705 102.8200704 102.9200703 102.7200702 102.6200701 103.3200612 103.1200611 102.8200610 102.9200609 103.45200608 103.4200607 103.6200606 103.5200605 102.4200604 101.9200603
6、102.5200602 103200601 103.1;proc gplot;plot GDP*year=1;symbol1 v=diamond i=join c=red;proc arima data=A;identify var=GDP;estimate p=1 method=ml;Run;quit;图一样本自相关图延迟 3阶之后,自相关系数都落入 2倍标准差范围以内,而且自相关系数向零衰减的速度非常快,延迟 8阶之后自相关系数即在零值附近波动。这是一个非常典型的短期相关的样本自相关图。由时序图和样本自相关图的性质,可以认为该序列平稳。考虑用 AR(1)模型來拟合该观察序列图二图三在延迟
7、18阶、24 阶 LB检验统计量的 P值均显著大于 0.05,所以该模型有效。图四由图四即得该模型为:GDP=103.72899+(1+0.95489)出口:程序如下:data B;input year export;cards;201102 967.4201101 1507.3201012 1541.5201011 1533.3201010 1359.8201009 1449.9201008 1393201007 1455.2201006 1374201005 1317.6201004 1199.2201003 1121.1201002 945.23201001 1094.75200912
8、1307.3200911 1136.53200910 1107.6200909 1159.3200908 1037200907 1054.2200906 954.1200905 887.58200904 919.4200903 902.9200902 649200901 904.54200812 1111.6200811 1149.9200810 1283.3200809 1364.1200808 1348.2200807 1366200806 1211.4200805 1205.3200804 1187.2200803 1089.1200802 873200801 1095.8;proc g
9、plot;plot export*year=1;symbol1 v=diamond i=join c=red;proc arima data=B;identify var=export;estimate p=1 method=ml;Run;quit;图一样本自相关图延迟 2阶之后,自相关系数都落入 2倍标准差范围以内,而且自相关系数向零衰减的速度非常快,延迟 5阶之后自相关系数即在零值附近波动。由时序图和样本自相关图的性质,可以认为该序列平稳。图二图6残差白噪声检验显示延迟6阶、18阶LB检验统计量的P值均显著大于0.05,所以该AR(1)模型显著有效。图三由图四即得该模型为:GDP=1155
10、.0+(1+0.73250)主成分分析:data A;input X1-X6;cards;104.9 967.4 107.2 13300 736100 101.79104.9 1507.3 106.6 -323 735600 103.2104.6 1541.5 105.9 9178 725800 103.57105.1 1533.3 106.1 5822 710300 103.52104.4 1359.8 1051968 699800 104.11103.6 1449.9 104.3 14800 696400 104.72103.5 1393 104.3 11200 687500 105.06
11、103.3 1455.2 104.8 1686 674100 105.07102.9 1374 106.4 13900 673900 105.66103.1 1317.6 107.1 10700 663400 105.89102.8 1199.2 106.8 11200 656600 105.47102.4 1121.1 105.9 15802 650000 100102.7 945.23 105.4 9758 636000 103.66101.5 1094.75 104.3 15140 625100 102.78101.9 1307.3 101.7 5294 606200 102.03100
12、.6 1136.53 97.9 5911 594600 101.0899.5 1107.6 94.2 2921.46 586200 100.0899.2 1159.3 93 9821.91 585400 98.0198.8 1037 92.1 3479.93 576700 96.5598.2 1054.2 91.8 4057.93 573102 95.9498.3 954.1 92.2 20131.11 568916 94.7698.6 887.58 92.8 13498.57 548244 94.7498.5 919.4 93.4 10567.99 540500 94.8698.8 902.
13、9 94 24738.56 530600 96.4698.4 64995.5 16851.85 507100 98.46101904.54 96.7 16274.86 496135 99.68101.2 1111.6 98.9 4171.77 475167 101.15102.4 1149.9 1023810.09 458645 101.781041283.3 106.6 3645.74 453133 102.36104.6 1364.1 109.1 4729.13 452899 103.08104.9 1348.2 110.1 6831.03 448847 103.34106.3 1366 1105028.96 446362 104.07;proc princomp data=A prefix=z out=outA;run;options ps=32 ls=85; proc sort data=outA;run;proc print data=outA;var number z1 z2 x1-x6;run;quit;