Commit Graph

99 Commits (f95619b46ab28175287fd19b44c7dadf29a313b5)

Author SHA1 Message Date
Johannes Pfeifer 7c96e22985 Fix bug in dsge_likelihood.m where diagonal of measurement error covariance matrix was not correctly read out
This is a prerequisite for the univariate filter that operates along a vector for H instead of along the diagonal. Because of this, the likelihood in the presence of measurement error was wrong
2016-08-22 19:24:35 +02:00
Johannes Pfeifer bffea9b426 Fix error code for inf-likelihood 2016-08-22 19:24:35 +02:00
Johannes Pfeifer 15f95cec4a Add comments to Kalman filtering routines 2016-08-22 19:24:35 +02:00
Johannes Pfeifer 39e7c39243 Filter out infinite likelihoods 2016-08-22 19:24:35 +02:00
Johannes Pfeifer 72b8c650e5 Add missing logical operator from likelihood functions introduces when removing global penalty 2016-07-18 11:11:43 +02:00
Johannes Pfeifer 0c00e28799 Remove objective_function_penalty_base 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 329b91d717 Harmonize output of objective functions
Closes #1149
Mirrors 1ad8df4635
2016-06-15 00:30:28 +02:00
Marco Ratto d8fea3ff13 Correlations and measurement errors in identification:
1) Filter out measurement errors with error message that suggests to explicitly write measurement errors in model definition
2) allow identification checks with correlations, by switching to numerical derivatives
2016-05-22 23:10:01 +02:00
Houtan Bastani 25121bca4f fix copyright dates 2016-05-04 16:05:31 +02:00
Stéphane Adjemian (Lupi) fd850ca5bd Merge branch 'master' into lik_init_5_fixes
Conflicts:
	doc/dynare.texi
	tests/Makefile.am
