Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Working with Time Series Data

Using PROC TIMEPLOT

The TIMEPLOT procedure plots time series data vertically on the page instead of horizontally across the page as the PLOT procedure does. PROC TIMEPLOT can also print the data values as well as plot them.

The following statements use the TIMEPLOT procedure to plot CPI in the USCPI data set. Only the last 14 observations are included in this example. The plot is shown in Figure 2.19.

   proc timeplot data=uscpi;
      plot cpi;
      id date;
      where date >= '1jun90'd;
   run;

 
                                                                                
                                                                                
                                                                                
   date        cpi      min                                                  max
                        129.9                                              136.2
                       *-------------------------------------------------------*
JUN1990     129.90     |c                                                      |
JUL1990     130.40     |    c                                                  |
AUG1990     131.60     |               c                                       |
SEP1990     132.70     |                        c                              |
OCT1990     133.50     |                               c                       |
NOV1990     133.80     |                                  c                    |
DEC1990     133.80     |                                  c                    |
JAN1991     134.60     |                                         c             |
FEB1991     134.80     |                                           c           |
MAR1991     135.00     |                                             c         |
APR1991     135.20     |                                              c        |
MAY1991     135.60     |                                                  c    |
JUN1991     136.00     |                                                     c |
JUL1991     136.20     |                                                      c|
                       *-------------------------------------------------------*
Figure 2.19: Output Produced by PROC TIMEPLOT

The TIMEPLOT procedure has several interesting features not discussed here. Refer to "The TIMEPLOT Procedure" in the SAS Procedures Guide for more information.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.