# MCMC: How to choose an efficient proposal distribution with continuous and discrete variables

I am using MCMC with the Metropolos-Hasting algorithm to generate solutions of a non linear regression problem.

Likelihood

My likelihood is a gaussian distribution centered in 0 of the residuals with sigma as the measurements uncertainties.

Such as: $l(\theta|x)= \exp[ \frac{-\sum\limits_{i=1}^n (x_i-y_i(θ))^2}{ 2\sigma^2} ]=\exp[ -\chi^2 ]$

where $x_i$ is the observation i, $y_i(θ)$ is the prediction in function of the set of parameters θ, n is the number of observations, $\sigma$ is the measurements uncertainties.

Priors

The three discrete parameters can take any integer values between 1 and 20. There are the number of components used by three distincts PLS models to make predictions.

The three continuous parameters represents the average number of carbon atoms attached to three different functional groups. We know from past experiences that they are in certain ranges. So we have bounded uniform priors for these three parameters.

Proposal distribution

I am wondering how to set my proposal distribution, a multinormal distribution is not possible as I have discrete variables (3 continuous variables and 3 discrete).

I have thought about using uniform distributions for each variable as a proposal distribution. This won't be efficient but if I run enough iterations that should give meaningful results. Does anyone encountered a similar problem and has any advice?

• Could you give more details on what your discrete variables look like? Preferably, describe the complete likelihood and prior. Feb 26, 2018 at 15:46
• @MartinModrák, yes I will add a description of the complete likelihood and priors. Feb 26, 2018 at 15:49

• I'm sorry to disturb you again, but in the documentation they showed how to calculate the posteriori distribution for the discrete parameters such as: $p(s|D) \propto \frac{1}{M} \sum_{m=1}^M (exp(lp[m,s]))$. I'm having trouble understanding why only the likelihood is taken into account and the prior for the continuous parameters is never taken into account. Am I missing something? Jun 27, 2018 at 12:51