Update Breaking Features in Version 6: trust_region authored by Johannes Pfeifer's avatar Johannes Pfeifer
Version 6 will bring many improvements but also a few potentially breaking changes. We most strongly encourage you to modify your own code to comply with the new version in advance of its release. Relying on an older version of Dynare to run your own code may seem like a gain of time in the short term but will lead to more problems later. Note also that possible bugs found later in version 5 won't be fixed in that version. We expect users to run version 6 after its release. Version 6 will bring many improvements but also a few potentially breaking changes. We most strongly encourage you to modify your own code to comply with the new version in advance of its release. Relying on an older version of Dynare to run your own code may seem like a gain of time in the short term but will lead to more problems later. Note also that possible bugs found later in version 5 won't be fixed in that version. We expect users to run version 6 after its release.
# Changes related to the storage of results # Changes related to the storage of results
Information stored in `oo_.endo_simul, oo_.exo_simul, oo_.irfs` and `M_.params` will not be duplicated in the base workspace anymore. Information stored in `oo_.endo_simul, oo_.exo_simul, oo_.irfs` and `M_.params` will not be duplicated in the base workspace anymore.
1. IRFs stored by `stoch_simul` in `oo_.irfs` are not stored as vectors of the same in the base workspace. Users can use the new `send_irfs_to_workspace` function to send the IRFs to the base workspace after executing the command. 1. IRFs stored by `stoch_simul` in `oo_.irfs` are not stored as vectors of the same in the base workspace. Users can use the new `send_irfs_to_workspace` function to send the IRFs to the base workspace after executing the command.
2. Endogenous and exogenous variable values stored in `oo_.endo_simul` and `oo_.exo_simul` are not stored as vectors of the same name as the variables in the base workspace after running `stoch_simul` with `periods>0` or `perfect_foresight_solver`. Users can use the new `send_endogenous_variables_to_workspace` and `send_exogenous_variables_to_workspace` functions to send the variable values to the base workspace after the respective commands. 2. Endogenous and exogenous variable values stored in `oo_.endo_simul` and `oo_.exo_simul` are not stored as vectors of the same name as the variables in the base workspace after running `stoch_simul` with `periods>0` or `perfect_foresight_solver`. Users can use the new `send_endogenous_variables_to_workspace` and `send_exogenous_variables_to_workspace` functions to send the variable values to the base workspace after the respective commands.
# Changes related to global variables # Changes related to global variables
Global variables have been removed from the downstream pipeline of Dynare commands like `perfect_foresight`, `identification`, and `sensitivity`. It is therefore necessary to explicitly pass the former global variables as function in- and outputs. Global variables have been removed from the downstream pipeline of Dynare commands like `perfect_foresight`, `identification`, and `sensitivity`. It is therefore necessary to explicitly pass the former global variables as function in- and outputs.
# Changes related to `estimation` # Changes related to `estimation`
The default value of `mode_compute` is now 5. If you want to restore the old behavior, you have to explicitly set `mode_compute=4`. The default value of `mode_compute` is now 5. If you want to restore the old behavior, you have to explicitly set `mode_compute=4`.
# Changes related to `sensitivity` # Changes related to `sensitivity`
The `dynare_sensitivity` command has been renamed `sensitivity`. The old name is still accepted but will trigger a warning. The `dynare_sensitivity` command has been renamed `sensitivity`. The old name is still accepted but will trigger a warning.
# Changes related to `estimated_params` # Changes related to `estimated_params`
Multiple `estimated_params` blocks now concatenate their contents, instead of overwriting previous ones. To restore the old (undocumented) behavior, you need to use the `overwrite` option: Multiple `estimated_params` blocks now concatenate their contents, instead of overwriting previous ones. To restore the old (undocumented) behavior, you need to use the `overwrite` option:
``` ```
estimated_params(overwrite); estimated_params(overwrite);
end; end;
``` ```
# Changes related to the macro-processor # Changes related to the macro-processor
A macro-processor variable defined without a value will now be equal to `true` (it would previously be equal to `1`). A macro-processor variable defined without a value will now be equal to `true` (it would previously be equal to `1`).
This affects lines such as: This affects lines such as:
``` ```
@#define var @#define var
``` ```
in a `.mod` file. in a `.mod` file.
This also affects variable defined on the `dynare` command line, such as: This also affects variable defined on the `dynare` command line, such as:
``` ```
dynare myfile.mod -Dvar dynare myfile.mod -Dvar
``` ```
This change should have no impact in most cases, since variable thus defined are typically tested with `@#ifdef`/`@#ifndef` (in which case their value does not matter). This change should have no impact in most cases, since variable thus defined are typically tested with `@#ifdef`/`@#ifndef` (in which case their value does not matter).
# Changes related to `resid` # Changes related to `resid`
The `resid`-command now only accepts the new `non_zero`-option. The old syntax The `resid`-command now only accepts the new `non_zero`-option. The old syntax
``` ```
resid(1); resid(1);
``` ```
will trigger an error will trigger an error
> syntax error, unexpected INT_NUMBER, expecting NON_ZERO > syntax error, unexpected INT_NUMBER, expecting NON_ZERO
and needs to be replaced by and needs to be replaced by
``` ```
resid; resid;
``` ```
# Changes related to the `mh_jscale`-option of `estimation` # Changes related to the `mh_jscale`-option of `estimation`
The default value of `mh_jscale` is now `2.38^2/npar`, where `npar` denotes the number of estimated parameters, instead of a fixed `0.2`. The new value corresponds to the optimal value for a Gaussian symmetric random walk Metropolis-Hastings (Gelman et al. 1995). Particularly for big models, the new default value should perform better. The default value of `mh_jscale` is now `2.38^2/npar`, where `npar` denotes the number of estimated parameters, instead of a fixed `0.2`. The new value corresponds to the optimal value for a Gaussian symmetric random walk Metropolis-Hastings (Gelman et al. 1995). Particularly for big models, the new default value should perform better.
At the same time, the `mh_init_scale`-option has become deprecated. Use the new `mh_init_scale_factor`-option to govern the overdispersion of the starting values for multiple MCMC chains. This option specifies the multiple of `mh_jscale` to be used. At the same time, the `mh_init_scale`-option has become deprecated. Use the new `mh_init_scale_factor`-option to govern the overdispersion of the starting values for multiple MCMC chains. This option specifies the multiple of `mh_jscale` to be used.
# Changes related to the `model_info`-command # Changes related to the `model_info`-command
The `static`-option has been superseded by the `block_static`-option. The `static`-option has been superseded by the `block_static`-option.
# Removed commands # Changes related to numerical solvers (`trust_region`)
- The `periods` command has been removed. Use the `periods` option instead. Dynare 6 features a reimplementation of the trust region solver (`solve_algo=4,9`). The reimplementation introduces new termination criteria based on `tolx`. Particularly for small `tolx`, the default steady state finder may now issue an error message for `mod`-files that successfully ran in Dynare 6. A workaround is to increase `tolx` to a larger value.
# Removed commands
- The `periods` command has been removed. Use the `periods` option instead.
- The `Sigma_e` command has been removed. Use the `shocks` block instead. - The `Sigma_e` command has been removed. Use the `shocks` block instead.
\ No newline at end of file