In my Hierarchical Bayesian Model, in the data layer y[i] <- M(t,u,v)+ N[0,sigma_y]
where M is a complicated function. I have generated the output of this M by some numerical simulation for a large grid of parameters (t,u,v).
In order to do MCMC on this grid i need to define a function which looks up the table of the Model M's output for a given input (t,u,v).
But in OpenBUGS documentation, I could find only standard distributions like dnorm etc for defining y[i].
Isn't it possible to use a general function for it? Or, Is there any other way to do it?
Update: My model is as shown below.
$i$ represents the measured data, and $j$ represent the groups.
$y_i \sim M(t,u_{j[i]},v_{j[i]}) + \mathcal{N}[0,\sigma_i]$
In the group level, $(u_j,v_j) \sim \mathcal{N}[(\mu_{u},\mu_v), \Sigma]$
The function $M$ does not have a simple analytical form to express in Bugs. But if i can define a general function to look up a table, then for each step in MC chain, I can lookup the value of deterministic relation $M$ for a given t,u,v parameter.
My goal is to estimate, $\mu_u$, $\mu_v$,$\Sigma$ and $t$ which best fits the the given $y_i$ and $\sigma_i$ data.
I am attaching a diagram of the model below.