Dear Michel and Stephane,
one and a half years ago, I proposed functionality to execute user-defined function on the posterior draws (https://github.com/DynareTeam/dynare/pull/417). Despite inquiring about the status repeatedly with Sebastien and Stephane, I never got any response and let the issue sleep.
But now there are again two user questions in the forum that would require such a functionality:
http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6322 &t=6322
http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6268&p=17939#p17939 &t=6268&p=17939#p17939
Thus, I would like to ask again, if there is a design issue that prevents offering such a functionality?
Best,
Johannes
--
Johannes Pfeifer
Friesenwall 104
50672 Köln
Tel.: +49-221-29873852
Mobil.: +49-170-6936820
Germany
Hi Johannes,
I'm not sure that we should attempt to provide this feature as an option of ESTIMATION. I can't think of a situation where one would use the results of this function inside Dynare.
I would simply provide execute_posterior_function, maybe with another name, as a separate function, after running estimation. execute_posterior_function should return a unique output argument (possibly a cell, but we don't need to enforce it) provided by the user function.
In the 'posterior' case, I would add an option to use only a fraction of all posterior draws. In the 'prior' case, I couldn't see how to indicate the number of prior draws.
Best
Michel
Johannes Pfeifer writes:
Dear Michel and Stephane,
one and a half years ago, I proposed functionality to execute user-defined function on the posterior draws (https://github.com/DynareTeam/dynare/pull/417). Despite inquiring about the status repeatedly with Sebastien and Stephane, I never got any response and let the issue sleep.
But now there are again two user questions in the forum that would require such a functionality:
http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6322 &t=6322
http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6268&p=17939#p17939 &t=6268&p=17939#p17939
Thus, I would like to ask again, if there is a design issue that prevents offering such a functionality?
Best,
Johannes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Hi,
I agree with Michel. I do not think that we should add this as an option to the estimation command (or in dynare_estimation_1 routine). I also do not think that we even need a preprocessor interface.
Regarding the number of draws we already have routines to take an arbitrary number of draws in the posterior (ie in the mcmc draws) or in the prior and to save them on the disk. If I understand your code you use these generated files... But it is not obvious that these files are actually generated (before the call to execute_posterior_function). So we should test that NumberOfDrawsFiles is strictly greater than zero, and if not call a routine (selec_posterior_draws or prior_sampler) or ask the user to call one of this routines. We could add a routine
sampler('posterior',n) sampler('prior',n)
that would call
selec_posterior_draws(n)
or
options_.prior_draws = n; prior_sampler(0,M_,bayestopt_,options_,oo_,estim_params_)
depending on the value of the first argument.
Best, Stéphane.
Le 28/12/2014 16:21, Michel Juillard a écrit :
Hi Johannes,
I'm not sure that we should attempt to provide this feature as an option of ESTIMATION. I can't think of a situation where one would use the results of this function inside Dynare.
I would simply provide execute_posterior_function, maybe with another name, as a separate function, after running estimation. execute_posterior_function should return a unique output argument (possibly a cell, but we don't need to enforce it) provided by the user function.
In the 'posterior' case, I would add an option to use only a fraction of all posterior draws. In the 'prior' case, I couldn't see how to indicate the number of prior draws.
Best
Michel
Johannes Pfeifer writes:
Dear Michel and Stephane,
one and a half years ago, I proposed functionality to execute user-defined function on the posterior draws (https://github.com/DynareTeam/dynare/pull/417). Despite inquiring about the status repeatedly with Sebastien and Stephane, I never got any response and let the issue sleep.
But now there are again two user questions in the forum that would require such a functionality:
http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6322 &t=6322
http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6268&p=17939#p17939
&t=6268&p=17939#p17939
Thus, I would like to ask again, if there is a design issue that prevents offering such a functionality?
Best,
Johannes
- -- Stéphane Adjemian Université du Maine, Dynare Team