I have a model in which my data (x and y) are both measured random variables that are expected to have linear covariance i.e. they follow the form
The angle of a line fit to these data (theta) is the only parameter of interest in this case. All other parameters are nuisance parameters. The data in question tend to look something like this:
This is a relatively simple model, and making some assumptions, I have an analytical likelihood function for theta given these data. As it’s a one dimensional problem, I can just do a grid search and
that works fine (or use a black box likelihood function in PyMC3).
I now want to update this model as a hierarchical model. I have multiple experiments for which these data (x and y) are collected. Some of the experiments yield highly biased estimates with an uninformative posterior on theta, whereas some yield accurate estimates with an informative posterior on theta. I’m now struggling to parameterize this as none of the Pymc3 examples I have seen have a black box likelihood function for their multi level models.
As I understand it, I should have a parameter for each of my thetas, the likelihoods of which are determined by my black box function, and another parameter for my overall distribution of thetas (let’s call it omega) where P(theta | omega) looks like some sort of long tailed distribution. If any of you could help me parameterize this in a way that PyMC can understand, or if there are any examples where people have similarly done hierarchical modeling with black box likelihood functions, I’d appreciate knowing about it.