I have 3 variables: S, T and P. My model is (S, P) ~ ((T, P), (T, 0)) + Sigma, where Sigma is the cov matrix.
The length of the data is n=100.
Y = (S, P) of shape (100, 2)
I am not quite sure how to create the square B matrix that has one zero element. mu also needs to be shape (100, 2).
I guess there must be a clever way to do mu = X.dot(B)
with pm.Model() as model: a = pm.Normal('a', 0, 2, shape=2) b = pm.Normal('b', 0, 2, shape=3) sd = pm.Exponential.dist(1.0, shape=2) chol, corr, stds = pm.LKJCholeskyCov('chol', n=2, eta=2, sd_dist=sd, compute_corr=True) # B = [[b0, b1], [b2, 0]] mu = np.zeros((n, 2)) mu[:, 0] = a + b * t + b * p mu[:, 1] = a + b * t pred = pm.MvNormal('pred', mu, chol, observed=Y)