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)))
Run the code above in your browser using DataLab