Observation Equations Question in a log-linearized model

Dear Professor Pfeifer,

I hope you can help me,

I created this .mod file to replicate the results of the Debt elastic interest rate model Schmitt & Uribe (2003) and I based the code on https://github.com/JohannesPfeifer/DSGE_mod/blob/master/SGU_2003/SGU_2003.mod

I would like to add data to the model but after reading “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” I have some questions:

  1. Here I declared exp(y_t) where y_t becomes log(y_t) or what you call y_tilde. Now I’m planning to a add y_obs to the var block, b change the model block and c create the varobs block as follows:
    a
    var c_t k_t h_t d_t y_t i_t tb_t tby_t ca_t cay_t r_t a_t la_t kh y_obs;

    b
    model;

    y_obs=y_t

    c
    varobs y_obs;

    The excel file, mydatafile, that I use must have y_obs=log of gdp per capita, is it right?

  2. If I detrend y_obs with H-P filter I should add to the stock_simul(…) the H-P filter right ?

SOE4.mod (3.4 KB) SOE4_steadystate.m (969 Bytes)

  1. Yes, that procedure is correct if y_obs is detrended log GDP per capita.
  2. No, the HP-filter option of stoch_simul has nothing to do with estimation, only with theoretical moments.
  3. Never use a two-sided HP-filter for estimation.

Thank you for your quick response professor Pfeifer. I understand answers 2 and 3. But in answer 1, shouldn’t it be y_obs = detrended log of GDP per capita to match exp(y_t)?

Yes, I meant log GDP. I corrected it.