Resources

Comparing Estimates and Models

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: autex02.sas
 Description: Example program from SAS/ETS User's Guide,
              The AUTOREG Procedure
       Title: Comparing Estimates and Models
     Product: SAS/ETS Software
        Keys: autoregression
        PROC: AUTOREG
       Notes:

--------------------------------------------------------------*/

title 'Grunfeld''s Investment Models Fit with Autoregressive Errors';
data grunfeld;
   input year gei gef gec;
   label gei = 'Gross investment GE'
         gec = 'Lagged Capital Stock GE'
         gef = 'Lagged Value of GE shares';
datalines;
1935     33.1      1170.6     97.8
1936     45.0      2015.8    104.4
1937     77.2      2803.3    118.0
1938     44.6      2039.7    156.2
1939     48.1      2256.2    172.6
1940     74.4      2132.2    186.6
1941    113.0      1834.1    220.9
1942     91.9      1588.0    287.8
1943     61.3      1749.4    319.9
1944     56.8      1687.2    321.3
1945     93.6      2007.7    319.6
1946    159.9      2208.3    346.0
1947    147.2      1656.7    456.4
1948    146.3      1604.4    543.4
1949     98.3      1431.8    618.3
1950     93.5      1610.5    647.4
1951    135.2      1819.4    671.3
1952    157.3      2079.7    726.1
1953    179.5      2371.6    800.3
1954    189.6      2759.9    888.9
;
;* ... data lines omitted ... *;

proc autoreg data=grunfeld;
   model gei = gef gec / nlag=1 dwprob;
   model gei = gef gec / nlag=1 method=uls;
   model gei = gef gec / nlag=1 method=ml;
run;