I have this problem when I run my .mod file. Anybody see the

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.

I have this problem when I run my .mod file. Anybody see the

Postby permeh » Thu Oct 29, 2015 6:22 pm

I have this problem when I run my .mod file. Anybody see the error?
Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
ERROR: dsgetez3.mod: line 113, cols 1-2: Unknown symbol: cu

i have cu in variables.
permeh
 
Posts: 4
Joined: Thu Oct 29, 2015 6:16 pm

Re: I have this problem when I run my .mod file. Anybody see

Postby permeh » Thu Oct 29, 2015 6:36 pm

I have this problem when I run my .mod file. Anybody see the error?
Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
ERROR: dsgetez3.mod: line 113, cols 1-2: Unknown symbol: cu

i have cu in variables.[/quote]
permeh
 
Posts: 4
Joined: Thu Oct 29, 2015 6:16 pm

Re: I have this problem when I run my .mod file. Anybody see

Postby jpfeifer » Fri Oct 30, 2015 6:28 pm

Please provide the file.
------------
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

Inf standrad errors and 0.000 t statistics in ML estimation

Postby achiumia » Wed Nov 11, 2015 1:26 pm

Please am a novice in dynare estimation. Am using maximum likelihood to and will specify two models with money and interest policy rules. When I specify the money rule below is the result. doesn't seem to make much sense. Can I be assisted where I am getting it wrong.

Attached is the code.

Austin


POSTERIOR 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 EgyptEstimMLLL at 482
In dynare at 180
Warning: Matrix is singular to working precision.
> In dynare_estimation_1 at 709
In dynare_estimation at 89
In EgyptEstimMLLL at 482
In dynare at 180

RESULTS FROM MAXIMUM LIKELIHOOD ESTIMATION
parameters
Estimate s.d. t-stat

kappa_1 0.5910 Inf 0.0000
kappa_2 0.4416 Inf 0.0000
kappa_3 0.5559 Inf 0.0000
kappa_4 0.1233 Inf 0.0000
kappa_5 0.6556 Inf 0.0000
kappa_7 0.7014 Inf 0.0000
kappa_8 0.1799 Inf 0.0000
kappa_9 0.3552 Inf 0.0000
kappa_10 0.5947 Inf 0.0000
kappa_11 0.2383 Inf 0.0000
chi_f 0.7340 Inf 0.0000
chi_b 0.6422 Inf 0.0000
delta_1 0.3418 Inf 0.0000
delta_2 0.5038 Inf 0.0000
delta_3 0.0397 Inf 0.0000
delta_4 0.0098 Inf 0.0000
delta_5 0.5059 Inf 0.0000
delta_6 0.0622 Inf 0.0000
delta_7 0.1279 Inf 0.0000
delta_8 0.6907 Inf 0.0000
delta_9 0.0954 Inf 0.0000
delta_10 0.6648 Inf 0.0000
psi_1 0.4302 Inf 0.0000
psi_2 1.3269 Inf 0.0000
psi_3 2.8659 Inf 0.0000
psi_4 0.7628 Inf 0.0000
psi_5 0.0249 Inf 0.0000
psi_6 0.5338 Inf 0.0000
psi_7 0.4506 Inf 0.0000
psi_8 0.6776 Inf 0.0000
delta_1y 0.7697 Inf 0.0000
delta_m 0.7744 Inf 0.0000
rho_ff 0.9000 Inf 0.0000
rho_yf 0.6459 Inf 0.0000
rho_o 0.9564 Inf 0.0000
rho_qf 0.8700 Inf 0.0000
rho_rf 0.8900 Inf 0.0000
beta1 0.1300 Inf 0.0000
beta2 0.2600 Inf 0.0000
beta3 0.3500 Inf 0.0000
delta_2y 0.5621 Inf 0.0000
delta_1f 0.8621 Inf 0.0000
delta_2f 0.3404 Inf 0.0000
delta_3f 1.1931 Inf 0.0000
delta_1q 1.3035 Inf 0.0000
delta_2q 0.7665 Inf 0.0000
delta_3q 0.6870 Inf 0.0000
delta_4q 0.8892 Inf 0.0000
rho_r 0.9134 Inf 0.0000

standard deviation of shocks
Estimate s.d. t-stat

ups_yf -0.0004 Inf 0.0000
ups_o 0.0158 Inf 0.0000
ups_r 0.0043 Inf 0.0000

Total computing time : 0h00m08s
Note: warning(s) encountered in MATLAB/Octave code
Attachments
EgyptEstimMLLL.mod
the model is linearized with IS, Phillips curve, money demand and interest rate policy rule
(3.93 KiB) Downloaded 169 times
achiumia
 
Posts: 6
Joined: Tue Feb 10, 2015 12:10 pm

