get_Q_0: Compute Time-Invariant Covariance Matrix

get_Q_0R Documentation

Compute Time-Invariant Covariance Matrix

Description

Computes the invariant covariance matrix for a vector autoregression model.

Usage

get_Q_0(Qmat, Fmat)

Arguments

Qmat

covariance matrix in transition density.

Fmat

coefficients in transition density.

Value

The invariant covariance matrix.

Examples

Fmat <- matrix(c(.8, .4, .1, .5), 2, 2)
Qmat <- matrix(c( 1, .5, .5,  2), 2)

x1 <- get_Q_0(Qmat = Qmat, Fmat = Fmat)
x2 <- Qmat
for(i in 1:101)
  x2 <- tcrossprod(Fmat %*% x2, Fmat) + Qmat
stopifnot(isTRUE(all.equal(x1, x2)))



boennecd/dynamichazard documentation built on Oct. 11, 2022, 2:41 p.m.