Johannes Pfeifer
dd6f8c182c
Move call to optimizers in mode-computing to separate file to allow other function to access all integrated optimizers
...
- also moves several options to subfields of options structure
- allows setting options of newrat
- requires newrat to have compatible kalman_algo specified in order for it to not change options_
- explicitly disallows using analytical derivation with numerical gradient (before the numerical gradient request was overwritten)
- always outputs hessian returned by optimizer (empty matrix if not computed) and deletes subsequent overwriting if cova_compute=0
2014-12-04 19:36:12 +01:00
MichelJuillard
8e9cd95a89
Merge pull request #760 from JohannesPfeifer/fix_smoother
...
Fix bug when calling non-Bayesian smoother after Bayesian estimation
2014-11-20 10:27:15 +01:00
Johannes Pfeifer
86cac40362
Harmonize field length for FilteredVariables for calibrated smoother
...
Analogous to 4f5e0321228c0e4aca19fcd114f26dbaa1bbbfaf
2014-11-16 21:11:06 +01:00
Johannes Pfeifer
4b1e815728
Always display value of posterior/likelihood at the mode
...
Also clarifies that minus the posterior/likelihood is displayed
2014-11-16 21:11:06 +01:00
Johannes Pfeifer
1cbb17f929
Make sure classical filtered variables have the same length as the Bayesian ones, i.e. nobs.
2014-11-16 21:08:18 +01:00
Johannes Pfeifer
7c59edead2
Make simplex_optimization_routine.m usable outside of estimation
...
Removes hard-coded parameter names extracted from bayestopt_ by handing them over explicitly
2014-11-10 19:53:55 +01:00
Johannes Pfeifer
8443eb58cd
Do not create classical filtered variables at posterior mean if Bayesian filtered variables were requested
...
The check for running the smoother on the model at the posterior mean is only based on whether the smoother option was set. But filtered_vars is a separate option. If not also checking whether Bayesian filtered variables have already been requested, oo_.FilteredVariables will contain both "ML" and Bayesian fields, which is confusing. The change only saves the filtered variables from the classical smoother if the user did not use Bayesian estimation.
2014-10-29 19:07:49 +01:00
Stéphane Adjemian (Karaba)
f48566aeae
Fixed prior bounds (according to the doc in master branch).
...
* Second and third positional arguments after the name of the
estimated parameter in the estimated_params block are only
considered in the optimization stage (not in the MCMC)
* Do not store bounds in bayestopt_, because bounds do not always
reflect restrictions implied by prior shapes.
* prior_bounds routine returns a structure (with fields lb and ub)
instead of a matrix.
2014-10-20 16:18:54 +02:00
Johannes Pfeifer
2c01113e8c
Fix bug when calling non-Bayesian smoother after Bayesian estimation
...
Because xparam1 is used by the smoother, but xparam was set to the posterior mean, the non-Bayesian smoother results were based on the parameters at the mode, which are stored in xparam1.
2014-10-15 09:49:07 +02:00
Johannes Pfeifer
79c5e18bfe
Cosmetic changes
...
- Suppresses spurious output from dynare_estimation_1.m
- Removes unset output argument from dynare_estimation_init.m (which seems to be totally unused as it was not set at all and nobody reported any crashes)
- Corrects header of dynare_estimation_init.m
2014-09-19 16:20:43 +02:00
Johannes Pfeifer
8655df67a9
Clean up use of verbosity option
...
- in dr_block.m and ep_residuals.m the option was hardcoded and disabled
- for csminwel1.m, no verbosity option exists anymore, thus definitions preceeding calls to it were redundant as was the options_.osr.verbose
2014-09-12 10:33:37 +02:00
Stéphane Adjemian (Scylla)
576ed55dda
Merge branch optimizer_number_5.
2014-09-11 17:38:03 +02:00
Stéphane Adjemian (Scylla)
5e4b7d8d42
Added filter_algorithm (estimation command, sets the particle filter algorithm).
2014-09-08 22:36:41 +02:00
Marco Ratto
f346b734d9
when flag==0 (or options_.hess==0), we force to use the hessian from outer product gradient computed in optimizer == 5.
2014-08-07 17:49:04 +02:00
Stéphane Adjemian (Scylla)
afbd0bd47a
Cosmetic change (added white space).
2014-07-17 22:05:08 +02:00
Stéphane Adjemian (Charybdis)
03975f7d01
Fixed bug (wrong definition of rawdata).
2014-07-09 15:34:53 +02:00
Stéphane Adjemian (Scylla)
d727ba7246
Fixed bug (missing input).
2014-06-23 12:24:36 +02:00
Stéphane Adjemian (Scylla)
b11f6e2505
Adapted code for dsge-var models.
2014-06-23 10:55:08 +02:00
Stéphane Adjemian (Charybdis)
efcf6bd9c0
Use dseries object in the estimation routines.
2014-06-16 17:41:59 +02:00
Stéphane Adjemian (Scylla)
66d08ac3bf
Merge branch 'master' into use-dynSeries
...
Conflicts:
matlab/dynare_estimation_init.m
matlab/global_initialization.m
matlab/prior_posterior_statistics.m
matlab/read_variables.m
matlab/set_prior.m
matlab/utilities/dataset/initialize_dataset.m
preprocessor/ComputingTasks.cc
2014-04-30 10:10:30 +02:00
Stéphane Adjemian (Scylla)
bb18c9386d
Fixed bug.
...
MCMC convergence diagnostics should be computed even if mh_replic is less than 2000, provided that the total number of iterations is greater than 2000 (if option load_mh_file is used).
2014-02-25 17:26:08 +01:00
Stéphane Adjemian (Scylla)
c57aa43ca8
Bug fix.
...
<M_.fname>_optimal_mh_scale_parameter.mat was not deleted if mode_compute>0.
2014-02-25 15:44:34 +01:00
Johannes Pfeifer
221660dfea
Fix capitalization error in dynare_estimation_1.m that leads to crashes if reached
2014-02-21 19:19:36 +01:00
Stéphane Adjemian (Scylla)
f8543c0a97
Fixed typo.
2014-02-21 12:23:36 +01:00
Stéphane Adjemian (Scylla)
2ee11fa860
Changed the handling of optimization options in dynare_estimation_1.m. Removed calls to strsplit. Closes #605 .
2014-02-03 12:25:29 +01:00
Stéphane Adjemian (Scylla)
63986a0ebf
Closes #567 .
2013-12-18 16:44:31 +01:00
Stéphane Adjemian (Scylla)
130125c5da
Changed the error message issued when the initial conditions for the estimated parameters are outside the bounds (the error message depends on the value of options_.prior_trunc).
2013-11-27 12:27:51 +01:00
Stéphane Adjemian (Scylla)
bd630d7210
Removed MC_record field from oo_ structure and the output argument from MCMC routines.
...
Details about the MCMC can be loaded in the workspace with the following command:
>> internals --load-mh-history <NAME_OF_THE_MOD_FILE>
under the name mcmc_informations, or printed in the command window, using the following
command:
>> internals --display-mh-history <NAME_OF_THE_MOD_FILE>
2013-11-26 12:56:41 +01:00
Stéphane Adjemian (Charybdis)
ad0c29262b
Cosmetic. Renamed DsgeVarLikelihood as dsge_var_likelihood.
2013-11-16 23:33:37 +01:00
Stéphane Adjemian (Charybdis)
9238523c26
If a DSGE-VAR is estimated, check that the user do not try to estimate/calibrate correlations between structural innovations and that there is no measurement errors. Closes #521 .
2013-11-16 23:26:19 +01:00
Stéphane Adjemian (Penelope)
0c00151092
Merge branch 'master' into remove-dynDate-class
...
Conflicts:
preprocessor/DynareBison.yy
2013-11-14 16:41:08 +01:00
Sébastien Villemot
ea6ee19402
More Octave compatibility fixes wrt catch
2013-11-08 16:35:52 +01:00
Sébastien Villemot
ecdbc42319
Fix error message when initial values of estimation are not suitable.
...
Ref #512
2013-11-08 16:09:16 +01:00
Sébastien Villemot
179af0e4ab
Octave compatibility fix: catch does not accept an argument
2013-11-08 15:02:30 +01:00
Houtan Bastani
0fdc18e7fb
Merge branch 'ifc'
...
Conflicts:
matlab/dynare_estimation_1.m
matlab/global_initialization.m
2013-11-06 13:58:57 +01:00
Johannes Pfeifer
b03697b342
Add possibility to initialize parameters from calibrated model
2013-11-06 13:50:46 +01:00
Stéphane Adjemian (Scylla)
8429321547
Merge branch 'master' into remove-dynDate-class
2013-11-06 12:43:06 +01:00
Sébastien Villemot
a72cc3ff48
Merge remote-tracking branch 'github/master'
2013-11-05 17:17:53 +01:00
Stéphane Adjemian
ead332ed97
Merge pull request #511 from JohannesPfeifer/Correlated_errors_preprocessor
...
Bugfixes for correlated shocks
2013-11-05 07:49:37 -08:00
Sébastien Villemot
8a6e23845b
Merge remote-tracking branch 'jpfeifer/mode_compute'
2013-11-05 16:20:04 +01:00
Johannes Pfeifer
fddee8e1db
Bugfixes for correlated shocks
...
Uses preprocessing capabilities introduced in 07137e804b
Fixes #392 and #494 . Also fixes a bug in the checking for positive definiteness of covariance matrices in likelihood functions
Allows for calibrated covariances by reading them out and setting them after covariance matrix has been reconstructed from correlation and variances.
Adds unit test
2013-11-05 15:55:29 +01:00
Johannes Pfeifer
0d669a73cb
Add options for providing the variances, an identity matrix , and user specified matrices as proposal densities
...
Deals with #507 and #112
Includes a unit test
2013-11-04 19:09:24 +01:00
Sébastien Villemot
1a8bba6393
Allow a custom function named 'prior' as a value for 'mode_compute' option
...
Closes #507
2013-11-04 15:42:59 +01:00
Stéphane Adjemian (Charybdis)
ddd95361ba
Cosmetic changes. Added isoctave function to replace exist('OCTAVE_VERSION').
2013-11-04 10:54:45 +01:00
Michel Juillard
b81159f12c
adding comments
2013-11-03 11:40:36 +01:00
Johannes Pfeifer
8282e76d61
Add more explicit information in case of singularity problem
2013-10-31 08:14:35 +01:00
Stéphane Adjemian (Charybdis)
1f884db8ea
If TolX is set to any negative number, let cmaes choose the value of TolX.
2013-10-08 16:18:54 +02:00
Stéphane Adjemian (Charybdis)
6a250f894d
Removed interface for H0 (cmaes).
2013-10-08 16:18:00 +02:00
Stéphane Adjemian (Charybdis)
0f12404246
Added interface for some options of cmaes.
2013-10-08 15:53:55 +02:00
Stéphane Adjemian (Charybdis)
334d9976d6
Add interface to the main options of the simpsa optimization algorithm.
2013-10-08 15:18:14 +02:00
Stéphane Adjemian (Charybdis)
60e1d1b75e
Changed the organization of the options for the dynare's implementation of the simplex optimization algorithm.
2013-10-08 12:55:11 +02:00
Stéphane Adjemian (Charybdis)
c7d82e0bf0
Do not print H0.
2013-10-08 11:02:46 +02:00
Stéphane Adjemian (Charybdis)
51be957fb6
Changed the organization of the options for gmhmaxlik (mode_compute=6) so that options can be set using the optim option of the estimation command. Added an option (targeted acceptance rate).
2013-10-04 16:12:14 +02:00
Stéphane Adjemian (Charybdis)
36e3fb496c
Do not crash if an unknown optimization option is declared (replaced an error by a warning).
2013-10-04 12:17:30 +02:00
Stéphane Adjemian (Charybdis)
05946cd684
Changed names of some options for csminwel (mode_compute=4).
2013-10-04 11:59:35 +02:00
Stéphane Adjemian (Charybdis)
b2db159cdd
Added the possibility to pass options for csminwell (mode_compute=4) through the optim option (in the estimation command).
2013-10-03 12:35:06 +02:00
Stéphane Adjemian (Charybdis)
49989504ea
Cosmetic changes.
2013-10-03 11:06:07 +02:00
Stéphane Adjemian (Charybdis)
62cad6ff44
Cosmetic changes.
2013-10-03 11:01:11 +02:00
Stéphane Adjemian (Charybdis)
979a55a334
Added missing semicolon.
2013-10-02 18:26:57 +02:00
Stéphane Adjemian (Charybdis)
581f97bada
Linked simpsa's tolerance options to dynare's defaults.
2013-10-02 17:09:05 +02:00
Stéphane Adjemian (Charybdis)
fb0ccdd5d2
Provide more sensible lower and upper bounds for simpsa algorithm.
2013-10-02 16:45:16 +02:00
Stéphane Adjemian (Charybdis)
3f16129e49
mode_compute = 10 calls simpsa algorithm.
2013-10-02 15:30:55 +02:00
Johannes Pfeifer
ad73d1fd93
Fixes bug in display of parameters at prior bound
2013-09-30 17:10:39 +02:00
Stéphane Adjemian (Charybdis)
c5c3b45f3c
Merge branch 'master' into use-dynSeries
2013-09-23 08:14:46 +02:00
Johannes Pfeifer
241fd07424
Add Geweke 1992 convergence diagnostics
2013-09-16 18:47:15 +02:00
Sébastien Villemot
e123670675
Fix bug introduced in 952139b
...
The 'hh' variable is now always defined, so we now test if it is empty.
2013-09-13 18:23:24 +02:00
Stéphane Adjemian (Charybdis)
ddce110bf2
Merge branch 'master' into use-dynSeries
2013-09-10 22:26:12 +02:00
Stéphane Adjemian (Charybdis)
952139bbc9
Changes related to the treatment of the (optionally) provided mode file.
...
(1) Added more checks on the content of the provided mode file compared the the list of declared parameters (the condition on the number of parameters is not strong enough).
(2) Added a mechanism to adapt the content of the mode file if possible. For instance, if the estimated parameters are a subset of the parameters in the mode file, we only need to discard some of the parameters in the mode file.
(3) Added output argument in dynare_estimation_init, which returns the hessian matrix (hh) with the estimated mode.
2013-09-10 22:25:16 +02:00
Stéphane Adjemian (Charybdis)
afed204526
Cosmetic. Renamed hh (figure handle not to be confused hessian matrix) as fh.
2013-09-10 22:25:16 +02:00
Stéphane Adjemian (Charybdis)
b485a13580
Merge branch 'use-dynSeries' of ithaca.fr:dynare into use-dynSeries
...
Conflicts:
matlab/check_list_of_variables.m
matlab/dynare_estimation_1.m
2013-09-09 11:40:01 +02:00
Stéphane Adjemian (Charybdis)
907e087ea9
Consider options_.varobs as a cell of strings.
2013-09-07 16:39:04 +02:00
Johannes Pfeifer
c2e6feeb75
Deletion of unused definition of H_is_diagonal
...
Cosmetic fix
2013-09-04 11:11:29 +02:00
Johannes Pfeifer
e1a0fd0524
Bugfix for conditional variance decomposition
...
sigma_e_is_diagonal was erroneously set to 0 if the covariance matrix was diagonal, but contained a 0 on the main diagonal.
2013-09-04 11:11:14 +02:00
Johannes Pfeifer
01c3724371
Deal with pathological case where nobs=1
...
In this case the plots crash due to an invalid xlim. Also adds markers if only one point is plotted
2013-08-15 16:35:01 +02:00
Sébastien Villemot
b4f8532bea
Merge pull request #441 from JohannesPfeifer/mode_check
...
Bugfix for mode_check and display of parameters out of bounds
2013-08-12 03:31:50 -07:00
Stéphane Adjemian (Charybdis)
184c403375
Replaced disp(' ') by skipline().
2013-07-10 16:16:32 +02:00
Stéphane Adjemian (Charybdis)
964b7580d8
Cosmetic change.
2013-07-10 16:15:28 +02:00
Stéphane Adjemian (Charybdis)
dfc51d097a
Cosmetic change. Replaced warning(...) by disp(...).
2013-07-10 16:09:31 +02:00
Stéphane Adjemian (Charybdis)
2fae989131
Rewrote the portion of code requesting a user input when non linear filters are used with a gradient based optimization routine.
...
Closes issues #442 and #443 .
2013-07-10 16:03:49 +02:00
Johannes Pfeifer
aeda8d17ff
Add warning if gradient-based optimizer is used with particle-filtering and offer user choice to change mode-finder
2013-07-10 12:08:59 +02:00
Johannes Pfeifer
41f6c2ff66
Display source of non-positive definite Hessian if parameters at prior bound
2013-07-06 00:26:23 +02:00
Johannes Pfeifer
d9579418fd
Bugfix for correct display of names of parameters outside of bounds
2013-07-06 00:20:07 +02:00
Stéphane Adjemian (Charybdis)
08feada8b0
Fixed bug.
2013-06-24 10:24:55 +02:00
Stéphane Adjemian (Charybdis)
340bcc2739
Added an option for setting the number of points where the posterior kernel is evaluated when using mode_check. Reorganized the options_ global structure wrt mode_check.
2013-06-20 17:19:44 +02:00
Frédéric Karamé
1bbfd90498
Added online auxiliary filter as options_.mode_compute=10.
2013-06-18 16:18:55 +02:00
Stéphane Adjemian (Charybdis)
c08c34223d
Fixed typo and bug in MCMC diagnostics.
2013-06-13 17:14:04 +02:00
Johannes Pfeifer
e8ed4c1f67
Bunch of cosmetic changes
2013-06-13 14:24:17 +02:00
Stéphane Adjemian (Charybdis)
49277db6ab
Merge branch 'master' into use-dynSeries
...
Conflicts:
matlab/dynare_estimation_1.m
2013-06-01 19:56:44 +02:00
Stéphane Adjemian (Charybdis)
985e00b739
Consider options_.varobs as a cell of strings.
2013-05-21 16:38:17 +02:00
Stéphane Adjemian
fc83427185
Merge pull request #393 from JohannesPfeifer/display_tables
...
Add function for displaying estimation results
2013-05-14 03:18:19 -07:00
Johannes Pfeifer
d9fb19e479
Make error message if mode violated prior more explicit
2013-05-12 13:27:55 +02:00
Johannes Pfeifer
7aea75f348
Add function for displaying estimation results
...
The commit moves the creation of results tables, both the ones displayed
and printed to LaTeX, from dynare_estimation_1.m to a separate function.
This factorization later allows to use this function to display results
from other estimation routines. At the same time, it removes the display
of t-statistics for posterior estimates ( #339 )
2013-05-10 18:58:08 +02:00
Johannes Pfeifer
58b6c3122f
Cosmetic Changes to Graphs
2013-04-26 19:57:36 +02:00
Johannes Pfeifer
7518072e77
Fix several bugs related to estimated measurement errors
...
1. The first call to set_prior overwrote the first column of
estim_params_.var_endo storing the position of the variable with
measurement error in M_.endo_names with the position in
options_.var_obs. All subsequent calls to set_prior then lead to
crashes.
2. At the same time, for correlations of ME, the first column of
estim_params_.corrn still stored the position of the variable with
measurement error in M_.endo_names. But subsequent calls to it were done
as if it stored the position in options_.var_obs
I introduced two new variables in estim_params_ storing the respective
positions in var_obs so as to not necessitate changes in the
preprocessors.
3. For cases of calibrated measurement error correlations, the
covariance matrix was not updated.
4. Fixing a lot of smaller bugs related to measurement errors, including
some copy and paste errors
-
2013-03-21 20:51:12 +01:00
Johannes Pfeifer
6390830b4d
Store MCMC information recorded in record in oo_
...
Closes issue #315 (https://github.com/DynareTeam/dynare/issues/315 )
2013-03-17 22:49:28 +01:00
Sébastien Villemot
5c8efaae6c
More explicit error message when posterior mode file is outdated
2013-03-08 14:31:15 +01:00
Sébastien Villemot
5c88338965
Fix mode_compute=3 under Octave
2013-01-07 15:40:48 +01:00
Sébastien Villemot
8c7e3d46ed
Document when mode_compute={1,3,7} are available, and error with an informative message if not
2013-01-07 15:40:45 +01:00
Sébastien Villemot
c06bd0ae75
Support nograph option for posterior distribution plots
2012-11-29 14:52:33 +01:00
Michel Juillard
c722f53955
fixed bug with options mode_compute=0,mode_file=....
...
added tests for mode_compute=4 and mode_compute=6. They increase computing time of the
test suite by about 30 minutes.
2012-10-06 16:51:42 +02:00