We provide EViews code to implement Markov Chain Monte Carlo (MCMC) methods to simulate marginal distributions. The background notes discuss two examples, which are then implemented in EViews. The EViews workfiles were created using EViews 6 (Quantitative Micro Software, 2007). The workfiles contain a READ_ME text object.
The first example illustrates how to generate marginal distributions for two random variables X and Y from their conditional distributions. This is not a "Bayesian" example per se, but serves to demonstrate the basic ideas.
The second example is fully Bayesian. It shows how to obtain the marginal posterior distributions for two parameters (and hence their Bayes estimators) in a rather non-standard problem. In this example one of the conditional posterior distributions is standard, and can be simulated directly. However, the other conditional distribution is non-standard, and random drawings from it are obtained using the "Quantile Method". Another interesting feature of this second example is that one of the unknown parameters (m, the integer-valued break-point in the sample) appears in the range of summation used with the data. Although Bayesian estimation is relatively straightforward, Maximum Likelihood estimation would be very difficult to implement fully.
Last Update: 24 February, 2021
Contact: David Giles; Department of Economics, University of Victoria, CANADA. email: dgiles@uvic.ca; Tel.: +1-613-332 6833