Page 1 of 3

Uribe & Schmitt-Grohe

PostPosted: Sat Nov 01, 2014 9:36 pm
by RMB
Dear all,

I am studying the manuscripts of Uribe & Schmitt-Grohe on this site http://www.columbia.edu/~mu2166/book/.
I wrote the correct code for chapter 4, attached in this message. But I would like to estimate the parameters by bayesian inference. I have read the notes of Pfeifer (and I really recommended it), but he suggested put the model in intensive form, first. You can verify on page 17. I would like to know if someone have done this, and, if not, I would like to know how I have to do this intensive form transformation and how the best way to have bayesian inference on my parameters.

PS: I think the best parameters to estimate are db, omega, phi, psi, rho and eta. But I would like more suggestions.

Thank you for all,
RMB

Re: Uribe & Schmitt-Grohe

PostPosted: Sun Nov 02, 2014 12:20 pm
by RMB
Hi, I am me again! I am reading Uribe, and at section 4.1.1 - Inducing stationary: external debt-elastic interest rate, he said that if you make the interest rate debt elastic, you can solve the problem of stationarity. However, the doubt goes on: it is necessary transform the model in its intensive form? The user guide of Dynare recommends the same of Pfeifer. I would like to know if, in this case, it is necessary to do that; and, if it is, I would like to know how.

About bayesian inference, my doubts go on, I am going to persist on readings to clarify some points. Thanks for all.

Re: Uribe & Schmitt-Grohe

PostPosted: Sun Nov 02, 2014 12:36 pm
by jpfeifer
You seem to be confusing things here. The basic small open economy model is non-stationary, but it has nothing to do with growth where writing everything in intensive form removes the unit root. Rather, the model features a unit root because not foreign assets are non-stationary. It is basically the permanent income hypothesis at work. If there is a change in foreign bonds, agents will always consume the annuity out of these additional savings, but they will not consume more than that. Hence, bonds stay at their new level and never return. This is why you need to use one of the tricks available to make the model stationary. See e.g. the reference at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=3106

Re: Uribe & Schmitt-Grohe

PostPosted: Mon Nov 03, 2014 5:01 am
by hewei2004
Why would the permanent income hypothesis work in a two-country model but not in one country NK model? Is having a bond in foreign country somehow different from domestic bond?

Re: Uribe & Schmitt-Grohe

PostPosted: Mon Nov 03, 2014 5:58 am
by jpfeifer
In two country models you could have the same, depending on your model.

But an important difference is that in small open economies the assumption is that the one economy has 0 weight in international capital markets. Its demand for foreign bonds hence does not affect prices. Similarly, if it supplies bonds, they are always demanded at the world interest rate.

You can see this e.g. from the fact that one way to get rid of the non-stationarity is to introduce a debt elastic interest premium.

Re: Uribe & Schmitt-Grohe

PostPosted: Mon Nov 03, 2014 6:21 am
by hewei2004
i see thanks

Re: Uribe & Schmitt-Grohe

PostPosted: Mon Nov 03, 2014 7:40 pm
by jpfeifer
I am not that familiar with this type of model. There must be a way as these models typically do not feature unit roots. The only thing I can recommend is: search the literature.

Re: Uribe & Schmitt-Grohe

PostPosted: Mon Nov 03, 2014 8:16 pm
by RMB
Hi Pfeifer,

I would like to understand better what you say. Really, these sound confusing to me, including the description of the problem. I have read the link suggested, but still remain some doubts to me. I'd like other texts to understand, if you have some to recommend.

About the code and bayesian inference, I don't know if I solve the problem; but I have written a code for this Uribe's chapter 4 - but, not for the Canadian economy. I did for peruvian economy. This is a problem related to estimated_params_init-block. I am searching and trying to understand what is happening. If someone would like to help, I will be happy. I think I got the priors, so.. if someone have any experience in this, it will be cool!

Thanks for the patience, colleagues!

Re: Uribe & Schmitt-Grohe

PostPosted: Tue Nov 04, 2014 12:05 am
by RMB
Well, at this time, I think my code ran without errors. \o/
Now, I learned with my mistakes, first of all, I included more observable variable than stocks; second, I learned about estimated_params_init... I think I have to reflect about the differences and put better calibrations values to my code.

Re: Uribe & Schmitt-Grohe

PostPosted: Wed Nov 05, 2014 3:17 pm
by jpfeifer
Please take a look at Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf. You are performing a fundamental mistake by having steady states in nonlinear models depend on estimated parameters and not using either model local variables or a steady_state_model-block. It also seems that you are matching a non-zero mean model variable to a zero mean data variable. Also, how did you detrend your data?

Re: Uribe & Schmitt-Grohe

PostPosted: Sat Nov 08, 2014 9:05 pm
by RMB
jpfeifer wrote:Please take a look at Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf. You are performing a fundamental mistake by having steady states in nonlinear models depend on estimated parameters and not using either model local variables or a steady_state_model-block. It also seems that you are matching a non-zero mean model variable to a zero mean data variable. Also, how did you detrend your data?


Hmmm, great. I will review your guide about it. Your suggestions sound like true to me, but, let me understanding better your advice:

In this part: "You are performing a fundamental mistake by having steady states in nonlinear models depend on estimated parameters and not using either model local variables or a steady_state_model-block˜.

First, when you said steady states in nonlinear models depend on estimated parameters, you are referring on, for example, h_ss = ((1-alppha)*(alppha/(r_star+deltta))^(alppha/(1-alppha)))^(1/(ommega-1)), right? So, for this particular steady state equation, it is better linearised that?

Second, when you added "not using either model local variables or a steady_state_model-block", you are suggesting use model local variable, but how I can use that? I think put y_obs is the solution to that...; still, you also suggesting that I use a steady_state_model-block. Do you have some example to attach and looks better to me?

About trends, I use the WDI data, and detrended taking the quadratic trend out on the log-variables. Do you have another suggestion? I only did not attach to the message because the other archive is very big!

Thanks one more time for the patience, Pfeifer.

Re: Uribe & Schmitt-Grohe

PostPosted: Sun Nov 09, 2014 10:21 am
by jpfeifer
All the issues you are asking here are answered in Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf
You can even find the example mod-files on my homepage.

Re: Uribe & Schmitt-Grohe

PostPosted: Wed Nov 12, 2014 6:26 pm
by RMB
Hi again, Pfeifer,

I am reading your paper. On same time, I am trying to re-write the code. Later, I use a old code (Uribe_chapter4peru.mod) to check if the steady state exists. I concluded yes. The results are:

STEADY-STATE RESULTS:

y 0.778788
c 0.45373
h 0.124885
k 1.71977
d -0.19
i -0.487503
tb -0.00436014
ca 0
a 0
r -2.99573
p 0
lambda 0.134492

However, when I tried to write the code for bayesian inference (standard.mod), I failed. I would like to know how I could fix this.
Thank you,
RMB.

Re: Uribe & Schmitt-Grohe

PostPosted: Fri Nov 14, 2014 12:27 pm
by jpfeifer
Because you are neglecting the parameter dependence for steady state computation. You need to set dbar and beta/rstar in each iteration and compute the steady state conditional on this. Use the steady_state_model-block. See Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf for more information.

Re: Uribe & Schmitt-Grohe

PostPosted: Wed Feb 11, 2015 7:59 pm
by RMB
Well, finally, I find something good.