Alternative to modecompute=6?

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.

Alternative to modecompute=6?

Postby t-razafindrabe » Fri Nov 07, 2014 10:57 am

Dear all,

I am actually estimating a simple model (like SW2003 and SW2007 but with import sector) but unless using "modecompute=6", I always get the following error message:

??? Error using ==> chol
Matrix must be positive definite.


The problem is that with modecompute=6, parameters seem to badly converge (I am refering to "mdiag" plot).

I see in some post that it might come from initial value or observation equation specification. However, I use estimated value of SW2007 as starting value and I carefully follow advices given in J. Pfeifer manual for setting obervation equation.

I am pretty new in using dynare so any help would be gratefully appreciated.

Best regards,
t-razafindrabe
 
Posts: 5
Joined: Wed Oct 29, 2014 1:46 pm

Re: Alternative to modecompute=6?

Postby t-razafindrabe » Sun Nov 09, 2014 11:26 am

Any help please,

does it have anything to do with initial value or equation or anything else?

thanks for any help,

Best regards,
t-razafindrabe
 
Posts: 5
Joined: Wed Oct 29, 2014 1:46 pm

Re: Alternative to modecompute=6?

Postby jpfeifer » Sun Nov 09, 2014 11:43 am

It is hard to tell. What often works best is a sequence of different mode_compute. For example, run mode_compute=4 first and then use the generated mode_file as the starting value for running mode_compute=6,8, or 9.
But before doing this, try to check whether something else is wrong. For example, check the parameters at the detected mode whether they hit a bound and test whether they are identified at all.
------------
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: Alternative to modecompute=6?

Postby t-razafindrabe » Sun Nov 09, 2014 10:28 pm

Thanks a lot Pfeifer,

Running mode-compute=4 first generates error message. Even if I run first mode-compute=6 before running mode-compute=4, 8 or 10, I still get the same error message. I have used the identification command and all parameters are identified both for H and J (even using Monte-Carlo as option).

However, parameters may hit a bound but I don't exactly how I will recognize it. Is it for example the case for the variables SE_E_R and SE_E_PIBAR (which are respectively the interest rate and inflation objective shocks). If it is the case, should I decrease the mean of the prior?

Thanks in advance,
Attachments
PriorPosterior.pdf
(45.84 KiB) Downloaded 154 times
t-razafindrabe
 
Posts: 5
Joined: Wed Oct 29, 2014 1:46 pm

Re: Alternative to modecompute=6?

Postby jpfeifer » Mon Nov 10, 2014 4:50 pm

Given that the shock standard deviations seem so different from your prior, are you sure that your scaling is correct? How do the persistence parameters look like?
------------
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: Alternative to modecompute=6?

Postby t-razafindrabe » Mon Nov 10, 2014 8:17 pm

Thanks again for your response,

Persistence parameters hit also bounds (please see the file "PriorPosterior(rho)), most of the time the upper bound but sometimes I have a very low estimates. I have seen your remark concerning the scaling of standard error in your notes on observation equations. Unlike Smets and Wouters 2007, I do not express observable variables in percent (that is, not multiplied by 100). In this case, should I divide or multiply the prior mean of the standard error by 100? In my mode file (attached below), I took exactly their prior because it seems that the priors they use in the published version (2007) is for observables that are not expressed in percent. This is because I've compared with priors from the NAWM (New Area Wide Model of Christoffel et al. (2008)) which used observed variables not in percent and it is similarly the same prior in terms of scaling.

Many thanks,

Best regards,
Attachments
TJ2014_par_estim.mod
(3.1 KiB) Downloaded 117 times
PriorPosterior(rho).pdf
(45.15 KiB) Downloaded 162 times
t-razafindrabe
 
Posts: 5
Joined: Wed Oct 29, 2014 1:46 pm

Re: Alternative to modecompute=6?

Postby t-razafindrabe » Thu Nov 13, 2014 3:33 pm

Dear all,

I've checked the scaling of the std prior. I compare it with a corresponding std from an AR(1) estimation using observable variables. There is a scaling difference but after fixing this difference (I divide the std prior by 100 compared to Smets and Wouters 2007), I still get the error message when using "modecompute=4".

Meanwhile, I have seen that some parameters' eigenvalues have an imaginary part (please see the attached file). Is it correct to interpret it as a mis-specification problem (prior, equation, ....) ? I'am wondering if it the source of the error message.

Thanks for any help,
Attachments
eigenvalues.pdf
(5.05 KiB) Downloaded 144 times
t-razafindrabe
 
Posts: 5
Joined: Wed Oct 29, 2014 1:46 pm

Re: Alternative to modecompute=6?

Postby jpfeifer » Fri Nov 14, 2014 10:32 am

Do not worry about the eigenvalues. They can be complex. Rather, that rho_g hits the upper bound is worrisome. Check what is going on there.
------------
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: Alternative to modecompute=6?

Postby ZBCPA » Tue Sep 22, 2015 3:09 am

jpfeifer wrote:It is hard to tell. What often works best is a sequence of different mode_compute. For example, run mode_compute=4 first and then use the generated mode_file as the starting value for running mode_compute=6,8, or 9.
But before doing this, try to check whether something else is wrong. For example, check the parameters at the detected mode whether they hit a bound and test whether they are identified at all.


Dear Johhanes,

Here you said "run mode_compute=4 first and then use the generated mode_file as the starting value for running mode_compute=6,8, or 9". If I understand correctly, the generate mode_file here is either
Code: Select all
mode_file=xxx_mode
after mode finding or
Code: Select all
mode_file=xxx_mh_mode
after mcmc.(xxx is the code name)

Idealy, they are the same , but gennerally xxx_mh_mode would be more accurate than xxx_mode . However, to get the file of xxx_mode.mat by mode finding , only using replic=0 would be enough, so it saves more time comparing to get the file of "xxx_mh_mode.mat" which is after MCMC using replic>0.

So what is your suggestion for the first step to find mode?
1.just run mode finding with replic=0 to save time and get xxx_mode.mat file , then use that mode file to run a different mode_compute?

OR

2. Firstly run MCMC with replic>0 to get xxx_mh_mode.mat file, then use that mode file to run a different moe_compute?

Sorry that it is very long due to my poor English.

Best regards,
Huan
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: Alternative to modecompute=6?

Postby jpfeifer » Wed Sep 23, 2015 8:16 pm

the mh_mode one will only be better than the _mode one if you did not find the mode and the MCMC moves to a region of higher posterior likelihood. The latter is essentially a shortened version of a simulated annealing or mode_compute=6. It is often more efficient to run a different optimizer than using the MCMC run. Thus, my suggestion is to use mh_replic=0.
------------
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: No registered users and 1 guest

cron