Commit Graph

203 Commits (7dd2dd5e24a343fbeaf3522ea5e535c27d8b9f95)

Author SHA1 Message Date
Johannes Pfeifer a78ebbce72 Document setting of element of restricted state space 2016-04-12 10:51:33 +02:00
Johannes Pfeifer 6d35dad894 Remove duplicate setting of bayestopt_.mf* in dynare_estimation_init Closes #820 2016-04-12 10:46:44 +02:00
Johannes Pfeifer efee7b1a47 Remove duplication of restrict_var_list in bayestopt_ 2016-04-12 10:43:28 +02:00
Johannes Pfeifer 80086ff4ab Clarify naming of var_obs_index to indicate it refers to decision rule order 2016-04-12 10:42:44 +02:00
Johannes Pfeifer 16d8ee0c7b Cosmetic changes to various function headers 2016-03-25 22:05:36 +01:00
Johannes Pfeifer f597709228 Condition setting of nobs and first_obs on existence of dataset
Required in identification.
2016-03-23 10:48:26 +01:00
Johannes Pfeifer fb20b464d4 Remove bayestopt_.mean_varobs and use dataset_info instead
Closes #255
2016-03-23 10:31:09 +01:00
Johannes Pfeifer 1c816aef24 Various interrelated bugfixes dealing with detrending 2016-03-23 10:19:40 +01:00
Johannes Pfeifer d1bbe8f852 Restore backward compatibility with old data interface 2016-03-23 10:10:42 +01:00
Johannes Pfeifer f64b76f0d3 Move saving of data mean to data initialization instead of posterior computations
Makes it accessible for other functions that also need it
2016-03-23 10:10:41 +01:00
Johannes Pfeifer b235040ae1 Fix setting of no-constant option in dynare_estimation_init.m when loglinear option is used
Setting was based on unlogged steady states
2016-03-23 10:09:17 +01:00
Stéphane Adjemian (Charybdis) 846a391eb1 Fixed bug.
Test the existence of field var_exo in estim_params_. This field does
not exist if one runs a smoother on a calibrated model.
2015-12-15 22:37:08 +01:00
Johannes Pfeifer f28a7a62bb Only test non-zero measurement error covariance entries for positive definiteness
Otherwise, not having measurement error on one variable is not allowed during estimation
2015-12-15 22:37:08 +01:00
Stéphane Adjemian (Charybdis) a1aa2bcd6e Changed second input of prior_bounds routine.
Do not pass options_ structure but only the required field (prior_trunc).
2015-12-11 18:50:54 +01:00
Michel Juillard eb3d0cd20e fix problem with nobs 2015-11-28 17:38:00 +01:00
Michel Juillard f464760c45 Revert "remove global objective_function_penalty_base"
This reverts commit cf858c7fcb.
2015-10-09 14:23:31 +02:00
Michel Juillard cf858c7fcb remove global objective_function_penalty_base 2015-10-08 20:57:00 +02:00
Johannes Pfeifer 6f8000f0f3 Condition test whether varobs was defined on existence of field 2015-08-17 10:48:41 +02:00
Johannes Pfeifer 64889b7335 Filter out non-fully calibrated model when use_calibration is used with ML
Required after 9557142cc4.
Closes #849
2015-07-31 11:23:58 +02:00
Johannes Pfeifer f679594908 Add check whether bayestopt_ is empty
Otherwise crashes for calibrated smoother occur
2015-07-25 07:32:48 +02:00
Johannes Pfeifer d67e003e03 Correct check condition in dynare_estimation_init.m introduced in b2017ffece 2015-07-23 16:45:40 +02:00
Johannes Pfeifer b2017ffece Check whether estimation is fully ML or fully Bayesian
Closes #754
2015-07-23 14:44:25 +02:00
Johannes Pfeifer 06bd20214e Replace strmatch by strcmp 2015-07-21 16:40:40 +02:00
Johannes Pfeifer 319f73434c Fix copy and paste error introduced in 3c9b031bd1 2015-07-21 16:18:15 +02:00
Johannes Pfeifer 2d8e6e2c83 Account for strmatch returning empty array instead of 0 if nothing is found 2015-07-21 16:00:00 +02:00
Johannes Pfeifer 15b47ef50b Account for cases where estim_params_ is empty or has only been filled with field full_calibration_detected 2015-07-21 11:41:39 +02:00
MichelJuillard 2cb58be875 Merge pull request #969 from JohannesPfeifer/documentation
Improve documentation of nobs, first_obs, presample, and mode_check
2015-07-20 14:27:40 +02:00
Johannes Pfeifer 84f2b50043 Block using presample option with DSGE-VAR 2015-07-08 09:21:50 +02:00
Johannes Pfeifer 3c9b031bd1 Fix bug in dynare_estimation_init.m if steady state does not solve
There was no check in dynare_estimation_init.m whether the steady state solved, but the noconstant option was set nevertheless. This gave rise to cases where a steady state file returned 0 for the observables, but the steady state did not exits. Due to later using use_calibration, this problem with the initial values was not detected, but the observation equation featured no constant although it should. The solution is to move the use_calibration option before the first steady state computation and then issue an error if the parameterization does not work
2015-06-08 16:35:50 +02:00
Stéphane Adjemian e07607011c Merge pull request #710 from JohannesPfeifer/estimation_init_analytic_derivation
Fix bug in dynare_estimation_init.m with analytic_derivation where param...
2015-06-06 23:17:10 +02:00
Marco Ratto 214dc74723 - Fixed bugs around analytic derivation.
- Fixed test routine, eliminating diffuse filter.
- Trapped incompatibility of diffuse filter with analytic derivation.
2015-04-01 09:00:51 +02:00
Johannes Pfeifer c7153ba2ea Add initialization of bounds if estim_params is empty 2014-12-08 11:29:15 +01:00
MichelJuillard 6d12f2141f Merge pull request #765 from JohannesPfeifer/analytic_derivation_message
Fix message in dynare_estimation_init.m
2014-11-21 22:10:30 +01:00
Johannes Pfeifer 68b27252d7 Fix selected_variables_only option with classical forecasts
dyn_forecast requires that the smoother has been run on all endogenous variables, leading to crashes. Now, if this option is encountered with classical forecasts, it is overridden. Also documents this in the manual.
2014-11-16 21:08:18 +01:00
Johannes Pfeifer a159442935 Fix message in dynare_estimation_init.m
If some parameters are NaN after computing the steady state, the message erroneously said that parameters had been changed. In a check for equality, NaN is not equal to NaN. Thus, NaNs are now taken care of separately.
2014-10-29 09:02:29 +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 3e427020d6 Cosmetic changes in headers 2014-09-21 11:51:46 +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 41d1533086 Add check that prevents datafile from having same name as mod-file
Otherwise, the generated m-file might be called as the datafile, leading to infinite loops. The check cannot be moved to makedataset because M_.fname is not available there.
2014-09-10 17:49:33 +02:00
Johannes Pfeifer 6030fed4ec Fix bug in dynare_estimation_init.m with analytic_derivation where parameter vector was not set
Before testing whether the steady state file changes parameter values, the parameter values were not set, leading to subsequent crashes
2014-08-14 10:47:29 +02:00
Stéphane Adjemian (Scylla) 1e4c2e0881 Fixed bug affecting prior restictions (removed the extension in the argument of str2func). 2014-07-28 13:02:10 +02:00
Stéphane Adjemian (Scylla) 916fe62218 Fixed bug. Test on multiple declaration of observed variables was wrong. 2014-07-24 17:53:20 +02:00
Stéphane Adjemian (Scylla) 0efcef8f20 Added the possibility to declare non linear prior restrictions over estimated parameters.
If a file <MOD_FILE_NAME>_prior_restrictions.m exists in current folder, the value returned by this routine is
substracted to fval (likelihood-lnprior) at the end of dsge_likelihood. The arguments of this routine are: M_,
oo_, options_, dataset_ and dataset_info. Routines for writing <MOD_FILE_NAME>_prior_restrictions.m will be
provided later.
2014-07-21 12:45:49 +02:00
Stéphane Adjemian (Scylla) afb5be2067 Set options_.nobs if the new data interface is used. 2014-07-17 22:05:08 +02:00
Sébastien Villemot f4f7b8d0a1 Merge pull request #660 from JohannesPfeifer/mode_file
Restore backward compatibility of mode_file option
2014-07-01 18:00:48 +02:00
Stéphane Adjemian (Scylla) 0b82874268 Adapted madataset routine for Gsa. 2014-06-25 11:34:39 +02:00
Stéphane Adjemian (Scylla) 06f74c4603 Cosmetic change. 2014-06-23 16:06:58 +02:00
Stéphane Adjemian (Scylla) 800de3fcc9 Fixed bug (varobs is a field of options_). 2014-06-23 16:06:29 +02:00
Stéphane Adjemian (Charybdis) efcf6bd9c0 Use dseries object in the estimation routines. 2014-06-16 17:41:59 +02:00
Johannes Pfeifer 2caa9eb9d4 Restore backward compatibility of mode_file option
Displays warning and then assumes the user provided a correct mode-file. Closes #658
2014-06-01 15:08:09 +02:00
Stéphane Adjemian (Charybdis) 9586f1e516 Fixed bug.Variable available_extensions is a cell array. 2014-05-19 16:42:50 +02:00
Stéphane Adjemian (Scylla) 211f05ac31 Added checks for the extension of the declared datafile. 2014-05-02 12:09:00 +02:00
Stéphane Adjemian (Scylla) 16194cedd9 Removed calls/references to @dynDate (replaces by @dates). 2014-04-30 15:44:30 +02:00
Stéphane Adjemian (Scylla) ad0802005b Replaced dynSeries by dseries. 2014-04-30 15:38:18 +02:00
Stéphane Adjemian (Scylla) 0f62d74ee4 Fixed bug. Global options_.dataset.file must be initialized as an empty array. 2014-04-30 15:35:43 +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) 7864e0ec82 Rewrote the error message issued when the prefilter option in used while the steady state of the observed variables is non zero (introduced in commit d82252e805). 2014-01-30 17:57:36 +01:00
Johannes Pfeifer d82252e805 Filter out inconsistent specification of prefiltering when observation equation is not mean zero 2014-01-30 10:07:41 +01:00
Stéphane Adjemian (Scylla) f16689e76f Do not systematically throw an errror message if the parameters in the provided mode_file does not exactly match the set of estimated parameters.
If some parameters are missing in the provided mode_file and if mode_compute>0, use the prior mean as an initial condition.
2013-12-11 10:01:22 +01:00
Stéphane Adjemian (Scylla) 4afcf8fdaf Fixed typo. 2013-12-11 10:01:22 +01:00
Johannes Pfeifer b03697b342 Add possibility to initialize parameters from calibrated model 2013-11-06 13:50:46 +01:00
Sébastien Villemot e043966906 Merge pull request #486 from JohannesPfeifer/prior_check
Check initial values for violation of inverse gamma prior
2013-09-30 08:23:08 -07:00
Johannes Pfeifer 7e7cadb878 Check initial values for violation of inverse gamma prior
The inverse gamma distribution does not allow for the value 0, but the current check at the lower bound set LB=0 and tested for <LB instead of <=0.

