You can use a TREND statement to specify statistics and related options for trend analysis of the time-stamped transactional data. Only one TREND statement is allowed. The specified options affect all variables that are listed in the VAR statements.
You can specify the following trend statistics:
- NOBS
-
number of observations
- N
-
number of nonmissing observations
- NMISS
-
number of missing observations
- MINIMUM
-
minimum value
- MAXIMUM
-
maximum value
- RANGE
-
range value
- SUM
-
summation value
- MEAN
-
mean value
- STDDEV
-
standard deviation
- CSS
-
corrected sum of squares
- USS
-
uncorrected sum of squares
- MEDIAN
-
median value
If you do not specify any trend statistics, the default is as follows:
trend n min max mean std;
You can also specify the following options after a slash (/):
-
NPERIODS=number
-
specifies the number of time periods to be stored in the OUTTREND= data set when the TRANSPOSE=YES option is specified. If
the TRANSPOSE option is not specified, the NPERIODS= option is ignored. The NPERIODS= option specifies the number of OUTTREND=
data set variables to contain the trend statistics and is therefore limited to the maximum allowed number of SAS variables.
If you do not specify this option, all the periods that are specified between the START= and END= options in the ID statement
are stored. If at least one of the START= or END= options is not specified, the default magnitude is the seasonality that
is specified in the SEASONALITY= option in the PROC TIMESERIES statement or implied by the INTERVAL= option in the ID statement.
If only the START= option or both the START= and END= options are specified and the seasonality is zero, the default is NPERIODS=5.
If only the END= option or neither the START= nor END= option is specified and the seasonality is zero, the default is NPERIODS=–5.
-
TRANSPOSE=NO | YES
-
specifies which values are recorded as column names in the OUTTREND= data set.
- NO
-
specifies that the specified groups be recorded as the column names. This option is useful for displaying the SSA results.
- YES
-
specifies that the time periods instead of the specified groups be recorded as the column names. The first and last time periods
stored in the OUTSSA= data set correspond to the periods that are specified in the START= and END= options, respectively,
in the ID statement. If only the END= option is specified in the ID statement, the last time ID value of each accumulated
time series corresponds to the last time period column. If only the START= option is specified in the ID statement, the first
time ID value of each accumulated time series corresponds to the first time period column. If neither the START= option nor
the END= option is specified in the ID statement, the first time ID value of each accumulated time series corresponds to the
first time period column. This option is useful for analyzing the SSA results using SAS Enterprise Miner software.
By default, TRANSPOSE=NO.