Resources

Components Estimation - Quarterly Data

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

                    SAS Sample Library

        Name: x11ex02.sas
 Description: Example program from SAS/ETS User's Guide,
              The X11 Procedure
       Title: Components Estimation - Quarterly Data
     Product: SAS/ETS Software
        Keys: seasonal adjustment of time series
        PROC: X11
       Notes:

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

data quarter;
   input date yyq6. +1 fy35rr 5.2;
   format date yyq6.;
datalines;
1971Q1 6.59
1971Q2 6.01
1971Q3 6.51
1971Q4 6.18
1972Q1 5.52
1972Q2 5.59
1972Q3 5.84
1972Q4 6.33
1973Q1 6.52
1973Q2 7.35
1973Q3 9.24
1973Q4 10.08
1974Q1 9.91
1974Q2 11.15
1974Q3 12.40
1974Q4 11.64
1975Q1 9.94
1975Q2 8.16
1975Q3 8.22
1975Q4 8.29
1976Q1 7.54
1976Q2 7.44
1976Q3 7.80
1976Q4 7.28
;


title 'Monthly Retail Sales Data (in $1000)';
proc x11 data=quarter;
   var fy35rr;
   quarterly date=date;
   tables b1 d11;
   output out=out b1=b1 d10=d10 d11=d11 d12=d12 d13=d13;
run;