I've tried to follow Smets & Wouters (2007) and the following threads, but I want to check that what I'm doing is correct.
- Code: Select all
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=2590
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=2490
I've taken log first differences and demeaned all of the observables (is this correct?). Right now I'm trying to match them with the variables in the model. I'm using the following measurement equations, where the me's are measurement errors.
- Code: Select all
// nominal interest rate
obs_r_h = r_h - r_h(-1) + me_r_h;
// domestic inflation
obs_pi_h = pi_h + me_pi_h;
// home gdp growth
obs_y_h = y_h - y_h(-1) + me_y_h;
// nominal exchange rate change
obs_e = e - e(-1) + me_e;
// real exchange rate change
obs_q = q - q(-1) + me_q;
// nominal foreign interest rate
obs_r_star = r_star - r_star(-1) + me_r_star;
// foreign gdp growth
obs_y_star = y_star - y_star(-1) + me_y_star;
// import inflation
obs_pi_f = pi_f + me_pi_f;
// SOE CPI inflation
obs_pi = pi + me_pi;
// foreign CPI inflation
obs_pi_star = pi_star + me_pi_star;
I realize this is assuming no steady state growth. How should I define the measurement equations if I want to incorporate steady state GDP and interest rate growth? I tried adding a_h and and a_star to the GDP equations and (1/beta)-1 to the interest rate equations and received this error which I assume is a stationarity issue. My code is attached.
- Code: Select all
??? Error using ==> lnsrch1 at 53
Some element of Newton direction isn't finite. Jacobian
maybe singular or there is a problem with initial
values