2016-03-24 17:40:27 +01:00
Johannes Pfeifer 1c816aef24 Various interrelated bugfixes dealing with detrending 2016-03-23 10:19:40 +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
Michel Juillard c373d1e1be adding new option 'fast_kalman_filter' implementing Ed Herbst 2012 approach 2015-11-28 17:38:00 +01:00
Stéphane Adjemian (Charybdis) 5bccacaaa5 Fixed lik_init=5.
Missing initialization for the vector of state variables (a) and Zflag.
2015-11-04 22:33:15 +01:00
Stéphane Adjemian (Charybdis) fe0f19dc37 Fixed bug. Wrong size of the state vector...
When dsge_likelihood enters (because of of a detected singularity) in
univariate_kalman_filter routine with  correlated measurement errors.
2015-10-22 16:10:34 +02:00
Johannes Pfeifer a7ed27b889 Document lik_init=5 and add unit test for lik_init 2015-10-18 18:55:33 +02:00
Marco Ratto 0aa7e15d58 - Once Schur stape space transformation is done, map immediately Pinf and Pstar onto the original variablesm to avoid propagation of errors related to multiple unit and zero eigenvalues.
- ensure that smoother and filter get the same Pstar and Pinf in diffuse steps
2015-10-13 17:26:39 +02:00
Johannes Pfeifer d513d38f73 Filter out failure of k_order_pert in likelihood computation 2015-10-11 17:55:27 +02:00
Michel Juillard f7f158f078 Revert "removed global objective_function_penalty_base"
This reverts commit 5ade8d7c6f.
2015-10-09 14:23:32 +02:00
Michel Juillard 784b8d893c Revert "reducing penalty value to 0.1 when there is no ground to make it proportional"
This reverts commit a6f123fd50.
2015-10-09 14:23:32 +02:00
Michel Juillard 035adeb89e Revert "More fixing related to objective_function_penalty_base"
This reverts commit 1ad8df4635.
2015-10-09 14:23:31 +02:00
Michel Juillard 1ad8df4635 More fixing related to objective_function_penalty_base 2015-10-08 20:57:00 +02:00
Michel Juillard a6f123fd50 reducing penalty value to 0.1 when there is no ground to make it proportional 2015-10-08 20:57:00 +02:00
Michel Juillard 5ade8d7c6f removed global objective_function_penalty_base
added penalty_objective_function.m and penalty_hessian.m
2015-10-08 20:57:00 +02:00
Stéphane Adjemian (Charybdis) d125c2effc Fixed bug (wrong syntax for switch, case 5). 2015-08-27 11:37:07 +02:00
Johannes Pfeifer 0fd76e0c6f Assigning unique function for each input argument of lyapunov_symm.m
The old way of redefining input arguments to satisfy different options was too error-prone. See 69daaa0460b0ddee97292c39d40355201e316622 of tholden
2015-07-22 15:11:39 +02:00
Johannes Pfeifer 86322bcb3a Fix typo in dsge_likelihood.m
blkdiag command is not written with ck
2015-07-20 13:10:31 +02:00
Johannes Pfeifer d6bc85fdc6 Improve error message for incompatible filter/Kalman option 2015-07-20 13:06:22 +02:00
Marco Ratto e2b59630c1 diffuse_kalman_tol not properly triggered 2015-05-07 10:18:55 +02:00
Marco Ratto ca8f0ea006 Harmonize filters/likelihood with smoothers by using new option diffuse_kalman_tol 2015-04-08 15:49:12 +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 bda19832cd Integrate error from negative steady state with loglinear model into print_info.m
Prevents crashes during estimation. Instead of directly crashing, error handling is done via print_info.m so that penalizing the error during estimation is possible
2014-12-04 20:04:36 +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
Stéphane Adjemian (Karaba) 97b63105a0 Add a parameter to the lyapunov_symm routine (debug mode). 2014-10-13 17:42:53 +02:00
Stéphane Adjemian (Karaba) 55808060cf Removed useless input (complete commit 438a671c3873e5c4e1bb02a54080e930fbc11886). 2014-10-13 17:42:52 +02:00
Johannes Pfeifer b90f3deed2 Bugfixes and improvements related to method 3 of lyapunov_symm.m
- the function was called with the wrong input argument for this case (Q instead of R*Q*R'), crashing with incompatible matrix dimensions
- the persistent variable X was not updated when the size of it changed, leading to crashes when estimation is followed by calls to DsgeSmoother.m where the state-space is different
- Also eliminates the printed output in lyapunov_symm.m that could not be turned off and clutters estimation
2014-10-13 17:42:52 +02:00
Johannes Pfeifer 2d39fc62e2 Make sure the output arguments of dsge_likelihood.m are actually set
Before, trend_coeff and ys were sometimes returned as empty
2014-09-21 11:54:43 +02:00
Stéphane Adjemian (Scylla) 576ed55dda Merge branch optimizer_number_5. 2014-09-11 17:38:03 +02:00
Stéphane Adjemian (Charybdis) 6d42ec66d5 Account for error code 10 (Inf in Jacobian of the dynamic model) in likelihood functions. 2014-09-10 17:49:33 +02:00
Marco Ratto a6bddb2d57 Improve computation of outer product gradient for univariate Kalman algorithms, by exploiting the larger number of individual densities computed during recursions (used in optimizer number 5). 2014-07-23 16:33:39 +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
Sébastien Villemot 939fb78624 Merge pull request #663 from JohannesPfeifer/master
Bugfix and cosmetic fix
2014-07-01 17:56:48 +02:00
Stéphane Adjemian (Scylla) 03395a7425 Fixed bug. Wrong test on the number of input arguments (because of the new input argument dataset_info in dsge_likelihood). 2014-06-25 14:57:20 +02:00
Stéphane Adjemian (Charybdis) efcf6bd9c0 Use dseries object in the estimation routines. 2014-06-16 17:41:59 +02:00
Johannes Pfeifer ca6803b531 Add forgotten case to likelihood functions
Code 25 was not filtered out, leading to cryptic crashes
2014-06-02 14:10:43 +02:00
Johannes Pfeifer 12026b98a5 Add info about constants to dsge_likelihood.m header 2014-03-19 19:34:34 +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
Stéphane Adjemian (Charybdis) 06ef8fce30 Fixed typo. 2013-06-28 22:02:24 +02:00
Stéphane Adjemian (Charybdis) b281830983 Added new initialization mode ofr the Kalman filter and smoother. 2013-06-28 16:26:53 +02:00
Stéphane Adjemian (Charybdis) 268095276c Factorized code using ispd routine. 2013-06-20 12:59:01 +02:00