I am trying to think of a way to perform a somewhat complicated Bayesian optimization problem involving model parameters which are nested within other functions in the forward problem, and I am wondering if this is alid from a theoretical perspective or if I am violating one of the criterion for MCMC sampling methods.
To simplify the problem to it's most basic situation, I have some data vector, $\mathbf{d}$ (with error $\mathbf{\sigma}$ and length $N$) from which I want to ascertain some model, $\mathbf{m}$. I have a forward operator, $F(\mathbf{m})$ which takes a model and computes predicted data, $\mathbf{d_p}$. From this, I construct a log likelihood function using a chi-square misfit assuming Gaussian errors:
$$\chi^2 = (\mathbf{d}-F(\mathbf{m}))^T\mathbf{C_d}^{-1}(\mathbf{d}-F(\mathbf{m}))$$
where $\mathbf{C_d}$ is an $N$ x $N$ matrix with $\mathbf{\sigma}$ on the diagonal.
My question concerns the forward operator, $F(\mathbf{m})$.
In my scenario, the forward operator is complicated and contains many nested functions. For example, suppose I have 5 model parameters, $m_1, m_2, ... m_5$. In my situation I might have:
$a = P(m_1)$
$b = Q(a, m_2, m_3)$
$c = R(a, b, m_4, m_5)$
$\mathbf{d_p} = S(a,b,c)$
where $P, Q, R,$ and $S$ are some very complicated functions. In order to actually compute predicted data, $\mathbf{d_p}$, I need $a,b$, and $c$. But my model parameters of interest are in $\mathbf{m}$.
Is this nested-variables approach valid for sampling the posterior?
Note: I have tried implementing the problem as written using a known model and I run into various problems. First and foremost the MCMC sampler gets "stuck" in an area of low probability (even though I know that there is a better solution with higher probability since I am using a known model). This does not happen if I try to sample $a, b$ and $c$ as model parameters. So I am wondering if there is some theoretical violation of the method.