CALL TSDECOMP
(comp, est, aic, data, <*>, xdata <*>, order <*>, sorder <*>, nar <*>, npred <*>, init <*>, opt <*>, icmp <*>, print )
;
The TSDECOMP subroutine analyzes nonstationary time series by using smoothness priors modeling.
The input arguments to the TSDECOMP subroutine are as follows:
specifies a (or ) data vector.
specifies a explanatory data matrix.
specifies the order of trend differencing (0, 1, 2, or 3). The default is 2.
specifies the order of seasonal differencing (0, 1, or 2). The default is 1.
specifies the order of the AR process. The default is 0.
specifies the length of the forecast beyond the available observations. The default is 0.
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, 1E5, and 1E5. The default partial AR coefficient values are determined as
|
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 accepted.
specifies the trading day adjustment. The default is opt[2]=0.
specifies the year () when the series starts. If opt[3]=0, there is no trading day adjustment. By default, opt[3]=0.
specifies the number of seasons within a period (speriod). By default, opt[4]=12.
controls the transformation of the original series. If opt[5]=1, log transformation is requested. By default, there is no transformation (opt[5]=0).
specifies the maximum number of iterations allowed. The default is opt[6] = 200.
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.
specifies the line search technique for the quasi-Newton optimization method. The default is opt[8] = 2.
specifies a line search method that requires the same number of objective function and gradient calls for cubic interpolation and extrapolation.
specifies a line search method that requires more objective function calls than gradient calls for cubic interpolation and extrapolation.
specifies a line search method that requires the same number of objective function and gradient calls for cubic interpolation and extrapolation.
specifies a line search method that requires the same number of objective function and gradient calls for cubic interpolation and stepwise extrapolation.
specifies a line search method that is a modified version of opt[8]=4.
specifies the golden section line search method that uses only function values for linear approximation.
specifies the bisection line search method that uses only function values for linear approximation.
specifies the Armijo line search method that uses only function values for linear approximation.
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.
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.
specifies which component is computed.
requests the estimate and forecast of trend component.
requests the estimate and forecast of seasonal component.
requests the estimate and forecast of AR component.
requests the trading day adjustment component.
requests the regression component.
requests the time-varying regression coefficients.
You can compute multiple components by specifying a vector. For example, you can specify icmp={1 2 3 5}.
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.
The TSDECOMP subroutine returns the following values:
refers to the estimate and forecast of the trend component.
refers to the parameter estimates including coefficients of the AR process.
refers to the AIC statistic obtained from the final estimates.
The TSDECOMP subroutine analyzes nonstationary time series by using smoothness priors modeling (see the section Smoothness Priors Modeling for more details). The likelihood function is maximized with respect to hyperparameters. The Kalman filter algorithm is used for filtering, smoothing, and forecasting. The TSDECOMP subroutine decomposes the time series as follows:
|
where represents the trend component, denotes the seasonal component, represents the trading day adjustment component, denotes the autoregressive process component, denotes regression effect components, and represents the irregular term with zero mean and constant variance.
The trend components are constrained as follows:
|
When you specify the ORDER=0 option, the trend component is not estimated. The maximum order of differencing is 3 ().
The seasonal components are denoted as a stochastically perturbed equation:
|
When you specify SORDER=0, the seasonal component is not estimated. The maximum value of is 2 ().
The stationary autoregressive (AR) process is denoted as a stochastically perturbed equation:
|
where is the order of AR process. When NAR=0 is specified, the AR process component is not estimated.
The time-varying regression coefficients are estimated if you include exogenous variables:
|
where contains regressors except the constant term and . The time-varying coefficients follow the random walk process:
|
where is an element of the coefficient vector .
The trading day adjustment component 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.