Also fixes
2013-09-30 17:10:16 +02:00
Sébastien Villemot 1f8b4d9a86 Fix bug in display of parameter names violating the bounds condition 2013-09-30 17:02:25 +02:00
Stéphane Adjemian (Charybdis) 303e3845bb Added checks about the first period (defined by the set_time command or in the datafile). 2013-09-24 16:35:49 +02:00
Stéphane Adjemian (Charybdis) 39408b3b05 Removed logged_data_flag and variables related to xls files. 2013-09-23 08:42:25 +02:00
Stéphane Adjemian (Charybdis) c5c3b45f3c Merge branch 'master' into use-dynSeries 2013-09-23 08:14:46 +02:00
Stéphane Adjemian (Charybdis) 22968497ad Fixed bug manifesting if a model is first estimated with cova_compute=0 and if the resulting mode file is loaded after.
Added condition on the existence of hh in the mode_file.
2013-09-19 15:25:23 +02:00
Stéphane Adjemian (Charybdis) 9f63c4081f Fixed bug affecting fs2000/fs2000_calib.mod and shock_decomp_calibrated_model/example1_calib_shock_decomp.mod. 2013-09-18 11:38:58 +02:00
Michel Juillard a29db4175d fixed bug with calibrated models in dyn_estimation_init.m introduced
in commit 952139b
2013-09-18 11:23:47 +02:00
Stéphane Adjemian (Charybdis) 93357d0026 Added instatiation of a dynSeries object for the dataset. 2013-09-12 17:29:40 +02:00
Stéphane Adjemian (Charybdis) b680b214cc Cosmetic changes. 2013-09-12 12:00:04 +02:00
Stéphane Adjemian (Charybdis) 96a46622af Added prior mode and hyperparameters in oo_.prior structure.. 2013-09-12 11:58:25 +02:00
Stéphane Adjemian (Charybdis) 55e3bcc5f8 Removed general transformation of the raw data, only consider the log function. 2013-09-11 11:26:35 +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) bdde385ec6 Moved the test on the declaration of the observed variables. 2013-09-09 14:54:28 +02:00
Stéphane Adjemian (Charybdis) 421e7a83d5 Fixed bug. 2013-09-09 14:21:11 +02:00
Stéphane Adjemian (Charybdis) 1339987af5 Removed n_varobs. 2013-09-09 14:07:08 +02:00
Stéphane Adjemian (Charybdis) f465949cf5 Cosmetic changes. 2013-09-09 14:05:56 +02:00
Stéphane Adjemian (Charybdis) 806b5a799f Added comment. 2013-09-09 14:01:17 +02:00
Stéphane Adjemian (Charybdis) e466206f6c Removed useless block of code. 2013-09-09 13:59:06 +02:00
Stéphane Adjemian (Charybdis) 7756bc3af2 Removed lgyidx2varobs field (vector of integers) in options_. Added checks about the declared observed variables. 2013-09-09 13:57:34 +02:00
Stéphane Adjemian (Charybdis) c824217163 Added comments. 2013-09-09 12:36:43 +02:00
Stéphane Adjemian (Charybdis) 907e087ea9 Consider options_.varobs as a cell of strings. 2013-09-07 16:39:04 +02:00
Stéphane Adjemian (Charybdis) 5abbabbd8e Added comment. 2013-09-07 16:05:01 +02:00
Stéphane Adjemian (Charybdis) 46d451b34e Moved up the section where bayestopt_.jscale is updated 2013-09-07 16:05:01 +02:00
Stéphane Adjemian (Charybdis) ecd429d268 Changed the logged data section. 2013-09-07 16:05:01 +02:00
Stéphane Adjemian (Charybdis) 8be8bf1b1b Recycle options_.dataset. If not empty (default) dataset field has to be a dynSeries object. 2013-09-07 16:05: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) 4052d4ccaf Cosmetic changes. Use skipline() instead of disp(' '). 2013-07-10 17:12:34 +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) 120db8f1ea Cosmetic changes. 2013-06-24 10:24:55 +02:00
Sébastien Villemot 61485ab809 Fix copyright notices 2013-06-12 17:04:46 +02:00
Johannes Pfeifer dce8e74c33 Fix bug where initial_estimation_checks was performed on prior mean instead of specified mode
If the mode_file option was used, xparam1 was reloaded from the
mode-file after the initial checks, sometimes leading to very cryptic
errors. Now the initial checks already load the correct parameter
vector.
2013-04-26 21:10:36 +02:00
Sébastien Villemot c121aa14b1 Remove oo_.dr.{nstatic,npred,nboth,nfwrd,nspred,nsfwrd}
Replace them by equivalents in M_ (and an extra one: M_.dynamic).

IMPORTANT POINT: oo_.dr.npred used to count both purely backward and mixed/both
variables. This was the cause of lots of confusion. The new M_.npred only
counts purely backward variables.

We now have the following indentities:

M_.npred + M_.nboth + M_.nfwrd + M_.nstatic = M_.endo_nbr
M_.nspred = M_.npred + M_.nboth
M_.nsfwrd = M_.nfwrd + M_.nboth
M_.ndynamic = M_.npred + M_.nboth + M_.nfwrd
2012-11-16 20:05:13 +01:00
Sébastien Villemot c2c88600a1 More explicit error message when no estimated_params and no smoother
Closes: #222
2012-10-08 14:42:09 +02:00
Sébastien Villemot cc26a1d806 Add comment for the use case when there is no estimated_params 2012-10-08 14:32:22 +02:00
Michel Juillard d60202616a fixed problem with penalty in estimation. Created a new global scalar:
objective_function_penalty_base. It is the only simple way that I
found to keep csminwel1.m to be able to handle general functions.
2012-08-28 12:17:07 +02:00
Marco Ratto b02303cf69 Force analytic_derivation = 1; 2012-08-21 15:53:02 +02:00