Measurement equations

Dear all,

I am having trouble with understanding the measurement equations in Justiniano and Preston model.
I have found a mod file used in Rubaszek and Kolasa (2018) who worked with J&P model variants in their paper.

The J&P model is a log-linearised model with variables expressed as deviations from their steady states. This concept is pretty clear to me. As for the data, I would normally take the log of each variable and detrend it (e.g. one-sided HP filter). Thus, SS of all variables is 0 and I can directly match the data with the variables in the model as following (I will only refer to output for simplicity): y_obs = y

The problem is that Rubsazek and Kolasa used the following measurement equation for output (and similarly for other variables): 100*log(1+y_obs/100) = y-y(-1) + mu_y.
The output data enter the model as (log(Yt) - log(Yt-1))*100.

1) I don’t understand why there is this type of transformation on the left side. The transformed data is nearly the same as the original data. Why did they use it?

2)
a) They didn’t detrend or demean the data prior to estimation so I assume the mu_y should reflect the trend/steady state of the variable. The transformation of their output data was (log(Yt) - log(Yt-1))*100, thus growth rates. So they used the term mu_y to get rid of the trend, is that right?

b) However, there are two things I don’t understand. Why did they inicialize the mu_y = 0 and why they assumed mu_y, uniform_pdf, 0, 0.5, 0, 10 in the estimated_params block. For example, Smets and Wouters (2007) did similar thing (I think) regarding the measurement equations but they certainly did not pressume the mean of 0 and a uniform pdf. It seems a bit odd to me.

c) Also, if I demean the data prior to estimation, delete the mu_y term from the model and estimate it as model(linear), do I get the same results?

3) In general, I think I don’t understand the usage of the gap data and growth rates data in this model. I would assume that since the model is a log-linear model built in a way that variables reflect the deviations from their SS, thus their cyclical parts, why are the approx. growth rates used? Log difference transformation and detrended data (e.g. via HP filter) are two different concepts giving diffent results. Please, could you explain it to me?

In the original paper Justiniano and Preston (2004), they used a log deviation from a linear trend for output so why Rubaszek and Kolasa (2018) used different approach - growth rates for nearly the same model (only extended a little bit)?

I attach the exact .mod file that Rubaszek and Kolasa used in their paper.

Thank you very much for any help.

Martin

jpd.mod (6.5 KB)

Have a look at Pfeifer (2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models ".
This is a model estimated with growth rates where the mean growth rate mu_y is left in the data.

  1. The transformation on the left looks useless as in a first order approximated model \ln(1+x)\approx x so the left simplifies to y_obs
  2. a. Yes, mu_y is the average growth rate.
    b. With a uniform distribution, the mean has no particular meaning. It does not impose any prior information on the data.
    c. No, you will not get exactly the same, because there will be a loss in efficiency is the mean is not jointly estimated with the rest of the model. However, usually the difference is negligible.
  3. It’s a matter of preference which filter to use. But as long as the filter in the model and the data is consistent (first differences in this case), it is fine.

Dear Professor Pfeifer,

Thank you very much for your answer. I would like to follow up with one question. I am trying to estimate the models according to Rubsazek and Kolasa (2018), starting with the simple closed NK variant of the full model. However, I am having troubles with the estimation. Please, do you have any idea what is wrong with this .mod file?

Please, find attached the .mod file, error message and the data.
jp_nk_rkdata.mod (3.1 KB)
data_est_rk.mat (6.1 KB)
jp_nk_rkdata.log (30.1 KB)

The data are transformed according to Rubsazek and Kolasa (2018):

  • y_obs is in log differences: [ln(Yt+1) - ln(Yt)]*100
  • pi_obs the same: [ln(HICPt+1) - ln(HICPt)]*100
  • ir_obs: 100*ln(1+(IR/100))

Thank you very much for any help.

Martin

One part of the problem is the bug at estimation: remove invalid check for presence of constant (!1916) · Merge requests · Dynare / dynare · GitLab
You can avoid it by using non-zero initial values for the mu-parameters
jp_nk_rkdata.mod (3.2 KB)

The big problem that remains is the scaling of ir_obs. It has a mean of 3.5 while you at most allow for something less than 1. I widened the prior and define mu_i as the quarterly growth rate. Then it works.

1 Like

Dear Professor,

That’s great, thank you! I really appreciate your help.

I would like to kindly ask you one last question. Since I know where the problem was with the closed variant and its estimation, I tried to estimate the open variant. Based on your advice, I modified the model but I couldn’t estimate it. I have no experience with models which include VAR so if you could help me with this, I would be really grateful.

Please, find attached the .mod file, the data and the log.
jp_var_rkdata.mod (8.6 KB)
data_est_rk.mat (6.1 KB)
jp_var_rkdata.log (21.2 KB)

Thank you in advance!

Martin

The following works. Again, your prior was inconsistent with what was needed for the observables. I did not check, but are you sure that for example ca is measured correctly?
jp_var_rkdata.mod (8.6 KB)
jp_var_rkdata_mode.mat (45.0 KB)