Re: I have this problem when I run my .mod file. Anybody see

Postby jpfeifer » Wed Nov 11, 2015 5:02 pm

You cannot estimate that many parameters with just one observable (output). The data is not informative enough for the parameters to be identified.
Moreover, your model looks completely wrong as you seem to be specifying a reduced form model that features no cross-equation restrictions between coefficients. That is not what the NK model would imply.
------------
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: I have this problem when I run my .mod file. Anybody see

Postby achiumia » Wed Nov 11, 2015 7:45 pm

Many thanks, Pfeifer.

Please bear with me.

In the proposed model, in the first equation i.e. output gap equation the lead and lagged output gap coefficients are defined as Kappa_1 and kappa_2 but on derivations, Kappa_1=1/1-h and kappa_2=h/1-h. I guess your response implies that instead of estimating the two reduced form parameters as Kappa_1*y(+1) and Kappa_2*y(-1) , I should instead use 1/1-h*y(+1) and h/1-h*y(-1). This will reduce number of calibrations from 2 parameters to only h while also addressing the NK specifics which seem absent in my current mod file?? I manually linearized all my equations and the model is in deviation from steady state values.

Austin
achiumia
 
Posts: 6
Joined: Tue Feb 10, 2015 12:10 pm

Re: I have this problem when I run my .mod file. Anybody see

Postby jpfeifer » Thu Nov 12, 2015 10:12 am

Exactly. You need to take care of parameter dependencies correctly.
------------
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

Estimating parameters in Dynare

Postby achiumia » Thu Dec 03, 2015 5:43 pm

Please Sirs help me with the issues below:

(i) Can one use Dynare to directly estimate parameters without specifying priors for both the MLE and Bayesian?

if not besides calibrating the priors,

(ii) how else can one generate the priors. For example, when estimating a reduced form N-K model, can one estimate parameters using another software and use them as priors in Dynare?

thanks for you help
achiumia
 
Posts: 6
Joined: Tue Feb 10, 2015 12:10 pm

Re: I have this problem when I run my .mod file. Anybody see

Postby jpfeifer » Fri Dec 04, 2015 5:54 am

Priors are only used for Bayesian estimation. For ML, you do not need any. I am not sure what you mean with your second question. Formal prior elicitation is done in Del Negro Schorfheide (2008) - Forming priors for DGSE models.
------------
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

Initial or starting values for MLE

Postby achiumia » Fri Dec 04, 2015 8:41 am

Many thanks Sir,

Apologies for the use of the word prior under MLE but I meant the starting values for estimating parameters in MLE. I understand that for MLE to take place, one needs to provide the starting values (or initial values) for the parameters. Now my question is how does one get these starting values for the MLE? Should one provide initial values for all parameters or just selected few?

Secondly when one derives the structural DSGE but is interested in estimating the reduced form type as in Zanetti (2012) (http://www.sciencedirect.com/science/ar ... 0411000541), how do you get the initial values?

May be I am not understanding something. Many thanks once again

Austin
achiumia
 
Posts: 6
Joined: Tue Feb 10, 2015 12:10 pm

Re: I have this problem when I run my .mod file. Anybody see

Postby jpfeifer » Mon Dec 07, 2015 9:57 am

You should always have a fully calibrated model first. See Remark 2 (Using stoch_simul before Estimation) in Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf. Then you can use these values as starting values.

Table 1 of Zanetti provides a mapping from structural to reduced form parameters. You can use this to compute starting values for the reduced form ones or start with his estimates.
------------
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

MLE model diagnostics

Postby achiumia » Tue Feb 23, 2016 5:41 pm

Many thanks indeed Pfeifer for your time and all valuable and timely help.

Please another question:

when using MLE in dynare do we have some diagnostic output which one could use to validate their estimation? For example in OLS one looks at DW statistic or R-squared etc; under GMM one would look at the J-statistic etc.

Can we generate similar output under MLE? All I see are std errors of estimates.

I will very much appreciate you help, once again

Austin
achiumia
 
Posts: 6
Joined: Tue Feb 10, 2015 12:10 pm

Re: I have this problem when I run my .mod file. Anybody see

Postby jpfeifer » Fri Feb 26, 2016 10:06 am

No, there is nothing like this as far as I know. Of course you could use the standard diagnostics on the residuals whether they are consistent with the MLE distributional assumptions.
------------
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: I have this problem when I run my .mod file. Anybody see

Postby achiumia » Fri Feb 26, 2016 10:40 am

Many thanks indeed JPfeifer! I am very grateful to you and ofcourse this forum for providing access to distingusihed resources like yourself. Keep on
achiumia
 
Posts: 6
Joined: Tue Feb 10, 2015 12:10 pm


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 4 guests