Sampling plausible posterior x parameter values in linear model for given y

Thanks a lot for the help and the detailed answer!

I added a copy of the notebook fitting my example data with your code in the gist. I made a small adjustment to actually include the observed data and indeed it samples and inference is possible for both p(x|y) and p(y|x), very cool!

Sampling at first had divergences, but after I adjusted the priors for alpha_x and beta_y those went away and sampling got faster. :grinning:

Now how do I continue from here?
My real problem has a handful of predictors and they have added structure (interactions, nonlinear transformations). I guess I would need to extend this to a higher dimensional B and then use the output of the MvNormal as priors to the rest of the model?

I also don’t fully understand (and it seems like it might be related):

1 Like