Groups data according to the values of the class variables.
- variable(s)
-
specifies one or more variables that the procedure uses
to group the data. Variables in a CLASS statement are called class variables. Class variables can be numeric or character. Class variables can
have continuous values, but they typically have a few discrete values that
define the classifications of the variable. You do not have to sort the data
by class variables.
The values of the class variables appear in the listing. PROC TIMEPLOT
prints and plots one line each time the combination of values of the class
variables changes. Therefore, the output typically is more meaningful if you
sort or group the data according to values of the class variables.
You can use any number of CLASS statements. If you use more than one
CLASS statement, then PROC TIMEPLOT simply concatenates all variables from
all of the CLASS statements. The following form of the CLASS statement includes
three variables:
CLASS variable-1 variable-2 variable-3;
|
It has the same effect as this form:
Normally, you use the CLASS statement with a symbol variable
(see the discussion of plot requests). In this case, the listing
of the plot variable contains a column for each value of the symbol variable,
and each row of the plot contains a point for each value of the symbol variable.
The plotting symbol is the first character of the formatted value of the
symbol variable. If more than one observation within a class has the same
value of a symbol variable, then PROC TIMEPLOT plots and prints only the first
occurrence of that value and writes a warning message to the SAS log.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.