Uribe & Schmitt-Grohe

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Uribe & Schmitt-Grohe

Postby RMB » Sat Nov 01, 2014 9:36 pm

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
Attachments
Uribe_chapter4_std.mod
(2.75 KiB) Downloaded 302 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby RMB » Sun Nov 02, 2014 12:20 pm

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.
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Sun Nov 02, 2014 12:36 pm

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
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Uribe & Schmitt-Grohe

Postby hewei2004 » Mon Nov 03, 2014 5:01 am

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?
hewei2004
 
Posts: 40
Joined: Thu Feb 09, 2012 1:07 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Mon Nov 03, 2014 5:58 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Uribe & Schmitt-Grohe

Postby hewei2004 » Mon Nov 03, 2014 6:21 am

i see thanks
Last edited by hewei2004 on Mon Nov 03, 2014 8:26 pm, edited 1 time in total.
hewei2004
 
Posts: 40
Joined: Thu Feb 09, 2012 1:07 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Mon Nov 03, 2014 7:40 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Uribe & Schmitt-Grohe

Postby RMB » Mon Nov 03, 2014 8:16 pm

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!
Attachments
Peruvian.mod
The dynare's code
(3.8 KiB) Downloaded 236 times
peru.xls
the xls' archive
(37 KiB) Downloaded 246 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby RMB » Tue Nov 04, 2014 12:05 am

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.
Attachments
peru.xls
(37 KiB) Downloaded 366 times
Peruvian.mod
(3.97 KiB) Downloaded 256 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Wed Nov 05, 2014 3:17 pm

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?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Uribe & Schmitt-Grohe

Postby RMB » Sat Nov 08, 2014 9:05 pm

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.
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Sun Nov 09, 2014 10:21 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Uribe & Schmitt-Grohe

Postby RMB » Wed Nov 12, 2014 6:26 pm

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.
Attachments
perua.xls
(38 KiB) Downloaded 249 times
Uribe_chapter4peru.mod
Tradicional calibration
(3.62 KiB) Downloaded 217 times
standard.mod
Bayesian inference
(1.44 KiB) Downloaded 232 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Fri Nov 14, 2014 12:27 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Uribe & Schmitt-Grohe

Postby RMB » Wed Feb 11, 2015 7:59 pm

Well, finally, I find something good.
Attachments
perua.xls
(37 KiB) Downloaded 372 times
uribe_chapter4_peru_bayes2.mod
(2 KiB) Downloaded 268 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Next

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests