Time Series Analysis Package

STATIONARITY Object

The STATIONARITY class object functions perform the stationarity tests on a time series and store all the results that you can retrieve later by using the OUTSTATIONARITY object.

Table 24 summarizes the methods that are associated with the STATIONARITY object.

Table 24: Methods of the STATIONARITY Object

Method Description
Initialize Initialize the STATIONARITY object
SetY Set the input time series
SetOption Set the specifications
SetLags Set the number of lags
SetDiff Set the differences of series
Run Run the analysis


Figure 15 diagrams the methods of the STATIONARITY object.

Figure 15: STATIONARITY Data Flow

STATIONARITY Data Flow


STATIONARITY Synopsis

  • DECLARE OBJECT obj (STATIONARITY);

Method syntax, in order of typical usage:

STATIONARITY Methods

STATIONARITY.Initialize Method

  • rc=obj.Initialize ();

Initializes a STATIONARITY object to an empty state. This method must be called before the time series array and other attributes are specified for the STATIONARITY object.

Arguments

There are no arguments associated with this method.

STATIONARITY.SetY Method

  • rc=obj.SetY (YSeries);

Specifies the time series array (YSeries) for the STATIONARITY object.

Input Arguments

You must specify the following input argument:

YSeries

specifies a numeric array that contains the time series for the STATIONARITY object to analyze.

STATIONARITY.SetOption Method

  • rc=obj.SetOption ('Name',Value <,'Name',Value, …> );

Sets a named option for the STATIONARITY object.

Input Arguments

You must specify at least one of the following for 'Name' and its associated Value:

'METHOD'

takes a string Value that specifies the stationarity test method, which can be the augmented Dickey-Fuller (ADF) test, Phillips-Perron (PP) test, or random-walk-with-drift (RW) test. You can specify one of the following Values:

ADF | Dickey-Fuller

specifies the augmented Dickey-Fuller test.

PP | Phillips-Perron

specifies the Phillips-Perron test.

RW | Random-Walk

specifies the random-walk-with-drift test.

The default is ADF.

'ORDER' | 'DLAG'

takes an integer Value that specifies lags for the stationarity test method.

The Value must be a positive integer between 1 and 12 (inclusive), denoting the order that the STATIONARITY object uses for the test methods. If the value is between 2 and 12 (inclusive) and the method is ADF, the seasonal ADF test is performed. If the value is 1 and the method is ADF, the nonseasonal ADF test is performed. For the PP or RW method, values between 2 and 12 (inclusive) are discarded and the default order of 1 is used.

The default value is 1.

STATIONARITY.SetLags Method

  • rc=obj.SetLags (Value);

Sets the lags that the STATIONARITY object uses in the stationarity test calculation.

Input Arguments

You must specify the following input argument:

Value

specifies the number of lags to use in the calculation. The allowable value type is an array or a numeric scalar. Specifying a scalar Value is equivalent to specifying an array that contains consecutive numbers from 0 to Value (inclusive).

The default value is 2, which is equivalent to an array {0, 1, 2}.

STATIONARITY.SetDiff Method

  • rc=obj.SetDiff (Value);

Sets a differencing option for the STATIONARITY object.

Input Arguments

You must specify the following input argument:

Value

specifies a nonnegative integer scalar or an array of nonnegative integers. The STATIONARITY object differences the time series for each integer value in succession prior to performing the test calculations. For example, if you specify the array {1, 3}, then the object first takes the first-order difference and then applies a third-order difference to that first-order-differenced series.

The default value is 0.

STATIONARITY.Run Method

  • rc=obj.Run ();

Runs the STATIONARITY object to perform various stationarity test calculations by using the time series array that you specify in the SetY method according to the options that you specify in other setter methods, such as SetOption. Upon successful completion, you can extract various results from the OUTSTATIONARITY object.

Last updated: July 09, 2026