Looking at this, the critical flaw seems to be that it assumes that the variables to be updated – alpha, beta0, and beta1 – are independent.
I’m not sure we’re looking at the same thing. This block:
blocks, mars, zscores = transform_variables(trace, varnames)
# compute the correlation of transformed variables
pcor = np.corrcoef(zscores.T)
print(pcor)
L_p = np.linalg.cholesky(pcor)
pr_lat_z = pm.Normal('pr_copula_z__', 0., 1., shape=(mars.shape[1],))
pr_lat = pm.Deterministic('pr_copula__', tt.dot(L_p, pr_lat_z))
explicitly models the correlation of parameters from the traces.