Chapter Contents |
Previous |
Next |

Language Reference |

**CALL TSDECOMP(***comp, est, aic, data, <,xdata, order, sorder,*

*nar, npred, init, opt, icmp, print>***);**

The inputs to the TSDECOMP subroutine are as follows:

*data*- specifies a
*T*×1 (or 1 ×*T*) data vector. *xdata*- specifies a
*T*×*K*explanatory data matrix. *order*- specifies the order of trend differencing (0, 1, 2, or 3).
The default is 2.
*sorder*- specifies the order of seasonal differencing (0, 1, or 2).
The default is 1.
*nar*- specifies the order of the AR process.
The default is 0.
*npred*- specifies the length of the forecast
beyond the available observations.
The default is 0.
*init*- specifies the initial values of parameters.
The initial values are specified as variances for trend
difference equation, AR process, seasonal difference
equation, regression equation, and partial AR coefficients.
The corresponding default variance values
are 0.005, 0.8, 1E-5, and 1E-5.
The default partial AR coefficient values are determined as
*opt*- specifies the options vector.
*opt*[1]- specifies the mean deletion option.
The mean of the original series is subtracted
from the series if
*opt*[1]=-1. By default, the original series is processed (*opt*[1]=0). When regressors are specified, only the*opt*[1]=0 option is allowed.

*opt*[2]- specifies the trading day adjustment.
The default is
*opt*[2]=0.

*opt*[3]- specifies the year () when the series starts.
If
*opt*[3]=0, there is no trading day adjustment. By default,*opt*[3]=0.

*opt*[4]- specifies the number of seasons
within a period (
*speriod*). By default,*opt*[4]=12.

*opt*[5]- controls the transformation of the original series.
If
*opt*[5]=1, log transformation is requested. By default, there is no transformation (*opt*[5]=0).

*opt*[6]- specifies the maximum number of iterations allowed.
The default is
*opt*[6] = 200.

*opt*[7]- specifies the update technique for the
quasi-Newton optimization technique.
If
*opt*[7]=1 is specified, the dual Broyden, Fletcher, Goldfarb, and Shanno (BFGS) update method is used. If*opt*[7]=2 is specified, the dual Davidon, Fletcher, and Powell (DFP) update method is used. The default is*opt*[7]=1.

*opt*[8]- specifies the line search technique for
the quasi-Newton optimization method.
The default is
*opt*[8] = 2.

*opt*[8]=1- specifies a line search method that requires the
same number of objective function and gradient
calls for cubic interpolation and extrapolation.

*opt*[8]=2- specifies a line search method that requires
more objective function calls than gradient
calls for cubic interpolation and extrapolation.

*opt*[8]=3- specifies a line search method that requires the
same number of objective function and gradient
calls for cubic interpolation and extrapolation.

*opt*[8]=4- specifies a line search method that requires the
same number of objective function and gradient calls
for cubic interpolation and stepwise extrapolation.

*opt*[8]=5- specifies a line search method that is
a modified version of
*opt*[8]=4.

*opt*[8]=6- specifies the golden section line search method that
uses only function values for linear approximation.

*opt*[8]=7- specifies the bisection line search method that
uses only function values for linear approximation.

*opt*[8]=8- specifies the Armijo line search method that uses only function values for linear approximation.

*opt*[9]- specifies the upper bound of the variance estimates.
If you specify
*opt*[9]=*value*, the variances are estimated with the constraint that . When you specify the*opt*[9]=0 option, the upper bound is not imposed. The default is*opt*[9]=0.

*opt*[10]- specifies the length of data used in backward
filtering for the Kalman filter initialization.
The default value of
*opt*[10] is 100 if the number of observations is greater than 100; otherwise, the default value is the number of observations.

*icmp*- specifies which component is calculated.

*icmp*=1- requests the estimate and forecast of trend component.

*icmp*=2- requests the estimate and forecast of seasonal component.

*icmp*=3- requests the estimate and forecast of AR component.

*icmp*=4- requests the trading day adjustment component.

*icmp*=5- requests the regression component.

*icmp*=6- requests the time-varying regression coefficients.

You can calculate multiple components by specifying a vector. For example, you can specify*icmp*={1 2 3 5}. *print*- specifies the print option.
By default, printed output is suppressed (
*print*=0). If you specify*print*=1, the subroutine prints the final estimates. The iteration history is printed if you specify*print*=2.

*comp*- refers to the estimate and forecast of the trend component.
*est*- refers to the parameter estimates
including coefficients of the AR process.
*aic*- refers to the AIC statistic obtained from the final estimates.

The trend components are constrained as follows:

The seasonal components are denoted as a stochastically perturbed equation:

The stationary autoregressive (AR) process is denoted as a stochastically perturbed equation:

The time-varying regression coefficients are estimated if you include exogenous variables:

The trading day adjustment component
*TD*_{t} is deterministically restricted.
See the section, "State Space and Kalman Filter Method",
for more information.

You can estimate the time-varying coefficient model as follows:

call tsdecomp COMP=beta ORDER=0 SORDER=0 NAR=0 DATA=y XDATA=x ICMP=6;The output matrix BETA contains time-varying regression coefficients.

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.