Resources

Industrial Conference Board Data

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

                    SAS Sample Library

        Name: pdlex01.sas
 Description: Example program from SAS/ETS User's Guide,
              The PDLREG Procedure
       Title: Industrial Conference Board Data
     Product: SAS/ETS Software
        Keys: time series with distributed lags
        PROC: PDLREG
       Notes:

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

title 'National Industrial Conference Board Data';
title2 'Quarterly Series - 1952Q1 to 1967Q4';

data a;
   input ce ca @@;
   qtr = mod( _n_-1, 4 ) + 1;
   q1  = qtr=1;
   q2  = qtr=2;
   q3  = qtr=3;
datalines;
   2072 1660 2077 1926 2078 2181 2043 1897 2062 1695
   2067 1705 1964 1731 1981 2151 1914 2556 1991 3152
   2129 3763 2309 3903 2614 3912 2896 3571 3058 3199
   3309 3262 3446 3476 3466 2993 3435 2262 3183 2011
   2697 1511 2338 1631 2140 1990 2012 1993 2071 2520
   2192 2804 2240 2919 2421 3024 2639 2725 2733 2321
   2721 2131 2640 2552 2513 2234 2448 2282 2429 2533
   2516 2517 2534 2772 2494 2380 2596 2568 2572 2944
   2601 2629 2648 3133 2840 3449 2937 3764 3136 3983
   3299 4381 3514 4786 3815 4094 4093 4870 4262 5344
   4531 5433 4825 5911 5160 6109 5319 6542 5574 5785
   5749 5707 5715 5412 5637 5465 5383 5550 5467 5465
;

proc pdlreg data=a;
   model ce = q1 q2 q3 ca(5,2) / dwprob;
run;

data b;
   set a;
   ca_1 = lag( ca );
   ca_2 = lag2( ca );
   ca_3 = lag3( ca );
   ca_4 = lag4( ca );
   ca_5 = lag5( ca );
run;

proc reg data=b;
   model  ce = q1 q2 q3 ca ca_1 ca_2 ca_3 ca_4 ca_5;
   restrict   - ca + 5*ca_1 - 10*ca_2 + 10*ca_3 - 5*ca_4 +   ca_5;
   restrict     ca - 3*ca_1 +  2*ca_2 +  2*ca_3 - 3*ca_4 +   ca_5;
   restrict  -5*ca + 7*ca_1 +  4*ca_2 -  4*ca_3 - 7*ca_4 + 5*ca_5;
run;