Super helpful, thank you (and for the very prompt reply!)
So, if I’ve understood correctly, to implement the equivalent of the a.mat and b.mat from this example:
# a.mat
## [,1] [,2] [,3]
## [1,] NA 0 0
## [2,] NA NA 0
## [3,] NA NA NA
# b.mat
## [,1] [,2] [,3]
## [1,] NA 0 0
## [2,] 0 NA 0
## [3,] 0 0 NA
The lines in your first example one would have to change would be:
state_chol, _, _ = pm.LKJCholeskyCov(
"state_chol", eta=1, n=bvar_mod.k_posdef, sd_dist=pm.Exponential.dist(lam=1)
)
ar_params = pm.Normal("ar_params", mu=0, sigma=1, dims=ar_dims)
state_cov = pm.Deterministic("state_cov", state_chol @ state_chol.T, dims=state_cov_dims)
Am I right in saying that a.mat is ar_params and b.mat is state_cov in your example? And apologies if this is a stupid question, but how do you modify the pm.Normal and pm.Deterministic lines to implement matrix structures with zeros in the right places?