Consider this model: xi = ax0 + ei, i = 1, …, 4 and x0 = e0. All terms e0, …, e3 are independent and N(0, 1) distributed. Let e = (e0, …, e3) and x = (x0, …x3). Isolating error terms gives that e = L1x where L1 has the form
## Yacas matrix:
## [,1] [,2] [,3] [,4]
## [1,] 1 0 0 0
## [2,] -a 1 0 0
## [3,] -a 0 1 0
## [4,] -a 0 0 1
If error terms have variance 1 then Var(e) = LVar(x)L′ so the covariance matrix is V1 = Var(x) = L−(L−)′ while the concentration matrix (the inverse covariances matrix) is K = L′L.
L1inv <- Simplify(Inverse(L1))
K1 <- Simplify(Transpose(L1) * L1)
V1 <- Simplify(L1inv * Transpose(L1inv))
cat(
"\\begin{align}
K_1 &= ", TeXForm(K1), " \\\\
V_1 &= ", TeXForm(V1), "
\\end{align}", sep = "")
Slightly more elaborate:
## Yacas matrix:
## [,1] [,2] [,3] [,4]
## [1,] 1 0 0 0
## [2,] -a1 1 0 0
## [3,] -a2 0 1 0
## [4,] -a3 0 0 1
## Yacas matrix:
## [,1] [,2] [,3] [,4]
## [1,] w1 0 0 0
## [2,] 0 w2 0 0
## [3,] 0 0 w2 0
## [4,] 0 0 0 w2