Time Series Analysis and Control Examples |
Least Squares and Householder Transformation
Consider the univariate AR(p) process

Define the design matrix X.
![X= [1 & y_p & ... & y_1 \ \vdots & \vdots & \ddots & \vdots \ 1 & y_{T-1} & ... & y_{T-p}
]](images/i10eq193.gif)
Let y = (yp+1, ... ,yn)'.
The least squares estimate,
,is the approximation to the maximum likelihood
estimate of
if
is assumed to be Gaussian
error disturbances. Combining X and y as
![Z= [X\,\vdots\,y]](images/i10eq196.gif)
the Z matrix can be decomposed as
![Z= Q{U}= Q[R& w_1 \ 0 & w_2
]](images/i10eq197.gif)
where Q is an orthogonal matrix and R is an upper
triangular matrix, w1 = (w1, ... ,wp+1)', and
w2 = (wp+2,0, ... ,0)'.
![Q^'y= [w_1 \ w_2 \ \vdots \ w_{T-p}
]](images/i10eq198.gif)
The least squares estimate using Householder transformation
is computed by solving the linear system
-
Ra = w1
The unbiased residual variance estimate is

and

In practice, least squares estimation does not require the
orthogonal matrix Q. The TIMSAC subroutines compute
the upper triangular matrix without computing the matrix Q.
Bayesian Constrained Least Squares
Consider the additive time series model

Practically, it is not possible to estimate parameters
a = (T1, ... ,TT,S1, ... ,ST)', since the number of
parameters exceeds the number of available observations.
Let
denote the seasonal difference operator with L
seasons and degree of m; that is,
.Suppose that T=L*n. Some constraints on the trend and seasonal
components need to be imposed such that the sum of squares of
,
, and
is
small. The constrained least squares estimates are obtained by
minimizing
![\sum_{t=1}^T \{(y_t-T_t-S_t)^2 + d^2[s^2(\nabla^k T_t)^2
+ (\nabla_L^m S_t)^2 + z^2(S_t+ ... +S_{t-L+1})^2]\}](images/i10eq207.gif)
Using matrix notation,
-
(y-Ma)'(y-Ma) + (a-a0)'D'D(a-a0)
where
, y = (y1, ... ,yT)',
and a0 is the initial guess of a. The matrix D is a
3T×2T control matrix in which structure varies
according to the order of differencing in trend and season.
![D= d [E_m & 0 \ z{F}& 0 \ 0 & s{G}_k
]](images/i10eq209.gif)
where
![E_m & = & C_m\otimes{I}_L,\hspace*{.25in} m=1,2,3 \ F& = & [1 & 0 & ... & 0 \ ...
...ddots & \ddots & \ddots & \ddots & 0 \ 0 & ... & 0 & -1 & 3 & -3 & 1
]_{Tx T}](images/i10eq210.gif)
The n×n matrix Cm has the same structure
as the matrix Gm, and IL is the
L×L identity matrix.
The solution of the constrained least squares method is equivalent
to that of maximizing the following function

Therefore, the PDF of the data y is

The prior PDF of the parameter vector a is

When the constant d is known, the estimate
of
a is the mean of the posterior distribution, where
the posterior PDF of the parameter a is proportional to
the function L(a).
It is obvious that
is the minimizer of
,where
![\tilde{y} = [y\ D{a}_0
]](images/i10eq216.gif)
![\tilde{D} = [M\ D
]](images/i10eq217.gif)
The value of d is determined by the minimum ABIC
procedure. The ABIC is defined as
![{\rm ABIC} = T\log[\frac{1}T\Vert{g}(a| d)\Vert^2]
+ 2\{\log[\det(D^'D+M^'M)]
- \log[\det(D^'D)]\}](images/i10eq218.gif)
State Space and Kalman Filter Method
In this section, the mathematical formulas for state space
modeling are introduced. The Kalman filter algorithms are
derived from the state space model. As an example, the state
space model of the TSDECOMP subroutine is formulated.
Define the following state space model:

where
and
.If the observations, (y1, ... ,yT), and the initial
conditions,
and
, are
available, the one-step predictor
of the state vector xt and its mean square error (MSE)
matrix
are
written as


Using the current observation, the filtered value of
xt
and its variance
are updated.


where
and
.The log-likelihood function is computed as

where vt|t-1 is the conditional variance of
the one-step prediction error et.
Consider the additive time series decomposition

where xt is a (K×1) regressor vector and
is a (K×1) time-varying coefficient vector.
Each component has the following constraints:

where
and
.The AR component ut is assumed to be stationary. The
trading day component TDt(i) represents the number of the
ith day of the week in time t.
If k=3, p=3, m=1, and L=12 (monthly data),

The state vector is defined as

The matrix F is
![F= [F_1 & 0 & 0 & 0 \ 0 & F_2 & 0 & 0 \ 0 & 0 & F_3 & 0 \ 0 & 0 & 0 & F_4
]](images/i10eq239.gif)
where
![F_1 = [3 & -3 & \phantom{-}1 \ 1 & 0 & 0 \ 0 & 1 & 0
]](images/i10eq240.gif)
![F_2 = [-1^' & -1 \ I_{10} & 0
]](images/i10eq241.gif)
![F_3 = [\alpha_1 & \alpha_2 & \alpha_3 \ 1 & 0 & 0 \ 0 & 1 & 0
]](images/i10eq242.gif)
-
F4 = I6
-
1' = (1,1, ... ,1)
The matrix G can be denoted as
![G = [g_1 & 0 & 0 \ 0 & g_2 & 0 \ 0 & 0 & g_3 \ 0 & 0 & 0 \ 0 & 0 & 0 \ 0 & 0 & 0 \ 0 & 0 & 0 \ 0 & 0 & 0 \ 0 & 0 & 0
]](images/i10eq243.gif)
where
![g_1 = g_3 = [1 & 0 & 0
]^'](images/i10eq244.gif)
![g_2 = [1 & 0 & 0 & 0 & 0 & 0
]^'](images/i10eq245.gif)
Finally, the matrix Ht is time-varying,
![H_t = [1 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & h^'_t
]](images/i10eq246.gif)
where
![h_t & = & [D_t(1) & D_t(2) & D_t(3) & D_t(4) & D_t(5) & D_t(6)
]^' \ D_t(i) & = & T\!D_t(i)-T\!D_t(7),\hspace*{.5in}i=1, ... ,6](images/i10eq247.gif)
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.