Previous Page | Next Page

The TIMESERIES Procedure

TREND Statement

TREND statistics < / options > ;
A TREND statement can be used with the TIMESERIES procedure to specify options related to trend analysis of the time-stamped transactional data. Only one TREND statement is allowed. The options specified affect all variables specified in the VAR statements.

The following trend statistics are available:

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 none of the trend statistics are specified, the default is as follows:

   trend n min max mean std;

The following options can be specified in the TREND statement following the 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 allowable number of SAS variables.

If the NPERIODS= option is not specified, all of the periods specified between the ID statement START= and END= options is stored. If either of the START= or END= options are not specified, the default is the seasonality specified by the PROC TIMESERIES statement SEASONALITY= option or implied by the ID statement INTERVAL= option. If the seasonality is zero, the default is NPERIODS=5.

TRANSPOSE= NO | YES

TRANSPOSE=YES specifies that the OUTTREND= data set be recorded with the time periods as the column names instead of with the statistics as the column names. The first and last time periods stored in the OUTTREND= data set correspond to the period of the ID statement START= and END= options, respectively. If only the ID statement END= option is specified, the last time ID value of each accumulated time series corresponds to the last time period column. If only the ID statement START= option is specified, 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 with the ID statement, the first time ID value of each accumulated time series corresponds to the first time period column. The TRANSPOSE=NO option is useful for analyzing or displaying the trend analysis results with SAS/GRAPH procedures. The TRANSPOSE=YES option is useful for analyzing the trend analysis results from using other SAS procedures or SAS Enterprise Miner. The default is TRANSPOSE=YES.

Previous Page | Next Page | Top of Page