Error message in 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.

Error message in estimation

Postby kiki » Sun Aug 22, 2010 7:09 pm

Dear all,

I am estimating a small open economy model. I keep getting the following error message after the estimation:

Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 6.665321e-019.
> In DiffuseKalmanSmoother3 at 289
In DsgeSmoother at 272
In prior_posterior_statistics at 152
In dynare_estimation_1 at 1084
In dynare_estimation at 62
In conglin2010 at 519
In dynare at 132

I am not sure where the problem comes from. When I do simulations using the model, the results are ok. So I guess the problem may come from the data. I demeaned and detrended the data (the data series are also seasonally adjusted.)

Attached is my mod and data file. By the way, I am using 4.1.2.

Thanks!
datah.m
(8.46 KiB) Downloaded 82 times
model.mod
(5.8 KiB) Downloaded 104 times
kiki
 
Posts: 5
Joined: Sun Aug 22, 2010 6:34 pm

Re: Error message in estimation

Postby jpfeifer » Wed Aug 25, 2010 5:37 am

Actually, it does not look like an error, but rather like a warning. I guess, Dynare does not crash, does it? This warning may indicate a real problem, but sometimes matrices become ill-conditioned even in well-specified problems. Moreover, this problem only occurs in the smoother routines, where you try to recover the shock series. Hence, you could check if the previous estimation results make sense to see if there is a problem.
Finally, from a quick look at your data, I wonder how you detrended the data. An ADF-test still indicates the presence of a unit root. So there may really be a problem with the data and the corresponding model specification.
------------
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: Error message in estimation

Postby kiki » Wed Aug 25, 2010 2:41 pm

Hi jpfeifer, thanks very much! You are right, Dynare doesn't crash. After all these warnings, it continues to finish its simulation job.

I demeaned and detrended (linear detrend) the data using the command "detrend" of matlab. I will check the data again.

Also, I am wondering, assume that there is no problem in data and the model but only the ill-conditioned matrice, could I rely on the estimation results especially when the results look good?

Thanks!
kiki
 
Posts: 5
Joined: Sun Aug 22, 2010 6:34 pm

Re: Error message in estimation

Postby jpfeifer » Thu Aug 26, 2010 6:53 am

I would answer your last question with yes. However, your data is almost surely the problem. To stationarize your data, you might want to consider HP-filtering it or use first differences and specify an observation equation. Or when using a linear trend, you should at least log the data to make the exponential trend linear.
------------
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: Error message in estimation

Postby kiki » Thu Aug 26, 2010 1:40 pm

Thanks very much, jpfeifer!
kiki
 
Posts: 5
Joined: Sun Aug 22, 2010 6:34 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests