Page 1 of 1

A few questions on Bayesian estimation!!!

PostPosted: Tue Dec 30, 2014 9:01 am
by Econbee
Dear all,

When estimating a medium-scale DSGE model similar to Smets and Wouters (2007), I have encountered some hard time when searching for the mode and also in other steps of the estimation. So I have a few general questions related to Bayesian estimation.

1. When searching for the posterior mode, I took two different ways. On one hand, I used mode_compute=4,6,9 to search for the mode iteratively. In this way, I could get a mode A. On the other hand, I used my own code to find the mode. Specifically, I randomly sampled 5000 draws in the parameter space according to the prior density. Then I ranked these draws according to their log posterior and chose the highest 50 draws. Starting from each of these 50 draws, I used Chris Sims's csminwel algorithm (mode_compute=4 in Dynare) to find the highest mode B. This procedure is following Guerron-Quintana (2010, Journal of Applied Econometrics). I am currently considering a few different specifications of the model. And I found that, among all the cases, only in a few cases A and B coincided. For those cases that did not coincide, B was usually better than A because B had a higher log posterior. However, B was usually trapped near the boundary of the parameter space of the AR(1) parameter of the exogenous shocks, e.g. preference shock, labor supply shock, government spending shock and etc. Sometimes, these parameters could be 0.9999, which is not reasonable and not seen in the literature. When this happened, mode A seemed OK because Dynare started the search from the prior mean. In other words, the initial values of the mode search matter.

My concern is how should I think about the modes A and B. It seems to me that most people are using Dynare to find the mode iteratively and A should be the result. Then what B really is? Are they really local modes? It seems both yes and no. Yes, because B obtains a higher log posterior. No, because they are almost sitting on the boundary of the parameter space. It also seems to me that csminwel has hard time to escape from the boundary. Of course, there have been many threads in this forum saying that finding the mode for models like Smets and Wouters (2007) is very difficult. Chib and Ramamurthy (2010) has provided a new method but it is not possible to implement in Dynare until now. I am just wondering if there has been any consensus on the mode finding procedure given the caveats.

I also tried to run MCMC from both A and B with 500000 replications. When from B where some parameters are on the boundary, MCMC encountered obvious convergence problem, especially for those sitting on the boundary. When from A, things seem to be OK.

2. When I estimated the model using US data from 1960 to 2008, I got very small estimates of the partial indexation paramaters in price and wage rigidity setup, e.g. less than 0.1. This is clearly lower than the values commonly estimated in the literature. Besides the low values of these parameters, the AR(1) coefficients were high. Even for mode A mentioned above, the AR(1) coefficients for preference shock, labor supply shock and price markup shock are very high, e.g. between 0.97 and 1. Is this normal?

3. In order to get out-of-sample forecast in Dynare, I used forecast option in the estimation command. My question is can I trigger forecast in stoch_simul? Is MCMC necessary in order to do forecasting? If I want to do the forecast based on the posterior mode or mean, how should I do it?

Thanks very much in advance!!! I appreciate any comments or suggestions!

Re: A few questions on Bayesian estimation!!!

PostPosted: Tue Jan 06, 2015 9:16 pm
by jpfeifer
1. That is hard to tell. If the posterior is higher for the implausible parameter estimates than the one obtained for the more plausible ones when starting at the prior mean, we are clearly not talking about just a local minimum. If the parameters are at the boundary, you did not find an interior solution. Regarding implausible estimates, that is why we use priors. Maybe you need a tighter prior. However, often finding modes at the boundary of the parameter space indicates the presence of more fundamental issues with the model or the data. For example, unit roots like you report often show up if you are a demeaned model with non-demeaned data.

For csminwel, finding only local minima is expected, because it is basically a Newton-type algorithm that looks for local minima. That's why you should use different starting values and take the best estimates.

When doing MCMC, the chain will automatically move to regions of higher posterior likelihood. Thus, you would expect drifts. You may want to run the MCMC for some time and then start mode-finding at the end of the chain. If there is a unique mode, you will get there, but it might take forever.

Just starting at the prior mean and taking the first result that looks sensible is not a solution, because this may still be a local mode.

2. No, this is not normal. Unless you are using strange model features, you should get similar estimates as other similiar models estimated on similar data. If this is not the case, there is still something wrong with your model or data.

3. You cannot trigger forecasting with stoc_simul but rather use the separate forecast command after estimation, making sure that the starting value is correctly set. Why do you not want to do Bayesian forecasting?

Re: A few questions on Bayesian estimation!!!

PostPosted: Fri Jan 23, 2015 9:07 am
by Econbee
Dear Johannes,

Thanks so much for your reply!

In my current exercises, I just changed the specifications of monetary policy rule, for example, from a typical Taylor rule in which central bank responds to output gap and inflation to a Taylor rule in which central bank responds to output gap, inflation and money growth rate. I found the estimation results were sensitive to the changes of policy rule specification.

For all the cases, I found the AR(1) coefficient quite high. I did use first differences of the data, such as output, consumption, investment, real wages, as what Smets and Wouters (2007) did. And the measurement equations are also following the standard ones.

Anyway, the results are very weird to me. I don't know if there is anything wrong in the whole procedure or it is just the way it is given all my settings. Do you have any further suggestions on pinpointing the potential "problems"?

Thank you!

Re: A few questions on Bayesian estimation!!!

PostPosted: Sat Jan 24, 2015 8:58 am
by jpfeifer
If you use the standard Taylor rule, you get sensible results?

Check if your observation equations are really correct, i.e. in particular if you did the demeaning of data and model variables right, because this would lead to high persistence. As a simple check, assign "plausible" values to the parameters and simulate model data. Then compare the simulated "observed" variables to the actually observed ones. They should have a similar mean and variance. If not, there is likely something wrong.