Commit Graph

297 Commits (5d47ac2aa9b0ab12c3b3d4bab39a03ead4eda0be)

Author SHA1 Message Date
Stéphane Adjemian (Odysseus) 248ad18846 Merge remote-tracking branch 'Dynare/master' into enterprise
Fixed conflicts in:

 - .gitlab-ci.yml
 - matlab/dynare_config.m
 - matlab/dynare_solve.m
 - matlab/initvalf.m
 - matlab/perfect-foresight-models/make_ex_.m
 - matlab/perfect-foresight-models/perfect_foresight_setup.m
 - mex/build/matlab/Makefile.am
 - mex/build/matlab/configure.ac
 - mex/build/octave/Makefile.am
 - mex/build/octave/configure.ac
 - mex/sources/Makefile.am
 - preprocessor
 - tests/Makefile.am
2020-09-17 14:53:32 +02:00
Sébastien Villemot b281d682f2
Manual: document default name for “shock_groups” blocks
By the way, fix the syntax description for the name (it needs *not* be quoted).

[skip ci]
2020-09-14 18:43:08 +02:00
Sébastien Villemot 11ef652136
Manual, external functions: when derivatives are not provided, finite difference is used
[skip ci]
2020-07-09 18:03:35 +02:00
Johannes Pfeifer dfc7357636 Add display of theoretical moments at order=3 with pruning 2020-06-30 13:46:54 +02:00
Michel Juillard b70d99d1b4
Refactoring of initval_file and histval_file
initval_file and hisvfal_file are now more flexible and have functionalities
similar to option datafile in estimation.

Closes: #1671
2020-05-14 16:45:54 +02:00
Stéphane Adjemian (Charybdis) 046960c4a8
Merge remote-tracking branch community/master into enterprise 2020-04-03 11:33:46 +02:00
Willi Mutschler 64a2a4388a
🐛 📖 Fixes TaRB with student t proposal distribution 2020-04-01 14:46:22 +02:00
Sébastien Villemot 43ed7b2b69
Merge remote-tracking branch 'community/master' into enterprise 2020-03-27 16:28:41 +01:00
Johannes Pfeifer 625ad3099e Document options added in dab769c6f4 2020-03-19 14:42:18 +01:00
Stéphane Adjemian (Charybdis) 2083246a35
Add initial condition for mh_tune_jscale.
Closes #1717.
2020-02-29 13:25:24 +01:00
Johannes Pfeifer 2fcd22059b
Add documentation for the mh_tune_jscale_initial_guess option
Related to https://git.dynare.org/Dynare/preprocessor/-/merge_requests/16
2020-02-29 10:28:50 +01:00
Stéphane Adjemian (Charybdis) fa95a6347d
Added new nonlinear solvers (solve_algo 12 and 14).
These algorithms are alternative versions of 2 and 4 specialized for
models where each equation has only one endogenous variable on the
left hand side (only allowed expression on LHS is the log of an
endogenous variable). Univariate recursive blocks are then not solved
with a non linear but by evaluating the RHS expression.
2020-02-20 13:07:54 +01:00
Houtan Bastani 2fea033874
doc: remove warning in compilation introduced in 3af2cc3fc4
a blank line is needed after a bulleted list
2020-02-19 22:17:38 +01:00
Houtan Bastani 70d7a48d44
preprocessor update
- macro processor: allow for the definition of a variable without a value
- dragonfly: add new field to `options_.parallel_info`
- fix lookbehind to handle `-` sign in substitution of dates in native statements
- remove support for weekly dates
- dragonfly: support ProgramConfig config file option
- dragonfly: support ProgramPath config file option
- add undocumented `gui` option to preprocessor
- occbin: support occbin tags in equation tags, add occbin_likelihood and occbin_smoother as options to estimation
- make loop variables const
- Combine `DynareMain.cc` and `DynareMain2.cc`
2020-02-19 22:03:01 +01:00
Sébastien Villemot 04d06dc330 Merge branch 'manual' into 'master'
Manual updates regarding Identification

See merge request Dynare/dynare!1712
2020-02-17 16:14:16 +00:00
Willi Mutschler 3af2cc3fc4
📖 Update manual 2020-02-17 16:58:38 +01:00
Sébastien Villemot cd195279e9
Manual: workaround for incorrect display of macro-directives without arguments
The workaround consists in appending the names of those macro-directives with a
regular space followed by a zero-width space (U+200B).

An extra LaTeX declaration was also added in order to make this hack work with
the PDF.

