Estimation with diffuse_filter and missing data

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.

Estimation with diffuse_filter and missing data

Postby mmyy56 » Thu May 14, 2015 2:13 am

Hello everyone,

I am tring to estimate the Smets-Wouters model using diffuse_filter . I mix quarterly and yearly data. I continuously got this wrong message, even after I use use_calibration option. But the stochastic simulation is OK.
Can anyone give some suggestions?
Thank you in advance.


OSTERIOR KERNEL OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the "mode" is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!
> In dynare_estimation_1 at 694
In dynare_estimation at 89
In cee at 753
In dynare at 180
Log data density [Laplace approximation] is 1632.140485.
??? Error using ==> chol
Matrix must be positive definite.
Error in ==> <a href="matlab: opentoline('C:\dynare\4.4.3\matlab\metropolis_hastings_initialization.m',68,0)">metropolis_hastings_initialization at 68</a>
d = chol(vv);

Error in computing likelihood for initial parameter values
ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: You should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):
Attachments
datas1.xls
(35.5 KiB) Downloaded 92 times
datapull1.m
(128 Bytes) Downloaded 63 times
cee_steadystate.m
(1.83 KiB) Downloaded 56 times
cee.mod
(12.46 KiB) Downloaded 99 times
mmyy56
 
Posts: 7
Joined: Wed Aug 20, 2008 7:27 am

Re: Estimation with diffuse_filter and missing data

Postby jpfeifer » Mon May 18, 2015 11:36 am

I am not sure your observation equations are correct. Try doing this more systematically. You are telling Dynare that the observed variables have trends that need to be taken out. At the same time, you specify observation equations that seem to suggest the trend is still there. Moreover, there are some bugs related to trends and prefiltering/loglinear in Dynare, see https://github.com/DynareTeam/dynare/pull/852
For now, I would start with a stripped down version of your file without the loglinear version (explicitly specify the variables you are interested in as the logs of the model variables), using demeaned growth rates, i.e. fixing the mean growth rates at their sample mean. If that works, move towards estimating the growth rates.
------------
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: Estimation with diffuse_filter and missing data

Postby mmyy56 » Wed May 20, 2015 11:43 pm

Thank you, pfeifer . I think the problem comes from diffuse_filter.
With missing data, it is imporssible to transform the level data to QoQ growth rate. And I do not want to take stand on how to detrend the data. That is why I use level variable and diffuse_filter.
I transform the level variable with missing data to YoY growth rate. Now it runs smoothly.
But I have no idea how it influences the parameter identification. That is, stationarize level data by defining new observable variables of YoY growth rate
mmyy56
 
Posts: 7
Joined: Wed Aug 20, 2008 7:27 am

Re: Estimation with diffuse_filter and missing data

Postby jpfeifer » Sat May 23, 2015 2:04 pm

Using year on year (YoY) growth rates should work as well. If with identification you mean that suddenly some parameters are not identified anymore, that should not be the case. Your current approach might even be observationally equivalent.
------------
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: Estimation with diffuse_filter and missing data

Postby costa » Sun May 24, 2015 11:07 pm

I was about to ask about this. So it is ok to use the fourth difference , or YoY of GDP instead of the traditional first difference in estimation?
costa
 
Posts: 47
Joined: Thu Nov 14, 2013 8:09 pm

Re: Estimation with diffuse_filter and missing data

Postby jpfeifer » Wed May 27, 2015 5:24 pm

Of course. Apart from the fact that you may be missing some observations at the beginning of the sample for the YoY growth rates, their information content exactly the same as you could infer one from the other (if there are no missing data of course.)
------------
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 6 guests