Resources

Money Demand Model


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

                    SAS Sample Library

        Name: autex05.sas
 Description: Example program from SAS/ETS User's Guide,
              The AUTOREG Procedure
       Title: Money Demand Model
     Product: SAS/ETS Software
        Keys: autoregression
        PROC: AUTOREG
       Notes:

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

data money;
   date = intnx( 'qtr', '01jan1968'd, _n_-1 );
   format date yyqc6.;
   input m1 gnp gdf ycb @@;
   m = log( 100 * m1 / gdf );
   m1cp = log( 100 * lag(m1) / gdf );
   y = log( gnp );
   intr = log( ycb );
   infr = 100 * log( gdf / lag(gdf) );
   label m    = 'Real Money Stock (M1)'
         m1cp = 'Lagged M1/Current GDF'
         y    = 'Real GNP'
         intr = 'Yield on Corporate Bonds'
         infr = 'Rate of Prices Changes';
datalines;
  187.15 1036.22   81.18  6.84
  190.63 1056.02   82.12  6.97
  194.30 1068.72   82.80  6.98
  198.55 1071.28   84.04  6.84
  201.73 1084.15   84.97  7.32
  203.18 1088.73   86.10  7.54
  204.18 1091.90   87.49  7.70
  206.10 1085.53   88.62  8.22
  207.90 1081.32   89.89  8.86
  209.78 1083.01   91.07  8.70
  212.78 1093.37   91.79  9.40
  216.08 1084.60   93.03  9.33
  220.28 1111.55   94.40  8.74
  225.25 1116.93   95.70  8.45
  228.45 1125.78   96.52  8.76
  230.70 1135.43   97.39  8.48
  235.60 1157.21   98.72  8.23
  239.38 1178.54   99.42  8.24
  244.55 1193.12  100.25  8.23
  250.70 1214.79  101.54  8.06
  254.80 1246.72  102.95  7.90
  258.40 1248.31  104.75  8.09
  261.03 1255.70  106.53  8.24
  264.68 1266.05  108.74  8.41
  268.77 1253.34  110.72  8.58
  271.23 1254.67  113.48  8.88
  273.73 1246.86  116.42  9.55
  276.73 1230.32  119.79 10.41
  278.75 1204.26  122.88 10.62
  283.80 1218.82  124.44 10.34
  288.13 1246.05  126.68 10.33
  290.88 1257.31  128.99 10.37
  295.18 1284.97  130.12 10.24
  299.53 1293.68  131.30  9.83
  303.35 1301.08  132.89  9.63
  309.35 1313.06  134.99  9.29
  316.55 1341.23  136.80  9.08
  321.80 1363.28  139.01  9.07
  327.60 1385.80  141.03  8.87
  334.80 1388.51  143.24  8.89
  341.13 1400.01  145.12  9.17
  348.70 1436.97  148.89  9.32
  355.45 1448.82  152.02  9.60
  361.38 1468.40  155.38  9.59
  367.08 1472.57  158.60 10.13
  376.10 1469.20  161.85 10.33
  384.58 1486.59  165.13 10.29
  388.38 1489.38  168.05 11.40
  394.30 1496.40  171.94 12.42
  390.00 1461.40  176.46 14.19
  405.50 1464.20  180.24 12.67
  416.10 1477.90  185.13 14.23
  420.90 1513.50  190.01 15.03
  429.30 1511.70  193.03 15.56
  432.60 1522.10  197.71 16.17
  437.50 1501.30  201.69 17.11
  448.80 1483.50  203.98 17.10
  451.30 1480.50  206.77 16.78
  458.20 1477.10  208.52 16.80
  475.70 1478.80  210.28 14.73
  490.90 1491.00  212.86 13.94
  505.20 1524.80  214.26 13.29
  517.20 1550.20  215.88 13.39
  523.40 1572.70  218.20 13.46
;


proc print data=money(obs=8);
run;

title 'Partial Adjustment Money Demand Equation';
title2 'Quarterly Data - 1968:2 to 1983:4';

proc autoreg data=money outest=est covout;
   model m = m1cp y intr infr / dw=4 dwprob;
run;

proc autoreg data=money;
   model m = m1cp y intr infr / nlag=1 method=ml maxit=50;
   output out=a p=p pm=pm r=r rm=rm ucl=ucl lcl=lcl
                uclm=uclm lclm=lclm;
run;

proc print data=a(obs=8);
   var p pm r rm ucl lcl uclm lclm;
run;