Ref. #1707
2020-02-17 15:41:39 +01:00
Stéphane Adjemian (Charybdis) f69cd14983
Updated reference manual wrt the nonlinear filters at higher order. 2020-02-16 21:16:22 +01:00
Stéphane Adjemian (Charybdis) 10c196de34
k order approximation available in online filters. 2020-02-16 21:16:21 +01:00
Sébastien Villemot 99d2b5ad39
Manual: add set union and intersection operators in the macro-processor 2020-02-14 18:28:10 +01:00
Sébastien Villemot 177c5c359f
Implement estimation under discretionary optimal policy
Also add a test case.

For the time being, estimating parameters that appear in the discount factor is
not supported.

Ref. #1173
2020-02-03 18:29:45 +01:00
Sébastien Villemot 00ee480674
Manual: add the accessor functions
Note that, for get_mean, the syntax with an optional order is not documented,
because the semantics is different at order 2, and it does not work for higher
orders.

Closes: #1687
2020-01-22 16:25:35 +01:00
Houtan Bastani 77b7b216d0
doc: use references instead of repeating the same info
[skip ci]
2020-01-22 10:59:34 +01:00
Houtan Bastani b090669e8f
doc: add info about `epilogue` block
Closes issue #1679

[skip ci]
2020-01-22 10:31:56 +01:00
Sébastien Villemot 06ce5d1e56
Manual: document init2shocks
Closes: #1650
2020-01-21 18:39:33 +01:00
Sébastien Villemot e371b1a94b
New option “filtered_theoretical_moments_grid”, that supersedes “hp_ngrid”
The old option is left for backward-compatibility purposes, but it has the same
effect as the new one.

Closes: #1093
2020-01-20 16:23:10 +01:00
Sébastien Villemot 2fb18bba97
Manual: FILENAME need not always be a quoted string (in a Dynare context)
Ref. !1692
2020-01-20 14:59:37 +01:00
Johannes Pfeifer b3aef92234 Document xls_range/sheet options of calib_smoother
Closes https://git.dynare.org/Dynare/dynare/issues/1695
2020-01-13 12:56:18 +01:00
Houtan Bastani 8764330725
fix typo in doc
`check` has two OPTIONS

[skip ci]
2020-01-13 12:42:09 +01:00
Johannes Pfeifer 2c8c120298 Replace various references to deprecated ramsey_policy by ramsey_model 2020-01-10 15:26:50 +01:00
Johannes Pfeifer 055710c938 Change ordering of optimal policy commands
Moves common planner_objective command to front
2020-01-10 15:11:09 +01:00
Johannes Pfeifer 7245cb2ef3 Document evaluate_planner_objective
Also clarifies restructures section on optimal policy and clarifies calling order of commands
2020-01-10 08:38:22 +01:00
Johannes Pfeifer f8e415a868 Change perfect foresight example code to suggested new syntax 2020-01-09 19:30:38 +01:00
Houtan Bastani b4479361c1
doc: fix typo and formatting 2020-01-08 15:43:18 +01:00
Houtan Bastani 8fbb77303a
dynare manual: cleanup whitespace
- remove trailing whitespace
- replace tabs with spaces as per PEP guidelines
2020-01-08 15:04:59 +01:00
Houtan Bastani c4cc32db29 Merge branch 'dynasave' into 'master'
Expand documentation of dynasave

Closes #1691

