How to estimate DSGE when R is exogenous and observed?

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.

How to estimate DSGE when R is exogenous and observed?

Postby leolee » Mon Jun 01, 2015 8:46 pm

Dear all,

I'm quite new to Dynare and want to ask a question.
I'd like to estimate the following 2 equation DSGE model.

Code: Select all
var pi, y, RA, g, z, ra;
varexo eg, ez, ea, RA_obs;

model(linear);
    y       = y(+1) - (1/sigma)*(RA - pi(+1)) + g;
    pi      = bet*pi(+1) + kappa*y + z;
    g       = rhog*g(-1) + eg;
    z       = rhog*z(-1) + ez;

// Measurement equation
    RA_obs   = RA + ra;
// Measurement error has AR(1) process
    ra      = rhoa*ra(-1) + ea;
end;

varobs y, pi, RA_obs;



I wrote this code since I assume that, in this economy, interest rates are given exogenously.(So it is kind of partial equilibrium model). However, the problem is that the Dynare doesn't seem to allows exogenous varialbe (RA) as an observable. It give an error saying that,

varobs: RA_obs is not an endogenous variable


Could anyone help me to solve this problem?

Thank you.
leolee
 
Posts: 30
Joined: Thu Mar 19, 2015 9:54 am

Re: How to estimate DSGE when R is exogenous and observed?

Postby Ned » Mon Jun 01, 2015 11:28 pm

Hello there.

I don't know much myself but I'll try to help. Firstly, you can only set endogenous variables as observables and in your case you have an exogenous variable along the varobs command, thus the error message. Don't get carried away by the thought that interest rates are given exogenously. Interest rates are an endogenous variable of your model and are governed by an exogenous shock process.

Secondly, note that the varobs command is used when you have a data set linked to the variable you want to set as observed (i.e. a time series of interest rates or output in excel). This is done when you want to estimate the model's parameters based on real data. You can have a look here http://www.dynare.org/manual/index_27.html.

Furthermore, your code seems to lack information about the parameters of the model, in your case kappa and sigma. You should specify those with the parameters command. Lastly, I cannot understand what you mean by the measurement equation RA_obs = RA + ra.
Ned
 
Posts: 7
Joined: Sat Jun 14, 2014 12:00 pm

Re: How to estimate DSGE when R is exogenous and observed?

Postby leolee » Tue Jun 02, 2015 11:13 am

Dear Ned,

Thank you very much for your reply.

Can I add some more thought on my model and ask more help from you?

With regard to your first point, actually, what I really want to know is how to estimate parameters when one of the variable is exogenously given. For example, my model is kind of two stage model. The interest rate is decided in the first stage, and agents in the economy make consumption/saving decision in the second stage given that interest rate from the first stage. For this reason, my model doesn't have monetary policy rule, and the interest rate (RA) is exogeneously given. Here I'm trying to estimate the second stage where the interest rate is not endogenously decided.

For your third point, I just skip them (parameters and estimation part) to save space. Of course I have them in my mode file. About the measurement error, since the number of shocks are two, and the number of observable variables are three, I thought, I need to add one measurement error. I attached the full mod file here.

Could you help me more?

Regards,

Leo

Hello there.

I don't know much myself but I'll try to help. Firstly, you can only set endogenous variables as observables and in your case you have an exogenous variable along the varobs command, thus the error message. Don't get carried away by the thought that interest rates are given exogenously. Interest rates are an endogenous variable of your model and are governed by an exogenous shock process.

Secondly, note that the varobs command is used when you have a data set linked to the variable you want to set as observed (i.e. a time series of interest rates or output in excel). This is done when you want to estimate the model's parameters based on real data. You can have a look here http://www.dynare.org/manual/index_27.html.

Furthermore, your code seems to lack information about the parameters of the model, in your case kappa and sigma. You should specify those with the parameters command. Lastly, I cannot understand what you mean by the measurement equation RA_obs = RA + ra.
Ned

Posts: 6
Joined: Sat Jun 14, 2014 1:00 pm
Attachments
2nd_stage.mod
(2.86 KiB) Downloaded 76 times
leolee
 
Posts: 30
Joined: Thu Mar 19, 2015 9:54 am

Re: How to estimate DSGE when R is exogenous and observed?

Postby jpfeifer » Tue Jun 02, 2015 12:08 pm

Try defining an endogenous variable r_obs that you set equal to the exogenous variable (identity mapping) and then set this endogenous as observed
------------
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: How to estimate DSGE when R is exogenous and observed?

Postby leolee » Wed Jun 03, 2015 4:26 pm

Thank you jpfeifer!!

jpfeifer wrote:Try defining an endogenous variable r_obs that you set equal to the exogenous variable (identity mapping) and then set this endogenous as observed
leolee
 
Posts: 30
Joined: Thu Mar 19, 2015 9:54 am

Re: How to estimate DSGE when R is exogenous and observed?

Postby leolee » Fri Jun 05, 2015 7:19 pm

jpfeifer wrote:Try defining an endogenous variable r_obs that you set equal to the exogenous variable (identity mapping) and then set this endogenous as observed


Dear jpfeifer,

I changed my dynare code according to your advice. I attached the code (TR_000_test.mod). But I encountered another problem.

There are 1 eigenvalue(s) larger than 1 in modulus
for 2 forward-looking variable(s)


Given that my model is simplified version of simple 3 equation NK model. So I also tried to solve this 3 equation NK model too. But this model (attached: simple_NK.mod) doesn't have that rank problem. I do not understand why the error happens when I treat the interest rate as given.

Could you please give me some hint on how to correct this error?

Regards,

Leo
Attachments
Simple_NK.mod
simple 3 equation NK model
(2.67 KiB) Downloaded 74 times
TR_000_test.mod
my model where R is given (exogenous)
(3.83 KiB) Downloaded 97 times
leolee
 
Posts: 30
Joined: Thu Mar 19, 2015 9:54 am

Re: How to estimate DSGE when R is exogenous and observed?

Postby jpfeifer » Sun Jun 07, 2015 9:41 am

How can the interest rate be exogenous for a closed economy? There is no way monetary policy will satisfy the Taylor principle.
------------
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: How to estimate DSGE when R is exogenous and observed?

Postby leolee » Tue Jun 09, 2015 2:01 pm

jpfeifer wrote:How can the interest rate be exogenous for a closed economy? There is no way monetary policy will satisfy the Taylor principle.


Dear jpfeifer,

Can I assume that my model economy is a small country within monetary union so that the decision those in this country cannot affect the interest rate. They only observe the interest rate decision (from the union) and makes their decision on consumption and saving.

If this is the case, I guess, the interest rate may be treated as exogenous. That is why my model (TR_ooo_test.mod) omits Taylor rule.
Attachments
TR_000_test.mod
(3.83 KiB) Downloaded 67 times
leolee
 
Posts: 30
Joined: Thu Mar 19, 2015 9:54 am

Re: How to estimate DSGE when R is exogenous and observed?

Postby jpfeifer » Tue Jun 09, 2015 2:29 pm

But in this case there would be a real exchange rate and trade that affect equilibrium determination. This is currently absent.
------------
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


Return to Dynare help

Who is online

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