1
$\begingroup$

I am trying to estimate parameters of a two dimensional Normal distribution using Gibbs sampling. While it was very easy transform the posterior equation for mean vector to a single dimension normal function for sampling, I am not able to same for sigma(covariance).

Do I need to use the Wishart distribution as prior and then convert the posterior into a single dimensional gamma function ?

$\endgroup$
3
$\begingroup$

The Wishart distribution is the conjugate prior for the likelihood that comes from assuming a normally distributed error term for the linear regression model. You have to assume that either the covariance matrix is an inverted-wishart or the precision matrix (i.e., the inverse of the covariance matrix) is a wishart distribution.

As far as sampling is concerned it is possible to sample directly from the wishart and even from the multivariate normal. Thus, I do not think it is needed to sample from univariate normals or univariate gammas. Look around in the software you are using to see if it has samplers for the multivariate normal and the wishart.

$\endgroup$
3
  • $\begingroup$ I derived the posterior expression as the product of Normal likelihood function and Wishart prior. I sampled precision matrix from this posterior expression, but not getting the correct output. I am generating the samples from wishrnd command in matlab, by using the degree of freedom and the scale matrix of the posterior. $\endgroup$ Nov 27 '10 at 19:13
  • $\begingroup$ It would be useful if you could update your question with the model setup, the assumptions about priors and the corresponding posteriors. $\endgroup$
    – user28
    Nov 27 '10 at 22:34
  • $\begingroup$ There was a bug in my code, its working now. $\endgroup$ Nov 28 '10 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.