SAS - 绘制实际和ARIMA模型

时间:2014-04-09 08:12:16

标签: sas

如何在SAS中绘制估计的ARIMA模型,并在同一图表上显示实际数据?我使用下面的代码获得的图表并没有清楚地显示实际和模型。估计的模型是MA(15)。

data project;
input dj 1-6 aus 7-14;
datalines;
3651  1962.2    
3645  1977.1    
3626  1968.4
3634  1952.0
3620.5  1962.5
3607  1967.8
3589  1939.5
3590  1931.4
3622  1941.5
3634  1938.3
3616  1912.9
3634  1903.6
3631  1902.6
3613  1925.5
3576  1924.1
3537  1925.2
3547  1919.3
3540  1928.6
3543  1946.5
3568  1943.0
3566  1942.3
3566  1951.4
3555  1964.4
3581  1972.7
3578  1977.0
3587  1998.5
3599  2018.8
3584  2022.5
3585  2026.2
3593  2039.8
3593  2028.0
3603  2038.6
3622  2062.0
3630  2074.1
3642  2085.5
3635  2075.5
3645  2051.7
3636  2060.4
3649  2061.4
3674  2046.9
3672  2055.7
3665  2068.3
3688  2076.3
3681  2112.2
3693  2132.4
3698  2125.3
3662  2108.4
3625  2101.6
3643  2079.9
3648  2054.2
3640  2050.8
3664  2042.9
3662  2052.4
3684  2074.0
3678  2082.9
3711  2083.8
3704  2104.3
3685  2108.0
3694  2083.2
3670  2049.3
3674  2009.6
3688  2032.4
3686  2042.0
3684  2043.1
3678  2010.3
3684  2009.4
3697  2005.4
3702  2047.3
3704  2047.4
3710  2053.7
3719  2073.9
3734  2096.0
3730  2095.7
3741  2084.9
3764  2094.5
3743  2086.6
3717  2069.9
3726  2074.8
3752  2080.2
3755  2076.0
3745  2067.0
3762  2053.2
3758  2068.8
3776  2089.2
3794  2126.9
3776  2154.5
3757  2173.6
3784  2174.3
3799  2193.4
3804  2200.3
3821  2186.0
3866  2198.6
3850  2206.7
3849  2195.6
3842  2177.5
3867  2206.4
3870  2238.2
3870  2232.1
3884  2248.2
3892  2266.2
3914  2250.3
3913  2224.5
3895  2221.9
3926  2250.7
3945  2259.9
3978  2310.8
3964  2310.1
3976  2312.1
3968  2340.6
3871  2332.8
3906  2281.1
3906  2305.4
3932  2270.9
3895  2234.3
3895  2241.4
3904  2238.6
3928  2234.0
3937  2249.0
3923  2240.9
3888  2223.2
3900  2178.5
3912  2202.5
3892  2218.9
3840  2197.0
3839  2148.8
3832  2180.1
3809  2181.7
3832  2154.0
3824  2151.4
3832  2116.8
3856  2144.7
3852  2171.7
3853  2146.8
3831  2155.1
3863  2153.1
3863  2179.3
3850  2172.5
3848  2173.5
3865  2164.4
3896  2163.5
3865  2140.5
3863  2140.8
3869  2180.9
3821  2169.8
3775  2151.6
3762  2108.9
3699  2100.8
3627  2092.4
3636  2053.1
3675  2050.0
3680  2084.1
3693  2087.4
3674  2082.0
3689  2076.0
3682  2095.1
3662  2114.7
3663  2095.0
3662  2080.6
3620  2095.9
3620  2061.4
3599  2046.6
3653  2029.6
3649  2042.5
3700  2069.4
3684  2059.7
3668  2069.1
3682  2066.1
3701  2047.9
3714  2044.2
3698  2018.4
3696  1988.1
3670  2004.3
3629  2009.3
3656  2008.2
3629  2034.6
3653  2041.4
3660  2070.0
3672  2110.9
3721  2096.0
3733  2107.8
3759  2093.7
3766  2103.9
3742  2121.0
3745  2132.4
3755  2105.9
3754  2096.9
3757  2102.2
3757.5  2091.8
3758  2081.8
3761  2097.2
3759  2077.0
3772  2078.6
3768  2072.5
3756  2070.2
3749  2079.7
3753  2076.7
3773  2069.4
3815  2076.6
3790  2074.4
3811  2056.0
3777  2051.2
3742  2024.4
3708  1993.6
3725  2010.9
3699  2022.5
3637  2017.9
3686  1957.4
3670  1974.4
3667  1975.1
3625  1989.1
3647  1965.8
3649.5  1987.1
3652  2003.4
3674  1991.2
3688  1962.2
3709  1964.9
3703  1961.2
3703  1972.9
3704  1978.6
3739  2007.7
3754  2058.0
3755  2072.3
3748  2077.4
3727  2078.6
3732  2049.2
3735  2052.5
3742  2048.3
3736  2041.3
3720  2041.7
3731  2042.1
3764  2061.5
3798  2082.1
3796  2086.9
3793  2072.3
3766  2083.5
3747  2091.9
3754  2081.1
3756  2086.8
3767  2076.5
3751  2062.8
3769  2052.0
3760  2055.9
3785  2040.0
3776  2059.5
3755  2066.8
3755  2061.3
3751  2063.6
3776  2051.6
3847  2061.1
3830  2077.8
3881  2077.2
3899  2111.8
3917  2116.5
3913  2122.1
3901  2105.5
3886    2107
3892.5  2095.5
3899  2103.6
3886  2104.4
3908  2089.1
3875  2070.6
3860  2032.9
3880  2043.6
3895  2050.5
3954  2050.8
3933    2059
3937  2049.1
3869  2045.1
3852  2026.6
3837  2028.2
3832  2027.7
3849    2030
3863  2013.8
3878  2014.2
3855  2030.6
3843  2028.7
3847  2030.9
3801    1998
3787  1979.8
3776  1976.3
3797  1967.5
3821    1988
3877  2003.6
3875  2002.6
3890  1998.9
3910    2006
3924  2014.2
3918  2003.4
3936  2013.4
3911  2016.3
3891  2034.6
3855  2034.2
;
run;
proc print data= project;
run;
proc arima data=project;
identify var=aus
run;
proc arima data = project plots(only)=(forecast(FORECAST));
identify var=aus(1) nlag=20;
estimate q=(1,15);
forecast lead = 90 out= results;
run;

1 个答案:

答案 0 :(得分:0)

我建议使用新的SAS GTL(图形模板语言)来完成它。 SAS文档中可以找到大量示例:

http://support.sas.com/documentation/cdl/en/grstatgraph/65377/HTML/default/viewer.htm#p07ssfftzsass9n1x8lb94xnref5.htm

请注意,GTL仅适用于较新版本的SAS(我相信9.1以后的版本?)。