1

I'm trying to use the Metropolis-Hastings (MH) algorithm to obtain an approximation of the distribution of the parameters of the following model:

$$ y_{t} = \alpha x_{t}^\beta + w_{t} $$ $$ w_{t} \ \text{~} \ \mathcal{N}(0,\sigma^2) $$

I'm using a random-walk version of MH where my jumping distribution also contains a normal distribution (multivariate in this case):

$$ \theta_{t} = \theta_{t-1} + \textbf{e} $$ $$ \textbf{e} \ \text{~} \ \mathcal{N}(\textbf{0},c^2\textbf{I}) $$

with $c$ just being a scaling parameter.

How can I account for the fact that $\alpha$ and $\beta$ can be any real number but $\sigma^2$ has to be nonnegative?

A cheap fix could be to force the algorithm to reject negative values for the variance by assigning arbitrarily low probability to any sampled vector containing negative variance values.

Any reference or ideas would be greatly appreciated.

Slakeon
  • 13
  • 3

1 Answers1

2

I think this question has been addressed many times on Cross Validated: proposing a negative value when the target distribution is of no consequence since the target density is equal to zero at this negative value. A Metropolis-Hasting algorithm that is described in the question as a random-walk version of MH thus works in such a context: for each proposal with a negative variance, the chain repeats its current value.

See, e.g.,

Xi'an
  • 90,397
  • 9
  • 157
  • 575