restar of MH algorithm from the point of interruption

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.

restar of MH algorithm from the point of interruption

Postby tanya » Wed Sep 22, 2010 3:32 pm

Suppose computer was accidentally shut down during MH algorithm. The hard drive contains several *_mh*_blck*.mat files. Is it possible to start from the point close to the point of interruption? Or do I need to start from the beginning?

I appreciate there is load_mh_file command, but I cannot find the proper usage of this command. If I write
estimation(datafile=nameq,lik_init=2,nobs=n1,mode_compute=0,mode_file=name_mode,load_mh_fil, mh_replic= 150000,mh_scale=0.35,bayesian_irf,irf=100)

it complains that *_mh14_blck2 does not exist. It does not exist, indeed, as I have fewer files than needed to complete. It crashed on *_mh5_blck2

Is it possible to start from what what exists?

PS. I run Dynare 3.064, but I suspect this would not matter.

Many thanks
tanya
 
Posts: 37
Joined: Tue Sep 12, 2006 6:41 pm

Re: restar of MH algorithm from the point of interruption

Postby StephaneAdjemian » Thu Sep 23, 2010 1:10 pm

Dear Tanya, You have to use option mh_recover instead of load_mh_file. For obvious safety reasons, you should make a copy of your mh_files before trying this option, I am not certain it works correctly with dynare 3.xxx).
Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: restar of MH algorithm from the point of interruption

Postby tanya » Thu Sep 23, 2010 1:37 pm

I did try this, but it did not recognise the command. As no help for version 3 is available any more, I cannot check.

On a different note, can I ask if there is any hope that you will make Dynare 4,5,... to call external functions with MULTIPLE variables output? I am kinda waiting (this is the reason I use Dynare 3), if there is no hope, I will try to invest into something different...
tanya
 
Posts: 37
Joined: Tue Sep 12, 2006 6:41 pm

Re: restar of MH algorithm from the point of interruption

Postby StephaneAdjemian » Thu Sep 23, 2010 3:33 pm

I can't remember when we added the keyword mh_recover. But I am sure there was a recover mode with dynare 3. Maybe you can try to add

Code: Select all
options_.mh_recover = 1;

before the estimation command.

It's possible (not convenient) to use n external functions instead of one external function returning n arguments. The first external function calls a function that put the n variables to be computed in globals (or in a global structure) and each external function returns one of the global variables (or one field of the global structure). It's not very nice...

I don't use external functions and prefer to compute what I need in the steady state file (the steady state file is called before the *_dynamic.m file evaluation). External variables are only needed if you consider functions of the endogenous variables.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: restar of MH algorithm from the point of interruption

Postby SébastienVillemot » Mon Oct 11, 2010 9:30 am

Note that, using the current unstable version of Dynare, you can already use functions with multiple return arguments by using a small trick: just create wrapper functions that call your original function and return the desired argument. You need to create as many such functions as you have return arguments.

I know this is only a workaround, but it should work fine and do what you want.

I’m not sure that we will implement the syntax that you want, because it may imply too many changes: could you give an example of the syntax that you would like to have in Dynare 4 ?
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests