Using pm.MvNormal for setting prior distribution

Hi, thanks for your comments. However, when I duplicate your code, Python reports the error: “ValueError: Input dimension mis-match. (input[0].shape[1] = 5, input[1].shape[1] = 1)”

I put my entire code as follows,

import numpy as np
import pymc3 as pm
import theano.tensor as tt
delta=[8.30612523,8.40355324,8.50030771,8.59642241,8.69192957]
growth=[3.20924e-05,3.25786e-05,3.46921e-05,3.34784e-05,4.08747e-05]
with pm.Model() as model_a:
mu = [2.3075560664282255,-14.925081358163954]
Cov=np.array([[0.0179,-0.0432517],[-0.0432517,0.108137]])
x = pm.MvNormal(‘x’, mu=mu, cov=Cov,shape=(1,2))
c,m=tt.split(x,[1,1],n_splits=2,axis=1)
deltmu=pm.Deterministic(‘deltmu’,c*delta**m)
deltmu=tt.squeeze(deltmu)
y=pm.Normal(‘y’,mu=deltmu[0],sigma=0.1,observed=growth)
trace_a=pm.sample(10000,cores=1)

I think this error is caused by shape of tensor. Could you advise how to fix it.

Thanks a lot for your kind help.