Time Series Analysis Package
SEASONALINDICES Method
rc = TSA.SEASONALINDICES (y, s, <'mode'>, <'term'>, <indices>);
The SEASONALINDICES function computes the seasonal indices of a univariate time series by using regression seasonal dummies.
Required Arguments
You must specify the following arguments, separated by a comma:
- y
specifies the times series array.
- s
specifies the seasonality to test, where s must be either a positive integer or _SEASONALITY_. The predefined symbol _SEASONALITY_ is the length of the seasonal cycle that is computed by using the seasonality or the time ID interval that you specify in a PROC TSMODEL step or a
runTimeCodeaction call. For more information about predefined symbols, see the section "Predefined Symbols" in Chapter 16, TSMODEL Procedure (SAS Visual Forecasting: Forecasting Procedures). For more information about seasonality, see the section "Seasonality in Models" in Chapter 17, Forecasting Details (SAS Visual Forecasting: Time Series Packages).
Optional Arguments
You can also specify the following arguments, separated by commas. If you want to use a default value for any of these arguments, enter a space for it.
- 'mode'
-
specifies the type of model to be used in the regression.
You can specify the following values within single quotation marks:
- ADD ADDITIVE
uses an additive model.
- MULT MULTIPLICATIVE
uses a multiplicative model.
The default method is ADD.
- 'term'
-
specifies the type of terms to be used in the regression.
You can specify the following values within single quotation marks:
- S
uses only seasonal dummies terms.
- SC
uses only seasonal dummies and constant terms.
- ST
uses only seasonal dummies and trend terms.
- STC
uses seasonal dummies, trend, and constant terms.
- STQ
uses seasonal dummies, trend, and quadratic terms.
- STQC
uses seasonal dummies, trend, quadratic, and constant terms.
The default value is S. Quadratic values can be used only in the additive model.
Returned Values
The SEASONALINDICES function returns the following values:
- rc
-
returns one of the following scalar return codes:
rc Termination Reason 0 Success < 0 Computational failure
Optional Returned Values
You can also specify the following arguments, separated by commas, to request additional returned values. If you do not want the value to be returned, enter a space for it.
- indices
returns an array of seasonal indices.
Example
This example uses the TSMODEL procedure to compute the seasonal indices of the time series Air:
proc tsmodel data=mylib.air outarray=mylib.outarray;
id date interval=month;
var air;
outarrays sindices;
require tsa;
submit;
declare object TSA(tsa);
rc=TSA.SEASONALINDICES(air, _SEASONALITY_, 'ADD', 'STQC', sindices);
endsubmit;
run;