How to estimate DSGE when R is exogenous and observed?

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.

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,

[quote]varobs: RA_obs is not an endogenous variable
[/quote]

Could anyone help me to solve this problem?

Thank you.

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 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.

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

[quote]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 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
[/quote]

2nd_stage.mod (2.86 KB)

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

Thank you jpfeifer!!

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
Simple_NK.mod (2.67 KB)
TR_000_test.mod (3.83 KB)

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.
TR_000_test.mod (3.83 KB)

But in this case there would be a real exchange rate and trade that affect equilibrium determination. This is currently absent.