The TIMESERIES Procedure

DECOMP Statement

  • DECOMP components < / options > ;

You can use a DECOMP statement to specify options that are related to classical seasonal decomposition of the time series data. Only one DECOMP statement is allowed. The options affect all variables that are listed in the VAR statements. Decomposition can be performed only when the length of the seasonal cycle specified by the SEASONALITY= option in the PROC TIMESERIES statement or implied by the INTERVAL= option in the ID statement is greater than 1.

You can specify the following seasonal decomposition components:

ORIG | ORIGINAL

original series

TCC | TRENDCYCLE

trend-cycle component

SIC | SEASONIRREGULAR

seasonal-irregular component

SC | SEASONAL

seasonal component

SCSTD

seasonal component standard errors

TCS | TRENDCYCLESEASON

trend-cycle-seasonal component

IC | IRREGULAR

irregular component

SA | ADJUSTED

seasonally adjusted series

PCSA

percent change seasonally adjusted series

TC

trend component

CC | CYCLE

cycle component

If you do not specify any components, then the default is as follows:

   decomp orig tcc sc ic sa;

You can also specify the following options after a slash (/):

MODE=option

specifies the type of decomposition to be used to decompose the time series. You can specify the following options:

ADD | ADDITIVE

uses additive decomposition.

MULT | MULTIPLICATIVE

uses multiplicative decomposition.

LOGADD | LOGADDITIVE

uses log-additive decomposition.

PSEUDOADD | PSEUDOADDITIVE

uses pseudo-additive decomposition.

MULTORADD

uses multiplicative decomposition when the accumulated time series contains only positive values, uses pseudo-additive decomposition when the accumulated time series contains only nonnegative values, and uses additive decomposition otherwise.

Multiplicative and log additive decomposition require strictly positive time series. If the accumulated time series contains nonpositive values and MODE=MULT or MODE=LOGADD, an error results. Pseudo-additive decomposition requires a nonnegative-valued time series. If the accumulated time series contains negative values and the MODE=PSEUDOADD option is specified, an error results.

By default, MODE=MULTORADD.

LAMBDA=number

specifies the Hodrick-Prescott filter parameter for trend-cycle decomposition. Filtering applies when the trend component or the cycle component is requested. If filtering is not specified, this option is ignored. By default, LAMBDA=1600.

NPERIODS=number

specifies the number of time periods to be stored in the OUTDECOMP= data set when the TRANSPOSE=YES option is specified. If TRANSPOSE=NO, the NPERIODS= option is ignored. If number is positive, the first or beginning time periods are recorded. If number is negative, the last or ending time periods are recorded. The NPERIODS= option specifies the number of OUTDECOMP= data set variables to contain the seasonal decomposition and is therefore limited to the maximum allowed number of SAS variables. If the number of time periods exceeds this limit, a warning is printed in the log and the number of periods stored is reduced to the limit.

If the NPERIODS= option is not specified, all of the periods specified between the ID statement START= and END= options are stored. If at least one of the START= or END= options is not specified, the default magnitude is the seasonality 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 OUTDECOMP= data set.

NO

specifies that decomposition components be recorded as the column names. This option is useful for analyzing or displaying the decomposition results with SAS/GRAPH procedures.

YES

specifies that the time periods be recorded as the column names instead of decomposition components. The first and last time periods stored in the OUTDECOMP= data set correspond to the period specified in the START= option and END= option, respectively, in the ID statement. If only the END= option is specified, the last time ID value of each accumulated time series corresponds to the last time period column. If only the 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 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 decomposition results with other SAS procedures or with SAS Enterprise Miner software.

By default, TRANSPOSE=NO.