Help needed. SW model with stochastic detrending

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.

Help needed. SW model with stochastic detrending

Postby ajpirzada » Wed May 15, 2013 3:44 pm

Hi,

I am writing a version of Smets and Wouters (2007) model adjusted from stochastic de-trending rather than deterministic. However, I want to run the estimations under the optimization routine 4 or 1. but when i run it im getting the usual error of:

Error using chol
Matrix must be positive definite.
.
.
.
.
Error in dynare (line 120)
evalin('base',fname) ;


The error gets solved when i run it for mode_compute=6. However, '6' solves it for local optimization rather than global. Therefore, can anyone please tell me how to get rid of this error while using the optimization routine 4 or 1? I have also used the first estimation results which i get for the Posterior Maximization (using routine 4) to reset my initial values and priors accordingly but it doesnt help.

I have attached the .mod file and data file (xls format). Also the .mod file reads the data from .mat but i cannot upload .mat format file.

Thanks a lot.
Attachments
usmodel_data.xls
data file
(191 KiB) Downloaded 169 times
usmodeladj7.mod
data is being read from the .mat file
(17.04 KiB) Downloaded 183 times
Last edited by ajpirzada on Thu May 16, 2013 11:45 am, edited 1 time in total.
ajpirzada
 
Posts: 20
Joined: Tue Apr 30, 2013 11:41 am

Re: SW model with stochastic detrending

Postby ajpirzada » Wed May 15, 2013 10:03 pm

also does anyone have the dynare code for the Negro & Schorfheide (2012) paper (DSGE Model-Based Forecasting)? in the above .mod file im trying the replicate their model which add stochastic detrending to SW (2007) model. But they do not provide any dynare code or even the estimation results due to the nature of their paper.
ajpirzada
 
Posts: 20
Joined: Tue Apr 30, 2013 11:41 am


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 2 guests