Differences between revisions 4 and 5
Revision 4 as of 2013-05-18 07:49:56
Size: 2981
Comment: Add information about Dynare unstable (later 4.4)
Revision 5 as of 2013-05-18 07:53:37
Size: 2977
Comment: Delete comma from default iteration numbers
Deletions are marked like this. Additions are marked like this.
Line 37: Line 37:
  * Use '''options_.Opt6Numb = ''' [default=20,000] (before the estimation command) to set the number of simulations in the new routine.   * Use '''options_.Opt6Numb = ''' [default=20000] (before the estimation command) to set the number of simulations in the new routine.
Line 47: Line 47:
  * Use '''options_.gmhmaxlik.number = ''' [default=20,000] to set the number of simulations used in estimation of the covariance matrix.
  * Use '''options_.gmhmaxlik.nscale = ''' [default=200,000] to set the number of simulations used in the tuning of the scale parameter.
  * Use '''options_.gmhmaxlik.nclimb = ''' [default=200,000] to set the number of simulations used in the hill climbing simulations.
  * Use '''options_.gmhmaxlik.number = ''' [default=20000] to set the number of simulations used in estimation of the covariance matrix.
  * Use '''options_.gmhmaxlik.nscale = ''' [default=200000] to set the number of simulations used in the tuning of the scale parameter.
  * Use '''options_.gmhmaxlik.nclimb = ''' [default=200000] to set the number of simulations used in the hill climbing simulations.

In some situations the posterior mode (that will be used to initialize the Metropolis Hastings (MH) and to define the jumping distribution) is hard to obtain with standard (newton like) optimization routines. The user, by specifying mode_compute = 6, can trigger a Monte-Carlo based optimization routine.

  • It's not an optimization routine!... Or a very inefficient one.
  • For the MH algorithm we don't need to start from the posterior mode. We only need to start from a point (in parameters space) with a high posterior density value and to use a good covariance matrix for the jumping distribution.
  • The idea is to use a MH algorithm with a diagonal covariance matrix (prior variances or a covariance matrix proportional to unity) and to continuously update the posterior covariance matrix and the posterior mode estimates through the MH draws.
    • After each MH-draw $\theta_t$ in the posterior distribution we update the posterior mean, the posterior mode and the posterior covariance as follows:

      •         \[
            \mu_t = \mu_{t-1} + \frac{1}{t}\left(\theta_t-\mu_{t-1}\right)
        \]

                \[
            \Sigma_t = \Sigma_{t-1} +
            \mu_{t-1}\mu_{t-1}'-\mu_{t}\mu_{t}'+
            \frac{1}{t}\left(\theta_t\theta_t'-\Sigma_{t-1}-\mu_{t-1}\mu_{t-1}'\right)
        \]

                \[
            \mathrm{mode}_t = \left\{
                       \begin{array}{ll}
                         \theta_t, & \hbox{if } p(\theta_t|\mathcal Y) > p(\mathrm{mode}_{t-1}|\mathcal Y) \\
                         \mathrm{mode}_{t-1}, & \hbox{otherwise.}
                       \end{array}
                     \right.
        \]

    • Use options_.Opt6Numb = [default=20000] (before the estimation command) to set the number of simulations in the new routine.

    • Use options_.Opt6Iter = [default=3] to call repeatedly the new optimization routine. Improves the estimates of the posterior covariance matrix and of the posterior mode.

    • This new optimization routine also provides a scale parameter (for the jumping distribution) such that acceptance ratio of the MH simulations will be around one third.
  • In Dynare unstable the options have been renamed and made more flexible
    • Use options_.gmhmaxlik.iterations = [default=3] to call repeatedly the new optimization routine. Improves the estimates of the posterior covariance matrix and of the posterior mode.

    • Use options_.gmhmaxlik.number = [default=20000] to set the number of simulations used in estimation of the covariance matrix.

    • Use options_.gmhmaxlik.nscale = [default=200000] to set the number of simulations used in the tuning of the scale parameter.

    • Use options_.gmhmaxlik.nclimb = [default=200000] to set the number of simulations used in the hill climbing simulations.

DynareWiki: MonteCarloOptimization (last edited 2018-09-26 11:13:49 by StéphaneAdjemian)