ar
Introduction
The auto-regressive block is defined by
where:
is an auto-regressive polynomial.
Let
be the autocovariances of the process
Using those notations, the state-space block can be written as
follows :
State block:
The state block can be extended with additional lags. That can be useful
in complex (multi-variate) models
Dynamics
Default loading
Initialization
is the unconditional covariance of the state array; it can be easily
derived using the MA representation. We have:
b_ar<-ar("ar", c(-.2, .4, -.1), nlags=5)
knit_print(block_t(b_ar))
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] -0.2 0.4 -0.1 0 0
#> [2,] 1.0 0.0 0.0 0 0
#> [3,] 0.0 1.0 0.0 0 0
#> [4,] 0.0 0.0 1.0 0 0
#> [5,] 0.0 0.0 0.0 1 0
ar2
Introduction
An alternative representation of the auto-regressive block will be
very useful for the purposes of reflecting expectations. The process is
defined as above:
where:
is an auto-regressive polynomial. However, modeling data that refers
to expectations may require including conditional expectations in the
state vector. Thus, the same type of representation that is used for the
ARMA model will be considered here.
Let
be the autocovariances of the model. We also define the size of our
state vector as
,
where
is the forecast horizon desired by the user. If the user needs to use
lagged values, whose default value is zero. Then the size of the state
vector will be
Using those notations, the state-space model can be written as
follows :
State block:
where
is the orthogonal projection of
on the subspace generated by
.
Thus, it is the forecast function with respect to the semi-infinite
sample. We also have that
Dynamics
with
for
Default loading
Initialization
is the unconditional covariance of the state array; it can be easily
derived using the MA representation. We have:
b_ar2<-ar2("ar2", c(-.2, .4, -.1), nlags=3, nfcasts=2)
knit_print(block_t(b_ar2))
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0 1 0 0.0 0.0 0.0
#> [2,] 0 0 1 0.0 0.0 0.0
#> [3,] 0 0 0 1.0 0.0 0.0
#> [4,] 0 0 0 0.0 1.0 0.0
#> [5,] 0 0 0 0.0 0.0 1.0
#> [6,] 0 0 0 -0.1 0.4 -0.2
arma
Introduction
The arma block is defined by
where:
are the auto-regressive and the moving average polynomials.
The MA representation of the process is
.
Let
be the autocovariances of the model. We also define:
.
Using those notations, the state-space block can be written as
follows :
State block:
where
is the orthogonal projection of
on the subspace generated by
.Thus,
it is the forecast function with respect to the semi-infinite sample. We
also have that
Dynamics
with
for
Default loading
Initialization
is the unconditional covariance of the state array; it can be easily
derived using the MA representation. We have:
b_arma<-arma("arma", ar=c(-.2, .4, -.1), ma=c(.3, .6))
knit_print(block_t(b_arma))
#> [,1] [,2] [,3]
#> [1,] 0.0 1.0 0.0
#> [2,] 0.0 0.0 1.0
#> [3,] 0.1 -0.4 0.2
knit_print(block_p0(b_arma))
#> [,1] [,2] [,3]
#> [1,] 1.3501359 0.6394319 0.2517752
#> [2,] 0.6394319 0.3501359 0.1394319
#> [3,] 0.2517752 0.1394319 0.1001359