See merge request Dynare/dynare!1692
2020-01-06 13:55:27 +00:00
Johannes Pfeifer aa610f9f8e Expand documentation of dynasave
Closes https://git.dynare.org/Dynare/dynare/issues/1691
2020-01-06 13:15:36 +01:00
Sébastien Villemot d40b775260
Preprocessor: new “with_epilogue” option and related fixes
Ref. !1688
2019-12-20 11:57:34 +01:00
Sébastien Villemot efa6c6c682
“datafile” option of “perfect_foresight_setup” (and “simul”) now equivalent to “initval_file”
Ref. #1663
2019-12-19 14:58:54 +01:00
Sébastien Villemot f720f470bf
Preprocessor update
— “ramsey_policy”: bugfix when no option is passed
— various improvements to “epilogue” (preprocessor#36)
— compatibility with Bison 3.5
— bugfix in search for constant equations
— new “planner_discount_latex_name” option of “ramsey_policy” (Closes: #1686)
2019-12-18 17:46:38 +01:00
Sébastien Villemot 54781be7ae
Manual: markup fixes 2019-12-18 16:56:39 +01:00
Sébastien Villemot 6ba10b88f2
Preprocessor: various provisions for improvements to shock decomposition
Accordingly update the MATLAB routines, the testsuite, and the manual.

In particular, “squeeze_shock_decomp” has been renamed to
“squeeze_shock_decomposition” for consistency with other commands.

Ref. #1687, !1655
2019-12-18 11:56:57 +01:00
Sébastien Villemot 553615efbc
Manual: fix the description of the “colormap” option
This option takes as argument the name of MATLAB/Octave variable, not a string.

Ref #1586
2019-12-09 15:52:50 +01:00
Sébastien Villemot 3f3f49c465 Merge branch 'flip_diff' into 'master'
Flip diff

See merge request Dynare/dynare!1677
2019-12-06 15:29:07 +00:00
Houtan Bastani 5e429f8c92
update preprocessor
- fix bug with cbrt
- fix latex output
- add compilation_setup command. closes preprocessor#35
- fix bugs with initial_condition_decomposition. preprocessor#37
2019-12-06 14:58:19 +01:00
Houtan Bastani fa493bc10a
doc: fix typo 2019-12-06 14:58:19 +01:00
Marco Ratto 74e7c12d9d integrate documentation for plot_shock_decomposition
add documentation to initial_condition_decomposition
2019-12-05 16:51:37 +01:00
Marco Ratto e9607d09a5 added documentation of flip diff options of plot decomposition 2019-12-05 15:13:17 +01:00
Dóra Kocsis b9af92eb8a Save conditional forecast output in oo_. Closes: Dynare/dynare#1672 2019-11-29 15:25:05 +01:00
Houtan Bastani f2205ed4a1
add nograph option to plot_shock_decomposition
In updating the preprocessor, also update call to plot_icforecast
2019-11-29 15:17:41 +01:00
Sébastien Villemot 52cb36d433
Preprocessor update
- new include_eqs and exclude_eqs command-line options
- new “forecast” option to “shock_decomposition”
- remove the “linear” option of “stoch_simul”
- forbid exogenous and exogenous deterministic variables in STEADY_STATE
  operator (#825)
2019-11-27 17:32:52 +01:00
Sébastien Villemot a909bfd58c
Manual: fix typo 2019-11-26 12:59:20 +01:00
Johannes Pfeifer b60d26a745 Add variable explanations to manual 2019-11-22 11:16:14 +01:00
Sébastien Villemot 13c645e940
Preprocessor: improvement to balanced growth test (#1389), macro-processor bugfix for loops
Also includes various modernizations.
2019-11-14 18:04:07 +01:00
Sébastien Villemot cc9445e086
Manual: update various URLs
Some URLs have changed with the new Dynare website.

Also use HTTPS whenever possible.
2019-11-14 17:04:05 +01:00
Sébastien Villemot b3d1e8412b
Add support for mode_compute=1 under Octave
Since version 1.6, the optim Forge package has an implementation of fmincon.
Hence we can now use mode_compute=1 under Octave.

This commit also adds tests/optimizers/fs2000_1.mod to the testsuite. It will
be skipped under MATLAB if the optimization toolbox is not there, or under
Octave if optim ≥ 1.6 is not there.
2019-10-08 18:38:15 +02:00
Sébastien Villemot 6c1dcae506
Manual: fix links to Octave Forge website 2019-10-08 18:38:15 +02:00
Houtan Bastani afcdf46e80
capitalize Cepremap and Matlab, uncapitalize DYNARE 2019-10-02 14:09:21 +02:00
Dóra Linda Kocsis 6ece46ce65 doc: grammar fix 2019-10-01 12:13:49 +02:00
Houtan Bastani 6bc0672ddf
doc: aesthetic fix 2019-09-30 12:31:45 +02:00
Houtan Bastani 715ae0ce39
preprocessor: submodule update 2019-09-30 12:28:29 +02:00
Sébastien Villemot 7b053c7e92
Option graph_format=pdf now works under Octave
Also copy the same Octave-specific code as for EPS printing (added in
84f0d6c7da to fix problems with hybrid
Unix/Windows parallel clusters).
2019-09-25 16:06:38 +02:00
Sébastien Villemot d732075662
Manual: fix typo and formatting
[skip ci]
2019-09-20 14:33:59 +02:00
Houtan Bastani 6ddf87aa92
stoch_simul: save var_list in oo_. closes #1646 2019-09-12 15:02:18 +02:00
Houtan Bastani 7712a02f02
add print and noprint option to perfect_foresight_solver. closes #1647 2019-09-12 14:50:14 +02:00
Houtan Bastani 45af7e4a7d
doc: footnotes come after periods 2019-09-06 10:48:56 +02:00
Houtan Bastani 31f9fe6646
doc: note on line endings in .mod files. closes preprocessor#14 2019-09-06 10:48:55 +02:00
Houtan Bastani 1e8b00babf
doc: remove warning from compilation by using anonymous reference instead (two underscores instead of one) 2019-08-27 12:37:56 +02:00
Houtan Bastani 51d2f71514
submodule update: preprocessor + doc 2019-08-27 12:23:05 +02:00
Houtan Bastani 5994321cd7
preprocessor: submodule update 2019-08-19 16:58:14 +02:00
Houtan Bastani b6cbfb56d1
preprocessor: submodule update and doc update 2019-08-08 10:27:56 -04:00
Houtan Bastani b33900b86c
preprocessor: submodule update and doc update 2019-08-07 11:11:24 -04:00
Houtan Bastani 7efacbc478
doc: macro processor integer range with user-defined increment 2019-08-06 17:31:00 -04:00
Houtan Bastani a59732cd69
doc: new built-in function cbrt 2019-08-06 17:26:51 -04:00
Houtan Bastani 885a206400
preprocessor: submodule update and doc update 2019-08-06 17:08:45 -04:00
Houtan Bastani 452dc3ceb5
preprocessor: submodule update and doc update 2019-08-06 12:11:14 -04:00
Sébastien Villemot 512f37ae85
Update manual following the move of LaTeX files generated by preprocessor 2019-07-11 17:40:28 +02:00
Sébastien Villemot febf248f17
Manual, macro-processor: fix explanation for interaction between brackets and colon notation
Ref preprocessor#6

[skip ci]
2019-07-03 17:45:23 +02:00
Sébastien Villemot 5d00a4756b
Manual, macro-processor: advertise “log” rather than “ln” 2019-07-03 17:35:47 +02:00
Houtan Bastani 123049cf18
doc: add comment about brackets around array created from colon operator. closes preprocessor#6 2019-07-01 14:36:55 +02:00
Houtan Bastani f2b61b3e9e
submodule update: preprocessor; doc: introduce comprehensions 2019-06-26 15:09:55 +02:00
Houtan Bastani 8745880bde
doc: small changes 2019-06-26 11:01:39 +02:00
Houtan Bastani 98c2152ec5
doc: update macro processor section following rewrite 2019-06-25 10:09:09 +02:00
Sébastien Villemot a2ce1a5607
Manual: various fixes
Thanks to Aurélien Poissonnier for his feedback.
2019-05-16 16:55:23 +02:00
Stéphane Adjemian (Charybdis) e5bc8ff1de Document behaviour of lmmcp option wrt transformations of equation.
Closes #1606.

[skip-ci]
2019-04-26 20:16:54 +02:00
Stéphane Adjemian (Charybdis) 72afafe3d4 Fixed hyperlink for solve_algo option.
[skip-ci]
2019-04-26 16:38:50 +02:00
Sébastien Villemot f71006329d
Manual: fix year of publication of Andreasen et al. (2018)
Ref #1643
2019-04-17 15:20:22 +02:00
Sébastien Villemot 38b588d7c0
Manual: adapt for k-order
Ref #217
2019-04-16 12:29:16 +02:00
Sébastien Villemot a8a53804e7
Fix typo 2019-04-09 14:38:08 +02:00
Houtan Bastani a04f5b7ae3
doc: fix typos in manual 2019-04-08 15:45:12 +02:00
Houtan Bastani 01ce90afcd
doc: fix typo in option default value 2019-04-08 12:05:03 +02:00
Houtan Bastani d0b1e0a721
doc: fix typos 2019-04-03 14:35:39 +02:00
Houtan Bastani 57f97b1a07
doc: fix parameter_set option 2019-04-03 14:35:39 +02:00
Houtan Bastani 87cc694abb
doc: fix page overrun 2019-03-28 16:34:09 +01:00
Houtan Bastani d9343b4458
doc: wrap equation to newline 2019-03-25 11:12:32 +01:00
Willi Mutschler 666c9b8003 Improvement of Identification Toolbox
# Improvements
  * heavily commented (also auxiliary functions) and changed notation to make all the functions (hopefully) more readable and understandable, and hence, easier to debug
  * added identification criteria of Komunjer and Ng (2011, Econometrica) and Qu and Tkachenko (2012, Quantitative Economics)
  * tests can be turned of, i.e. nostrength disables identification strenght, noreducedform disables reduced form criteria, nomoments disables moment criteria, nospectrum disables spectrum criteria, nominimal disables minimal system criteria
  * all kronflags (analytic_derivation_mode) actually work in all functions
  * added functionality when there is correlation in Sigma_e and when one wants to consider corr parameters of exogenous shocks. Previously, (1) corr parameters were not allowed when calling identification and (2) when Sigma_e was not diagonal then the toolbox relied on numerical derviatives only (kronflag=-1). Now it is possible to handle both identification of corr parameters as well as correct analytical derivatives when Sigma_e is not diagonal with all possible kronflag values (-1|-2|0|1)
  * all plots and results are stored in the same folder named identification (previously there was another one with a capital I (Identification))

# Needed changes to preprocessor
  * add as field to options_ident:

    - tex (same as in options_)
    - nostrength (to turn off identification strength)
    - noreducedform (to turn off reduced form criteria)
    - nomoments (to turn off Iskrev's moment criteria)
    - nominimal (to turn off Komunjer and Ng's minimal system criteria)
    - nospectrum (to turn off Qu and Tkachenko's spectrum criteria)

  * add to options_ident:
    - normalize_jacobians (whether to normalize Jacobians or not)
    - grid_nbr (integer used to discretize the interval [-pi;pi]
    - tol_rank (tolerance level to compute ranks)
    - tol_deriv (tolerance level to select nonzero columns in derivatives)
    - tol_sv (tolerance level to select nonzero singular values)
    - ChecksViaSubsets (for debugging purposes, uses different function to find problematic parameter sets)
    - max_dim_subsets_groups (for debugging purposes, used for ChecksViaSubsets)

# Further Suggestions
  * Rename getH.m into getParamsDerivReducedForm.m to make the purpose of this function evident
  * Rename getJJ.m into getIdentificationJacobians.m to make the purpose of this function evident
  * Rename thet2tau.m into IdentificationNumericalObjectiveFunction.m to make the purpose of this function evident
  * dYss, d2Yss, dg1 should also include derivatives wrt to stderr and corr parameters (even though these are just 0), as in other functions (getJJ, dynare_estimation) we always add these manually
  * I am pretty sure the current handling in getH.m of dYss and d2Yss is not correct in the case of nonstationary variables (if g2static is nonempty), I added a warning message, as I am not sure whether this is ever used
  * It would be straigthforward to also include stderr and corr parameters of measurement errors (these is not possible right now). Should I do this?
  * Computations of d2A and d2Om need to be checked, as the differences between computing these with analytically (kronflag=0|1) or numerically kronflag=-1|-2 is really large for the example model of AnSchorfheide.
  * I am not sure how to best normalize Qu and Tkachenko's G matrix. It looks (and in the Gaussian case actually is) very similar to the Ahess matrix. So I used the same normalization rule as for the Ahess matrix. See comments in identification_checks.m. Anyone has a better idea? Please also check the models in test/identification/cgg for differences.
  * parts that are unclear to me are marked by a [@wmutschl] tag
  * the run time of tests/identification/as2007.mod increases from 0h01m27s to 0h03m46s (as Qu and Tkachenko's G matrix takes a little while to compute). One could decrease prior_mc=250 to prior_mc=150.

# New functions
  * commutation: Returns Magnus and Neudecker's commutation matrix that solves k*vec(X)=vec(X')
  * DerivABCD: Derivative of X(p)=A(p)*B(p)*C(p)*D(p) w.r.t to p as in Magnus and Neudecker (1999), p. 175
  * DeriveMinimalState: Derives minimal state space system by checking observability and controllability of all possible combinations of variables
  * duplication: Duplication Matrix (and its Moore Penrose Inverse) as defined by Magnus and Neudecker (2002), p.49, Dp*vec(X) = X
  * identification_checks_via_subsets: finds problematic parameters in a bruteforce fashion: It computes the rank of the Jacobians for all possible parameter combinations, if the rank condition is not fullfilled, these parameter sets are flagged as non-identifiable. For debugging purposes only, as the current identification_checks.m (based on nullspace and multicorrelation coefficients) is much faster

# Detailed changes in getH.m
  * functionality improvements

    - heavily commented (also auxiliary functions) and changed notation of several variables to make this function (hopefully) more readable and understandable, and hence, easier to debug
    - added functionality when Sigma_e is not diagonal and/or when one wants to consider corr parameters of exogenous shocks independent of the value of kronflag
    - fixed function for all values of kronflag, i.e. kronflag=-2|-1|0|1. Previosuly, only kronflag=-2|0 were working, all other kronflags ran into errors (-1 was actually never called , but was dealt with in getJJ.m). I assume kronflag=-1|1 was used only for debugging issues, but still was not working. I fixed this now, the function now works out-of-the-box for all kronflag values.
    - I also outlined and documented what each kronflag does and point to the corresponding equations in Ratto and Iskrev (2012) or Iskrev (2010,Appendix A)
    - the function additionally outputs the Jacobians of B and Sig, which are needed for Qu and Tkachenko (2012) and Komunjer and Ng (2011)'s criteria
    - Moved computation of Jacobian of tau=[ys;vec(A);vech(B * M_.Sigma_e * B')] into getJJ.m to have all Jacobians which are needed for identification in one place. That is, getH.m computes first and second parameter derivatives of (1) reduced-form solution, (2) steady state and (3) Jacobian of dynamic model, whereas getJJ computes and sets up all Jacobians which are used for identification purposes. Therefore, getH might be useful more generally for other purposes than identification. For instance, when doing a GMM estimation, we could use this function to compute analytically the gradient of the moments and provide this to the optimizer used in a GMM context.

  * output arguments

    - renamed `H` (Jacobian wrt parameters of tau=[ys;vec(A);vech(B * M_.Sigma_e * B')] into dTAU, (as H is very confusing, e.g. in other functions it is a Hessian, or Hss and H2ss is also just the steady state. Morevoer, tau is used in Iskrev(2010) for the steady state and reduced-form solution)
    - renamed `Hss` (Jacobian of steady state wrt model parameters only) into `dYss` (as H is very confusing here, see above)
    - renamed `H2ss` (Hessian wrt model parameters only of ys) into d2Yss (as H is very confusing, see above)
    - renamed `gp` into `dg1`, where g1 corresponds to the same variable as in dynamic model files. Note that in params_deriv files gp lacks the contribution of Jacobian wrt steady state and dg1 includes this using the implicit function theorem as outlined in Ratto and Iskrev (2012). Hence, dg1 denotes Jacobian wrt to parameters. It is useful and important to distinguish gp and dg1.
    - added `dB` (Jacobian wrt parameters of solution matrix B) needed for Qu and Tkachenko (2012) as well as Komunjer and Ng (2011)
    - added `dSig` (Jacobian wrt parameters of M_.Sigma_e) needed for Qu and Tkachenko (2012) as well as Komunjer and Ng (2011)

  * input arguments

    - renamed `indx` (index of model parameters to be checked) into `indpmodel`, the p makes it more clear that this is a parameter index
    - renamed `indexo` (index of stderr parameters) into `indpstderr`, the p makes it more clear that this is a parameter index
    - renamed `iv` (index of variables to consider) into `indvar`
    - Renamed `M_` to `M`, `estim_params_` to `estim_params`, `options_` to `options` , `oo_` to `oo` to visualize that these are local and not global variables
    - included `indpcorr` a matrix of indices for corr parameters to be checked

  * misc

    - distinguished clearly between variables in DR or in declaration order without overwriting this in between
    - added which functions call getH.m
    - updated copyright to 2010-2019

# Detailed changes in getJJ.m

  * functionality improvements

    - heavily commented and changed notation of several variables to make this function (hopefully) more readable and understandable, and hence, easier to debug
    - added functionality when Sigma_e is not diagonal and/or when one wants to consider corr parameters of exogenous shocks independent of the value of kronflag
    - tidied the function up, such that it sets up all Jacobians which are needed for identification, i.e. Iskrev's J matrix, Qu and Tkachenko (2012)'s G matrix, Komunjer and Ng (2011)'s D matrix, reduced-form solution (dTAU), linear rational expectation (i.e. Jacobian of steady state and dynamic model equations dLRE).
    - dTAU is now constructed in getJJ instead of in getH (see comment above in getH.m)
    - works for all kronflags, i.e. for numerical derivatives (-1 and -2) as well as for analytical derivatives based on kronecker products (1) or Sylvester Equations (0)
    - added functionality for stderr and corr parameters independent of the value of kronflag (previously this was only possible with numerical derivatives, now it works for all kronflags)
    - finds minimal state vector needed for Komunjer and Ng (2011)'s criteria (function `DeriveMinimalState.m`)
    - moved computations from kronflag=-1 (which were used in case of corr in shock block) into getH.m, so that getJJ now only sets up the Jacobians for LRE, Iskrev's J, Qu and Tkachenko's G and Komunjer and Ng's D, whereas getH computes the Jacobians (wrt parameters) of A, B, Sigma_e, Om, Yss and g1. This should simplify debugging as everything is now in one place and not in two

  * output arguments

    - renamed `JJ` into `J`
    - renamed `H` into `dTAU` (as H is very confusing, e.g. in other functions it is a Hessian, or Hss and H2ss is also just the steady state. Morevoer, tau is used in Iskrev(2010) for the steady state and reduced-form solution)
    - renamed `gp` into `dLRE`, as this corresponds to Jacobian of LRE=[Yss;vec(g1)] where g1 is the Jacobian of the dynamic model equations.
    - renamed `gam` into `MOMENTS`
    - added `G` for Qu and Tkachenko's Jacobian matrix G
    - added `D` for Komunjer and Ng's Jacobian matrix D
    - reordered output arguments

  * input arguments

    - added `options_ident` as input argument; hence, `kronflag`, `nlags` and `useautocorr` are removed from input arguments as these are available in options_ident
    - Renamed `M_` to `M`, `estim_params_` to `estim_params`, `options_` to `options` , `oo_` to `oo` to visualize that these are local and not global variables
    - renamed `indx` (index of model parameters to be checked) into `indpmodel`, the p makes it more clear that this is a parameter index
    - renamed `indexo` (index of stderr parameters) into `indpstderr`, the p makes it more clear that this is a parameter index
    - added `indpcorr` (index of corr parameters)
    - renamed `mf` (index of VAROBS variables) into `indvobs`

  * misc

    - updated copyright to 2010-2019
    - provided some comments on several ways to compute the spectral density matrix
    - added which functions call getJJ.m

# Detailed changes in thet2tau.m

  * functionality improvements

    - heavily commented and changed notation of several variables to make this function (hopefully) more readable and understandable, and hence, easier to debug
    - Added output option to compute spectral density matrix
    - Reorded and added some output option.
    - Instead of Om, `outputflag=0` computes B and Sigma_e, which are needed for Qu and Tkachenko as well as Komunjer and Ng. The Jacobian of Om is then computed in getJJ or getH from Jacobian of B and Sigma_e. Due to some testing with An and Schorfheide model this seems to be more accurate when I compare these with the analytical derivatives. The old behavior (computing Om directly) can be restored by setting `outputflag=-2`.
    - In total this function can now be used to compute numerically Jacobians of Yss, A, B, Sigma_e, Om, g1, autocovariogram and spectral density
    - Clearly distinguished (and commented) on the different outputs of this function.
    - Works for all types of parameters, ie. model, stderr and corr.
    - This function can now also be used when there is no estimated_params block. Previously, there was an error when there was no estimated_params block when calling `set_all_parameters` as this requires some information in `estim_params`. I fixed this by providing a temporary local estim_parms structure with the necessary information on model, stderr and corr parameters. In this way, this can be easily extended to also include stderr and corr parameters of measurement errors.

  * output arguments

    - renamed `tau` into `out`, as this function computes *very* different things (and not only tau) depending on an input flag

  * input arguments

    - renamed `flagmoments` into `outputflag` as this function does not only compute moments but many other things (see above)
    - renamed `indx` (index of model parameters to be checked) into `indpmodel`, the p makes it more clear that this is a parameter index
    - renamed `indexo` (index of stderr parameters) into `indpstderr`, the p makes it more clear that this is a parameter index
    - added `indpcorr` (index of corr parameters)
    - merged `mf` (index of observable variables) and `iv` (index of variables to consider) into a single index `indvar` as there is no need to distinguish between these two indices (they were never used in combination)
    - added `grid_nbr` (number of grid points to compute spectral density)
    - reordered input arguments

  * misc

    - added which functions call thet2tau
    - updated copyright to 2010-2019

# Detailed changes in identification_analysis.m

  * functionality improvements

    - heavily commented and changed notation of several variables to make this function (hopefully) more readable and understandable, and hence, easier to debug
    - renamed `dg1` to `dLRE`, renamed `vecg1` to `lre`, renamed `H` to `dTAU` (see comments above)
    - added option `numzerotolderiv` with default `1.e-8` used for non-zero derivatives
    - added option `numzerotolrank` with default `1.e-10` used for rank computations
    - added theoretical identification analysis based on Komunjer and Ng (2011)'s method, i.e. steady state and observational equivalent spectral densities within a minimal system
    - added theoretical identification analysis based on Qu and Tkachenko (2012)'s method, i.e. steady state and spectral density
    - restructured the code slightly to combined chunks of code that belong together on the one hand, and on the other hand to differentiate between the different criteria
    - added call to new function `identification_checks_via_subsets.m` (see above for the definition of the functionality) to perform identification checks differently as find it more intuitive and (most likely) more precise.

  * input arguments

    - removed `bounds` and `dataset_` as input argument, because these are not needed
    - moved `name_tex` and `tittxt` into `options_ident` as these two inputs are only used in `ident_bruteforce.m` and already set in `dynare_identification.m`

  * output arguments

    - added `ide_spectrum` structure for Qu and Tkachenko's criteria based on the spectral density
    - added `ide_minimal` structure for Komunjer and Ng's criteria based on the minimal state space system
    - reordered output arguments

  * misc

    - added which functions call identification_analysis
    - updated copyright to 2010-2019

# Detailed changes in dynare_identification.m

  * functionality improvements

    - heavily commented and changed notation of several variables to make this function (hopefully) more readable and understandable, and hence, easier to debug
    - included more options (and default values) which can be set by the user, i.e. nostrength, nomoments, nominimal, nospectrum, tex, tol_rank, tol_deriv, tol_sv, grid_nbr, ChecksViaSubsets, max_dim_subsets_group
    - instead of turning warnings globally off, I specified the relevant warnings for matlab and octave, respectively, off
    - improved the warning messages slightly
    - restructured chunks of code with respect to different criteria

  * output arguments

    - renamed arguments: TAU to STO_TAU, GAM to STO_MOMENTS, LRE to STO_LRE, gp to STO_si_dLRE, H to STO_si_dTAU, JJ to STO_si_J
    - added arguments: STO_G and STO_D for the two new criteria

  * misc

    - added which functions call dynare_identification
    - updated copyright to 2010-2019

# Detailed changes in identification_checks.m

  * functionality improvements

    - added checks for Komunjer and Ng's D matrix. Note that the Jacobian D=[D_par D_rest], where D_par depends on the parameters and D_rest does not. So this is taken into account.
    - added checks for Qu and Tkachenko's G matrix. Note that the Jacobian G is a Gram matrix with dimension nparam x nparam, similar to Ahess. So this is taken into account. I am, however, not sure whether this is correct regarding the multicorrelation and pairwise correlation coefficients. Please double check.
    - the rank is now actually computed at the prespecified tolerance level (and not Matlab's default level), so this is in accordance to the further analysis of problematic parameter sets

  * output arguments

    - added the rank to output arguments which is later also displayed
    - replaced the J or JJ part in the variable names with X as this function is used for all sorts of Jacobians, not only Iskrev's J

  * input arguments

    - renamed hess_flag to output_flag (and clearly outlined what each value does)
    - added tol_rank and tol_sv as input arguments, such that the tolerance levels can be changed by the user and not preimplemented in this function
    - added param_nbr which is needed for Komunjer and Ng's D matrix

  * misc

    - updated copyright to 2010-2019

# Detailed changes in ident_bruteforce.m

  * functionality improvements

    - the output directory was set with a capital I, i.e. Identification, whereas in all other functions we rely on lower case i, i.e. identification. I changed this to lower-cases, so everything is now saved in the same folder.
    - changed displayed strings to be more precise with the corresponding papers and notation

  * input arguments

    - renamed `n` to `max_dim_cova_group` to name options the same across functions
    - renamed `pnames_TeX` to `name_tex` to name options the same across functions
    - added `tol_deriv` as tolerance level which can be changed by the user

  * misc

    - Added some comments
    - updated copyright to 2010-2019

# Detailed changes in disp_identification.m

  * functionality improvements

    - this function displays the same output for different Jacobians, hence I put the common code into a for loop. This should simplify changing the output that is printed to the console. Previously the code was simply repeated for the different criteria and only the strings changed.
    - some settings relevant for the computation are now printed as a summary to the console
    - the tolerance level, rank and required rank are always displayed on the command line to see how many problematic sets there are and which tolerance level was used
    - the function is also able to display problematic parameters computed by the new function `identification_checks_via_subsets.m` which is only used for debugging.

  * input arguments

    - added `idespectrum` structure for analysis based on Qu and Tkachenko
    - added `ideminimal` structure for analysis based on Komunjer and Ng
    - added `options_ident` to have all necessary settings in a structure

  * misc

    - Added some comments
    - Removed uncommented code that was not used as this was redundant and probably an artifact of the original programming?!
    - updated copyright to 2010-2019

# Detailed changes in dsge_likelihood.m

  * misc

    - adjusted call of getH due to changes of input and output arguments
    - updated copyright to 2010-2019

# Detailed changes in cosn.m

  * misc

    - commented functionality, input and output arguments of this function
    - updated copyright to 2010-2019
2019-03-20 15:44:54 +00:00
Sébastien Villemot e5f938a8e5
Integrate new reference manual
- integrate with autoconf/automake, so that "make html pdf" now build the
  manual
- remove the old texinfo manual
- the PDF manual is now called dynare-manual.pdf (Closes #1543)
- add a Gitlab CI job that updates the online unstable manual under
  www.dynare.org/manual-unstable/
2019-02-21 16:58:18 +01:00