Help DSGE-VAR model II
Posted: Wed Mar 10, 2010 4:20 pm
Hi
We are trying to analysis the Chinese monetary policy with the DSGE-VAR Model , we now apply the model in the paper of Del Negro, M., and F. Schorfheide (2004). And the code is from Prof. Stephane. But i have the error in the process, the error is as follows
Improvement on iteration 1000 = NaN
-----------------
-----------------
f at the beginning of new iteration, NaN
Predicted improvement: -0.000000000
lambda = 1; f = NaN
Norm of dx 0
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
Cliff. Perturbing search direction.
Predicted improvement: -0.000000000
lambda = 1; f = NaN
Norm of dx 0
----
Improvement on iteration 1001 = NaN
iteration count termination
Objective function at mode: NaN
Objective function at mode: NaN
RESULTS FROM POSTERIOR MAXIMIZATION
parameters
prior mean mode s.d. t-stat prior pstdev
gam 0.500 0.5000 NaN NaN norm 0.2500
pistar 1.000 1.0000 NaN NaN norm 0.5000
rstar 0.500 0.5000 NaN NaN gamm 0.2500
kapa 0.300 0.3000 NaN NaN gamm 0.1500
tau 2.000 2.0000 NaN NaN gamm 0.5000
phi1 1.500 1.5000 NaN NaN gamm 0.2500
phi2 0.125 0.1250 NaN NaN gamm 0.1000
phoR 0.500 0.5000 NaN NaN beta 0.2000
phog 0.800 0.8000 NaN NaN beta 0.1000
phoz 0.300 0.3000 NaN NaN beta 0.1000
dsge_prior_weight 1.000 1.0000 NaN NaN unif 0.5774
standard deviation of shocks
prior mean mode s.d. t-stat prior pstdev
eg 0.875 0.8750 NaN NaN invg 0.4300
ez 0.630 0.6300 NaN NaN invg 0.3230
er 0.251 0.2510 NaN NaN invg 0.1390
Log data density [Laplace approximation] is NaN.
MH: Multiple chains mode.
MH: Old metropolis.log file successfully erased!
MH: Creation of a new metropolis.log file.
MH: Searching for initial values...
MH: I couldn't get a valid initial value in 100 trials.
MH: You should Reduce mh_init_scale...
MH: Parameter mh_init_scale is equal to 0.400000.
MH: Enter a new value...
I have change the mh_init_scale to 0.3, but it still has the sameproblem
Another question is that how to determine the number of lags of the VAR, should we determine the lags in advance with some tests or the model can
determine the lags itself ?
the attachments are the data and code
Thanks a lot
George.Z Shi.C
We are trying to analysis the Chinese monetary policy with the DSGE-VAR Model , we now apply the model in the paper of Del Negro, M., and F. Schorfheide (2004). And the code is from Prof. Stephane. But i have the error in the process, the error is as follows
Improvement on iteration 1000 = NaN
-----------------
-----------------
f at the beginning of new iteration, NaN
Predicted improvement: -0.000000000
lambda = 1; f = NaN
Norm of dx 0
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
Cliff. Perturbing search direction.
Predicted improvement: -0.000000000
lambda = 1; f = NaN
Norm of dx 0
----
Improvement on iteration 1001 = NaN
iteration count termination
Objective function at mode: NaN
Objective function at mode: NaN
RESULTS FROM POSTERIOR MAXIMIZATION
parameters
prior mean mode s.d. t-stat prior pstdev
gam 0.500 0.5000 NaN NaN norm 0.2500
pistar 1.000 1.0000 NaN NaN norm 0.5000
rstar 0.500 0.5000 NaN NaN gamm 0.2500
kapa 0.300 0.3000 NaN NaN gamm 0.1500
tau 2.000 2.0000 NaN NaN gamm 0.5000
phi1 1.500 1.5000 NaN NaN gamm 0.2500
phi2 0.125 0.1250 NaN NaN gamm 0.1000
phoR 0.500 0.5000 NaN NaN beta 0.2000
phog 0.800 0.8000 NaN NaN beta 0.1000
phoz 0.300 0.3000 NaN NaN beta 0.1000
dsge_prior_weight 1.000 1.0000 NaN NaN unif 0.5774
standard deviation of shocks
prior mean mode s.d. t-stat prior pstdev
eg 0.875 0.8750 NaN NaN invg 0.4300
ez 0.630 0.6300 NaN NaN invg 0.3230
er 0.251 0.2510 NaN NaN invg 0.1390
Log data density [Laplace approximation] is NaN.
MH: Multiple chains mode.
MH: Old metropolis.log file successfully erased!
MH: Creation of a new metropolis.log file.
MH: Searching for initial values...
MH: I couldn't get a valid initial value in 100 trials.
MH: You should Reduce mh_init_scale...
MH: Parameter mh_init_scale is equal to 0.400000.
MH: Enter a new value...
I have change the mh_init_scale to 0.3, but it still has the sameproblem
Another question is that how to determine the number of lags of the VAR, should we determine the lags in advance with some tests or the model can
determine the lags itself ?
the attachments are the data and code
Thanks a lot
George.Z Shi.C