Hi all!
I am trying to build a Bayesian model that combines a few Uniform RVs with topographical data (a m \times n matrix named Z) to derive two Deterministic RVs which then serve as the \mu and \sigma inputs for a Normal Mixture distribution. The ultimate goal of the model is to determine which parameter values better replicate mineral ages (named thermo\_ages) found in sand grains.
The priors for the model are defined as:
a_{br} \sim \text{Uniform}(0, 60)
h_c \sim \text{Uniform}(-1, 4)
e_0 \sim \text{Uniform}(0.001, 1)
e_1 \sim \text{Uniform}(0.001, 1)
s \sim \text{Uniform}(0.05, 0.5)
To generate an age b(z, \theta) at a point z in the topography, these uniformly distributed priors (grouped in the vector \theta) are combined as follow:
b(z,\theta)=\begin{cases} (z+h_c)/e_0, \ \ b < a_{br} \\ (z+h_{c_1})/e_1, \ \ b > a_{br} \\ \end{cases}
where h_{c_1} = h_c + a_{br}*(e_0 - e_1)
Defining \sigma = s \times b, the likelihood of observing an age a at a point z in Z, given the parameters \theta is:
p_b(a | z, \theta, \sigma) = \frac{1}{\sqrt{2\pi}\sigma} exp \big( -\frac{1}{2} {\big(\frac{a-b(z, \theta)}{\sigma}\big)}^2 \big)
The likelihood of observing an age a in a sand grain over the watershed Z is then defined as:
p_d(a) = \int_Z p_b(a|z)p(z) dz
And finally, the likelihood of observing thermo \_ages would be:
p(D) = \prod_{i = 1}^{n} p_d(a_i)
The code that generates such a model can be found here: Google Colab
However, when running the model, I am unable to get similar results as the ones of the published model. I think my problem might rely on the fact that:
- There are zeros in the sigma_age variable that translate to NaNs in my NormalMixture dist.
- Variables in age are not independently distributed.
In any case, I have been stuck there for a few days with no idea on how to solve this…
Best,
BenjamĂn