Commit Graph

203 Commits (7dd2dd5e24a343fbeaf3522ea5e535c27d8b9f95)

Author SHA1 Message Date
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
Johannes Pfeifer b10b2160ed Made error message if initial parameter values are outside prior bounds more explicit. 2012-07-19 12:30:41 +02:00
Sébastien Villemot 3414d4d468 Fix crash in estimation introduced in 1fb89a07 2012-07-06 09:50:30 +02:00
Marco Ratto ed4d37341c Fix problem with models where steadystate files change parameter values.
1) allow to compute derivatives starting from NUMERICAL derivatives of jacobian and steady state: this has a minor cost in accuracy and allow apply without errors identification and estimation with numerical derivatives;
2) added trap in dynare_estimation_init: if steadystate changes param values, automaticly shifts to numerical derivs of jacoban and steady state +  analytic derivatives of all the rest;
3) bug fixes for 2nd order derivatives w.r.t. model parameters;
2012-07-05 10:14:10 +02:00
Stéphane Adjemian (Charybdis) 1fb89a07e9 Removed global from set_state_space. 2012-07-03 11:29:18 +02:00
Michel Juillard 3ff832ddcc added test for too large standard deviation in beta distribution;
cleaned up error messages related to priors; set error trap for
initilial likelihood Nan or complex
2012-06-13 15:47:01 +02:00
Michel Juillard a39a0b3b67 fixed bug when only variances are estimated, but no deep parameter 2012-06-13 14:08:58 +02:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Marco Ratto da9ec0f187 Estimation with analytic scores and hessian;
This includes re-setting the list of output arguments in objective functions
Added test function
2012-04-29 21:18:33 +02:00
Michel Juillard e692185c6b storing oo_.prior.mean oo_.prior.variance
oo_.posterior.optimization.mode oo_.posterior.optimization.variance
oo_.posterior.metropolis.mean oo_.posterior.metropolis.variance as
aggregate arrays in addition to previous storage variable by variable
2012-04-21 21:28:03 +02:00
Michel Juillard 973302e42e fixing bugs in smoother 2012-04-18 21:15:18 +02:00
Stéphane Adjemian (Charybdis) 978f29f59d Added missing field in bayestopt_ (restrict_var_list, indices for the state and observed variables). 2012-03-04 22:12:59 +01:00
Stéphane Adjemian (Charybdis) f798118902 Updated test on options_.order (current version can estimate dsge models with non linear filters considering a second order approximation of the model). 2012-03-04 22:12:59 +01:00
Ferhat 09a3f3a084 Updates M_params only if estim_params_ has a field param_vals (not the case for a kalman_smoother) 2012-02-17 10:36:21 +01:00
Michel Juillard ad2a3a7ecc fixing problem in computation of initial posterior density when steady
state model is provided by the user
2011-12-15 17:35:27 +01:00
Ferhat Mihoubi 244e0ffb14 Corrects a minor bug related to a matrix transposition 2011-11-25 13:07:50 +01:00
Michel Juillard e4c803d0db fixed issues with estimation of non-stationary models. Option lik_init=2
is contradictory with diffuse_filter or unit_root_variables
declaration. Models with non-stationary variables, but only stationary
observed variables need diffuse_filter option and make a useless call
to kalman_filter_d (this seems better than trying to distinguish these
rare cases)
2011-11-21 12:39:02 +01:00
Stéphane Adjemian (Charybdis) bcf7e88217 Do not plot the priors if option nograph is used. 2011-11-14 17:56:27 +01:00
Michel Juillard f0efbee26d adding short circuit operator 2011-11-02 18:34:53 +01:00
Michel Juillard b4e7e55031 fixing bug with univariate filter 2011-11-02 17:54:48 +01:00
Michel Juillard 9ac3e7a582 fixing bug when estimating models with a steady state different from
zero. Introduced in commit bd00dc11d8
2011-11-01 18:23:12 +01:00
Michel Juillard bd00dc11d8 removing 8th output argument of dynare_estimation_init and
corresponding seemingly useless code
2011-10-21 22:09:45 +02:00
Michel Juillard 7e3225680f fixing logic flaw in setting lik_init as a function of diffuse filter or kalman_algo 2011-10-21 14:21:40 +02:00
Sébastien Villemot ddc029394c Clean-up last remnants of unit_root_vars (Closes: #167) 2011-10-14 16:22:47 +02:00
Marco Ratto c6a9650d20 Adapt identification routines after new dynare estimation commits. 2011-09-28 20:48:47 +02:00
Stéphane Adjemian (Charybdis) f1ffeb29bb Correction of the previous commit (3412d5e20a). Set options_.lik_init=3 if lik_init==1 and unit_root_vars
keyword appears in the mod file.
2011-09-21 19:05:34 +02:00
Stéphane Adjemian (Charybdis) 3412d5e20a Bug fix. Do not override option lik_init (declared in the estimation command) if unit_root_vars
keyword is present in the mod file, by forcing options_.lik_init to be equal to 3 (diffuse kalman
filter).
2011-09-21 18:54:11 +02:00
Michel Juillard b04738b36f resetting options_.nobs following previous change 2011-09-18 14:49:43 +02:00
Michel Juillard 80c69c404b Revert "added default options_.nobs = []; reset options_.nobs after call to"
This reverts commit 8dc6b78dde.
2011-09-18 14:37:29 +02:00
Michel Juillard 8dc6b78dde added default options_.nobs = []; reset options_.nobs after call to
intialize_dataset()
2011-09-18 12:00:11 +02:00
Stéphane Adjemian (Scylla) e9764d0538 Use a structure for the dataset. Bug fixes. 2011-09-17 15:38:49 +02:00
Stéphane Adjemian (Charybdis) 322adb92a5 Removed global from prior_bounds. Added texinfo header. 2011-09-14 23:41:37 +02:00
Ferhat Mihoubi 1317e04c28 block option needs a specific index for the kalman smoother 2011-06-21 13:23:06 +02:00
Ferhat Mihoubi 3459b08c53 - Corrects the first order approximation of block-decomposed models
- The block-decomposed models can now be estimated
2011-06-18 17:43:45 +02:00
Michel Juillard 85989df0e1 estimation initialization: minor bug correction when filtered_vars is requested 2011-06-08 22:06:41 +02:00
Stéphane Adjemian (Sedna) 91eb466369 Added an error message when a variable is declared as oibserved more than once. 2011-05-06 15:54:40 +02:00
Marco Ratto 179662baca skipped useless call to initial checks when nargout>3. 2011-03-18 10:55:48 +01:00
Marco Ratto b7133ebeb5 Fixed bugs related to global sensitivity analysis. 2011-02-25 09:27:33 +01:00
ratto 8619ec7835 Fixed bug related to dname 2011-02-22 10:12:37 +01:00
Michel Juillard aafa328362 updating dynare_estimation_init.m and using it in dynare_estimation_1.m. Required for GSA. 2011-02-21 11:22:47 +01:00
Houtan Bastani 8a0dabd07d use || and && as opposed to | and & where appropriate 2011-02-16 15:14:38 +01:00
Sébastien Villemot 55399a5dc5 Compatibility fix for Octave: under Octave, union() called on a column vector and a scalar returns a row vector, hence the need to add the 'rows' option 2011-01-24 15:34:02 -05:00
Stéphane Adjemian (Scylla) 3aaccc59e3 Changes related to the new interface for the dsge-var models. 2010-06-24 12:53:10 +02:00
sebastien 1be52aaa5f Beautification: removed tabulation characters which were left in previous beautification pass
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3300 ac1d8469-bf42-47a9-8791-bf33cf982152
2010-01-05 10:46:10 +00:00
sebastien 502e3e1df8 Beautified MATLAB code (Unix newline convention + Emacs indentation), except: AIM, swz, particle
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3250 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:17:34 +00:00
stepan 98ac3091c9 Added a vector of indices for the state variables in the restricted state vector (bayestopt_.mf0).
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3132 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-11-06 14:03:50 +00:00
michel d5a1a025d9 redo code for recursive estimation
corrected bugs with option prefilter, bayestopt_.mean_varobs is now a column vector

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2369 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-01-22 21:34:15 +00:00
ratto a02e66e12c Updated the call to set_prior with M_ and options_ inputs
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2254 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-11-12 13:13:24 +00:00
adjemian 70acbdb89f Removed a useless global (dsge_prior_weight)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2002 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-25 21:17:25 +00:00
sebastien 9f5beff89e v4 matlab: fixed remaining copyright headers (those files which are in the CR+LF endline convention)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1975 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-01 13:08:13 +00:00
michel d0b87d6c32 corrections to optimal policy code required by making M_, options_, oo_ and it_ local
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1914 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-07-02 07:42:50 +00:00
sebastien e08cad8265 v4: merged Octave branch into trunk
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1899 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-24 18:20:48 +00:00
ratto fa664b73c4 trap for sensitivity analysis and empty datafile
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1796 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-04-14 09:00:24 +00:00
michel 74fb4a04c5 v4: fixing initvalf
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1795 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-04-14 07:22:10 +00:00