Commit Graph

1505 Commits (4b2d139c7a0d8e3eab550f6dce2ea69e95edbf24)

Author SHA1 Message Date
Johannes Pfeifer 5d8d5e90d8 evaluate_smoother.m: pass updated M_.params and oo_ back to base workspace
Closes #1373
2017-03-17 13:15:39 +01:00
Johannes Pfeifer 569de10511 Make sure block-decomposed model returns with correct error code if Inf or NaN is encountered
Missing from 5f85d3a200 where only residual was set to error code. If oo_.deterministic_simulation.status is not set to 0, model will erroneously be considered as solved and homotopy will not be triggered.
2017-03-17 10:07:13 +01:00
Houtan Bastani ea13b12cf2 preprocessor: add lag info to equation cross references. closes #1398 2017-03-10 16:59:52 +01:00
Houtan Bastani 33b38ab643 preprocessor: write error messages to cerr instead of cout, replace \n with endl 2017-03-01 12:44:31 +01:00
Houtan Bastani 2d25858886 preprocessor: fix bug that caused temporary terms not to be printed for the parameter derivatives of the static model. closes #1397 2017-03-01 12:20:55 +01:00
Houtan Bastani 0b52b778ed preprocessor: for consistency, use equations.size() instead of equation_number() in classes that have equations as a field 2017-02-24 11:20:54 +01:00
Houtan Bastani 39855c95d2 preprocessor: aesthetic fix 2017-02-10 12:47:43 +01:00
Houtan Bastani fabca90345 preprocessor: aesthetic fix 2017-02-09 16:23:42 +01:00
Houtan Bastani 7ced4b5580 preprocessor: change error to warning because we don’t end processing in this situation; fix error message 2017-02-09 16:21:18 +01:00
Houtan Bastani edd2e98086 preprocessor: replace exit(1) with exit(EXIT_FAILURE) 2017-02-09 12:46:37 +01:00
Stéphane Adjemian (Charybdis) 9fbef0c107 Removed penalty_hessian routine.
+ Code factorization.
 + Added an option for using the penalized objective when computing numerically
 the hessian at the mode.

Previous behaviour (introduced with penalty_hessian routine) was to compute the
hessian matrix at the mode with the penalized objective function (instead of
the original objective function). This behaviour hides problematic situations,
where the computed hessian (using the original objective) would not be full
rank. For instance, if the estimation ends up with a parameter on (or very
close to) the bounds of its possible values (which is often not a desirable
outcome), the estimated posterior variance would be zero for this
parameter (with the original objective) because the hessian is not finite in
this direction, while the posterior variance would be positive if the penalized
objective is used instead. But this estimate would not be reliable by
construction of the penalty which is quite ad-hoc (more fundamentally I do not
think that there exists any rational for approximating the covariance matrix
with the inverse of the hessian matrix if the mode is on the border of the set
of possible values).

This commit restore the behaviour previous to 2446ab02ba.

