Feeding data into estimation

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.

Feeding data into estimation

Postby macroresearch123 » Fri Jan 31, 2014 9:44 pm

Hi Johannes,

Your recent January article on detrending is great, but there are some additional issues that I thought would be educational to bring up for users (including myself!). As you acknowledge and cite references over, the detrending procedure will affect the MH estimate results; correlation across shocks, whether measurement error is used to identify a time series, etc, are not innocuous details. I think the article does a great job addressing the importance of these points, but the common error that comes up, at least for me, is that the hessian matrix (of the likelihood I assume) is not PSD.

I read a prior post that refers to this being a problem with the initial conditions, but I believe that often the main problem is more fundamental; sometimes, feeding in a first difference time series data set will work, whereas others will not, for a given model structure. For example, if I have a nonstationary model with trend growth in TFP, feeding in the log of y, k, c, etc, doesn't work, whereas feeding in the difference of logs will work. In your paper, you emphasize the importance of making the system stationary by dividing by TFP, if there is no exogenous trend assumed (I have not tried this); but, if there is trend growth in TFP explicitly in the model, I would expect the difference of logs to work.

As another alternative, I tested the estimation under observable time series growth rates, i.e. setting dX=(X-X(-1))/X(-1), for a variable X. However, doing so led to the following error.

??? The left hand side is initialized and has an empty
range of indices.
However, the right hand side returned one or more
results.

I am attaching a sample code and .xls in case you are curious to see the details, but if you could also talk generally about the underlying problem for the two aforementioned errors, it would be highly educational. (In the xls file, H is normalized to 1, the rest are the difference of logs, i.e. X=log(X)-log(X(-1)) for the variables consumption, output, capital, energy, and pollution.)
Attachments
kdata2.xls
(24 KiB) Downloaded 69 times
benchmark.mod
(2.14 KiB) Downloaded 62 times
macroresearch123
 
Posts: 90
Joined: Wed Nov 06, 2013 3:28 pm

Re: Feeding data into estimation

Postby jpfeifer » Wed Feb 05, 2014 9:40 am

Are you sure you posted the correct file? There is no observation equation or estimation part in the mod-file. Moreover, the steady state does not solve.
------------
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: Feeding data into estimation

Postby macroresearch123 » Wed Feb 05, 2014 3:45 pm

Good catch -- I was playing around with trying to introduce a steady state file, but the nonseparabilities in production and preferences seemingly make it impossible to input anything substantial. (I was also trying to solve the SS on Matlab through fsolve, which didn't work.) I added the proper file, but my question can broadly be consolidated into a question about why feeding in certain time series leads to the estimation not working (even if the time series is taking as a difference of logs to remove stationarity) and a more methodical way to implementing the estimation other than just changing the priors and initial conditions.
Attachments
kdata2.xls
(24 KiB) Downloaded 65 times
benchmarkcb.mod
(4.36 KiB) Downloaded 68 times
macroresearch123
 
Posts: 90
Joined: Wed Nov 06, 2013 3:28 pm

Re: Feeding data into estimation

Postby macroresearch123 » Sat Feb 08, 2014 9:21 pm

Hi Johannes -- I know there are many posts in the forum and your time is scarce, but I would like to summarize a re-framing of the problem I am facing.

One of the reasons, I think, the estimation was not previously working was because one of my equilibrium relations was flawed. I introduced an intermediate goods producer that sells to the final goods producer; this pins down the price of that intermediate that was previously wrong. However, the steady state does not compute -- I have tried many different initial conditions and the residuals are already very small.

To narrow in on the SS initial conditions, I used the levenberg-marquardt solver in a separate Matlab file. However, when I use those initial conditions, I get
??? Error using ==> print_info at 52
One of the eigenvalues is close to 0/0 (the absolute
value of numerator and denominator is smaller than
1e-6)

I know this error has been addressed on the forum before, but I did not see a clear resolution for my problem in prior posts.

Your help is always very much appreciated,

EDIT*: Johannes -- uploaded a new file. I got a version of it working now -- but the version I am attaching here has violated Blanchard Kahn conditions. I suppose there's not a straight answer to why this is the case, and I've already read through many similar topics about BK conditions over prior months, but always eager to learn more if you have advice about what might be going wrong.

EDIT 2: Got everything fixed -- no need to look into this if you haven't started it already! If you already started reading it, I appreciate your continued patience and interest!
Attachments
benchmarkcb.mod
(7.43 KiB) Downloaded 75 times
Dynare question.pdf
(180.59 KiB) Downloaded 94 times
macroresearch123
 
Posts: 90
Joined: Wed Nov 06, 2013 3:28 pm

Re: Feeding data into estimation

Postby jpfeifer » Fri Feb 14, 2014 10:59 am

One note that might interest you: the unstable Dynare version contains a new steady state solver (solve_algo=4). It might enable you to compute the steady state directly in Dynare.
------------
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 4 guests