Page 1 of 1

Problem Estimation a DSGE-BVAR model

PostPosted: Mon Oct 27, 2014 4:10 am
by jcsantanac
hi,

I'm estimating a DSGEBVAR and including dsge_prior_weight parameter suggests new versions of Dynare, however, when I use the function estimate for the model results, Dynare tells me that the initial values ​​do not allow for the initial value of the likelihood. That is, there is a parameter that has not been initialized but Seeking with M_.param_names (find (isnan (..))) function, i can not find any uninitialized parameter. Also I am using the command estimated_params_init (use_calibration) to avoid this problem but it seems not work.

I appreciate anyone who can help me to identify the error, I have been reviewing the model but I have not found the error source. thanks for your help!. I am using matlab 2012b Dynare 4.4.2 and windows 7 professional.

Attach datafile and .mod file.

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.2).
Starting preprocessing of the model file ...
Substitution of endo lags >= 2: added 1 auxiliary variables and equations.
Found 22 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.


EIGENVALUES:
Modulus Real Imaginary

0 -0 0
0 0 0
0 -0 0
2.376e-17 2.376e-17 0
0.2728 0.2728 0
0.5 0.5 0
0.5666 0.5666 0
0.8 0.8 0
0.8 0.8 0
0.8 0.8 0
0.8 0.8 0
0.8743 0.8743 0
0.9 0.9 0
0.9271 0.9271 0
1.052 1.052 0
1.198 1.177 0.2192
1.198 1.177 -0.2192
Inf Inf 0
Inf Inf 0


There are 5 eigenvalue(s) larger than 1 in modulus
for 5 forward-looking variable(s)

The rank condition is verified.

Loading 210 observations from data.m

Restricting the sample to observations 50 to 210. Using in total 161 observations.
PARAMETER INITIALIZATION: Warning, some deep parameters are not initialized. They will be
PARAMETER INITIALIZATION: initialized with the prior mean.
Loading 210 observations from data.m

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND
= 5.985251e-19.
> In dsge_var_likelihood at 202
In initial_estimation_checks at 47
In dynare_estimation_1 at 179
In dynare_estimation at 89
In SOE_MonPol_ColBay at 387
In dynare at 180
Error in computing likelihood for initial parameter values
Error using print_info (line 110)
You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR's
innovations is not positive definite!
Error in print_info (line 110)
error('You are estimating a DSGE-VAR model, but the implied covariance matrix
of the VAR''s innovations is not positive definite!');
Error in initial_estimation_checks (line 69)
print_info(info, DynareOptions.noprint, DynareOptions)
Error in dynare_estimation_1 (line 179)
oo_ =
initial_estimation_checks(objective_function,xparam1,dataset_,M_,estim_params_,options_,bayestopt_,oo_);
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in SOE_MonPol_ColBay (line 387)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;

Re: Problem Estimation a DSGE-BVAR model

PostPosted: Wed Oct 29, 2014 4:22 pm
by jpfeifer
You can ignore the warning about not being intialized. This happens because you did not initialize the
Code: Select all
dsge_prior_weight

and it is set to the prior mean. The actual problem is
You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR's
innovations is not positive definite!

It seems that although you have five observables in five shocks, those five shocks are somehow collinear with respect to the forecast errors implied in the VAR in your observables. If you assume to observe all exogenous processes, it runs:
Code: Select all
varobs inflation_star v a z y_star u;

Try replacing one after another by the actual observables and see when the problem occurs.

Re: Problem Estimation a DSGE-BVAR model

PostPosted: Thu Oct 30, 2014 9:45 pm
by jcsantanac
Thanks Johannes, i'm going to fix my code based in your advices and i will comment soon

jpfeifer wrote:You can ignore the warning about not being intialized. This happens because you did not initialize the
Code: Select all
dsge_prior_weight

and it is set to the prior mean. The actual problem is
You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR's
innovations is not positive definite!

It seems that although you have five observables in five shocks, those five shocks are somehow collinear with respect to the forecast errors implied in the VAR in your observables. If you assume to observe all exogenous processes, it runs:
Code: Select all
varobs inflation_star v a z y_star u;

Try replacing one after another by the actual observables and see when the problem occurs.

Re: Problem Estimation a DSGE-BVAR model

PostPosted: Wed Nov 12, 2014 1:54 pm
by jcsantanac
Thanks Johannes, the help was successful. I chose different configurations between endogenous variables and the singularity of the model not appeared again

I have a last question related with the estimation function and the dsge var environment. When i get the IRF results, it contrast irf-dsge with irf dsge var outputs; however, with the forecast command i can not get this kind of comparison that could be interesting watch too.

Is there a command to do this kind of comparison inside the estimation function, or outside this command?. Thanks so much!.






jcsantanac wrote:Thanks Johannes, i'm going to fix my code based in your advices and i will comment soon

jpfeifer wrote:You can ignore the warning about not being intialized. This happens because you did not initialize the
Code: Select all
dsge_prior_weight

and it is set to the prior mean. The actual problem is
You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR's
innovations is not positive definite!

It seems that although you have five observables in five shocks, those five shocks are somehow collinear with respect to the forecast errors implied in the VAR in your observables. If you assume to observe all exogenous processes, it runs:
Code: Select all
varobs inflation_star v a z y_star u;

Try replacing one after another by the actual observables and see when the problem occurs.

Re: Problem Estimation a DSGE-BVAR model

PostPosted: Fri Nov 14, 2014 3:04 pm
by jpfeifer
I have to think about it. Could you provide me with the updated files?

Re: Problem Estimation a DSGE-BVAR model

PostPosted: Tue Nov 18, 2014 12:10 pm
by jcsantanac
Thanks Professor,

i attached the files. The idea is get a comparation between DSGE and DSGEBVAR forecasts in a same way like it does the bayesian_irf option.

I would like to do another two questions related with the optimization process that offers dynare 4.4.2

1. Frequently when i estimated my model (bayesian, but not bayesian case specially), the problem of the hessian singularity was always a big problem to the convergence of the parameter estimation (in other situations was the jscale, dynare could not get initial values; or in the bayesian case, the MH chains acceptance ratio was inferior to 10%). In this cases, i chose the "jumping_covariance=identity_matrix" to try get the convergence. In the output with this specification, i got that standar error estimation of the parameters was 1 consequently and i could not get a CI90% for the parameters. My question is: Is there a robust convergence to the parameter estimation using the jumping_covariance independently of the covergence problems of the hessian matrix to be confident with the results?

2. The new dynare version 4.4.3 has updates of the optimization processes of the estimation function?

Thanks a lot,


jpfeifer wrote:I have to think about it. Could you provide me with the updated files?