Skip to content
Prev 13682 / 15274 Next

Problem understanding the code of dse::simulate

On 01/22/2016 11:17 AM, Degang WU wrote:
Degang

In response to your previous question I said the dse specification is

y_t + A_1 y_{t-1} + A_2 y_{t-2} + .. A_p y_{t-p} = e_t (2)

but that is the form corresponding to your specification. In general, 
VAR models can be written

A_0 y_t + A_1 y_{t-1} + A_2 y_{t-2} + .. A_p y_{t-p} = e_t (3)

In your specification A_0 is the identity matrix. For simulation it is 
convenient to re-write (3) as

y_t = (A_0)^-1 (-A_1 y_{t-1} - A_2 y_{t-2} - ... - A_p y_{t-p} + e_t)

R indexes arrays starting with 1, so A_0 is stored in A[1,,]. If A_0 is 
the identity, as in your specification, the inverse will also be 
identity and the multiplication is not necessary.

Paul