An option is available for computing the hessian with the penalized
objective function.
2017-02-08 13:07:25 +00:00
Houtan Bastani 5b6a888d7f preprocessor: fix typo 2017-01-31 17:11:03 +01:00
Houtan Bastani f1d607af99 preprocessor: remove extra exogenous variables. closes #841 2017-01-27 22:48:17 +01:00
Houtan Bastani 3a0b9a1143 preprocessor: don’t automatically declare external functions 2017-01-27 20:36:26 +01:00
Houtan Bastani 3d4619fd85 preprocessor: handle undeclared external functions and lagged variables 2017-01-27 20:36:26 +01:00
Houtan Bastani cfae273038 keep track of all times an undeclared variable is encountered 2017-01-27 20:36:26 +01:00
Houtan Bastani bfd239aa26 preprocessor: issue warnings for undeclared model variables when the end of the model block is encountered. #1286 2017-01-27 20:36:26 +01:00
Stéphane Adjemian (Charybdis) da31cca7d4 Fixed bug.
NO_POSTERIOR_KERNEL_DENSITY option was not modifying the expected field in
options_, consequently this option was no honored.
2017-01-20 17:35:43 +01:00
Houtan Bastani 7fb7dd7ccc fix nested parens for params derivatives. closes #1201 2017-01-05 18:19:37 +01:00
Houtan Bastani 157369b505 when >32 nested parens encountered in matlab, print error message once per file in which such a situation occurred. #1201 2017-01-05 15:19:13 +01:00
Stéphane Adjemian b464226eaa Merge pull request #1358 from JohannesPfeifer/nograph
Implement posterior_nograph option
2017-01-05 06:52:08 +01:00
Houtan Bastani 09e7dde0ea fix warnings introduced in 3b20d41a92 related to size_t/int comparison #1201 2017-01-02 11:38:13 +01:00
Houtan Bastani 6bd1ff8e1c 3b20d41a92 used to_string from C++11 standard which breaks the snapshot build. #1201 2017-01-02 11:21:28 +01:00
Houtan Bastani 952f545cd7 avoid unnecessary processing when a stream has 32 or fewer nested parenthesis. #1201 2016-12-30 18:32:20 +01:00
Houtan Bastani 3b20d41a92 first iteration of fix for nested parenthesis in matlab. #1201 2016-12-30 18:14:08 +01:00
Houtan Bastani 9582431bd5 bug fix: end preprocessing with error when more than 32 nested parenthesis are encountered. closes #1201 2016-12-28 14:02:50 +01:00
Houtan Bastani 013043b1dd ramsey_policy: accept all endogenous variables in var_list_, even auxiliary variables. closes #1355 2016-12-27 14:08:50 +01:00
Johannes Pfeifer 452d3cd986 Implement preprocessor interface for posterior_nograph option 2016-12-26 13:07:46 +01:00
Johannes Pfeifer 28d4ed1918 Finish implementation and documentation of nograph option of shock_decomposition.m 2016-12-26 12:52:28 +01:00
Johannes Pfeifer 352786c2b4 load_mh_file: recompute results by default and load on request
Prevents general overwriting of results in oo_ and having stale results
2016-12-19 19:37:34 +01:00
Johannes Pfeifer 5707b4d965 Make evaluate_smoother.m output former global variables for correct updating of these objects 2016-12-18 12:43:29 +01:00
Johannes Pfeifer 2f717b5adc Eliminate global variables from shock_decomposition.m 2016-12-18 09:57:51 +01:00
Johannes Pfeifer 5515da191a Add Raftery/Lewis (1992) convergence diagnostics 2016-12-17 17:22:05 +01:00
Johannes Pfeifer 0f04a0f921 Geweke diagnostics: fix bug in interface that prevents setting the respective options 2016-12-17 17:22:05 +01:00
Stéphane Adjemian 5334c7433d Merge pull request #1345 from JohannesPfeifer/robust_lin_solve
robust_lin_solve: Fix mistakes introduced in 4b83c1bf763fe5029c94b7e5…
2016-12-17 17:18:19 +01:00
Houtan Bastani 4a8e8db634 preprocessor: parallel: add NumberOfThreadsPerJob option. #1349 2016-12-13 11:35:37 +01:00
Houtan Bastani de7d239f7c preprocessor: parallel: change default for singleCompThread. #1349 2016-12-13 11:12:04 +01:00
Johannes Pfeifer d5e20752ac robust_lin_solve: Fix mistakes introduced in 4b83c1bf76
Interface was still missing and documentation of option was in wrong place in manual and wrong
2016-12-01 17:31:29 +01:00
Houtan Bastani 5f85d3a200 block: fix bug introduced in e410043c24. #1245 2016-11-29 16:45:50 +01:00
Houtan Bastani e410043c24 block: add default argument for _dynamic functions: `varargout{1} = NaN;` #1245 2016-11-29 15:18:59 +01:00
Houtan Bastani 7ec3dcc6e2 preprocessor: fix bug that caused all models declared linear to fail under ramsey. closes #419 2016-11-29 14:21:34 +01:00
Houtan Bastani 3e9894028a preprocessor: create field in M_ that is true when hessian is zero, false otherwise. closes #1335 2016-11-14 12:32:21 +01:00
MichelJuillard 31d2c7e332 Merge pull request #1324 from JohannesPfeifer/kalman
Three bugfixes for missing_DiffuseKalmanSmootherH1_Z.m that led to wrong results
2016-11-13 19:13:10 +01:00
Houtan Bastani 2e54240dab preprocessor: fix iterator types in ParsingDriver::svar() 2016-11-04 14:44:45 +01:00
Johannes Pfeifer 98cf1bfc1d Add smoothed state uncertainty to Kalman smoother routines 2016-11-04 09:23:55 +01:00
Stéphane Adjemian b069241d18 Merge pull request #1217 from JohannesPfeifer/qz_estimation
Make sure diffuse_filter triggers qz_criterium>1
2016-11-04 06:47:17 +01:00
Stéphane Adjemian 09d374a0be Merge pull request #1303 from JohannesPfeifer/shock_decomp
Shock decomposition and posterior moments
2016-11-04 00:41:04 +01:00
Houtan Bastani f087f84a25 preprocessor: define var for normcdf + msvc. #1259 2016-10-17 14:59:07 +02:00
Houtan Bastani 4b2ddb6f1d preprocessor: don’t need compiler argument to dynare when using octave. closes #1314 2016-10-14 17:35:10 +02:00
Houtan Bastani d564d832dd preprocessor: add normcdf for MSVC. closes #1259 2016-10-14 16:11:44 +02:00