Commit Graph

6056 Commits (1007ea13015fddf673683eaa0e7f420c288a356d)

Author SHA1 Message Date
Johannes Pfeifer 36ccec75ce Add missing constant 2*pi to missing_observations_kalman_filter_d.m 2016-08-22 19:24:35 +02:00
Johannes Pfeifer 63b8c4d2dd Fix smoother for univariate filter with (correlated) measurement error 2016-08-22 19:24:35 +02:00
Johannes Pfeifer f61453211c Correct header of missing_DiffuseKalmanSmootherH3_Z.m and make sure H is vector 2016-08-22 19:24:35 +02:00
Johannes Pfeifer 178bf4165c Make sure Zflag for augmented state space is correctly set when measurement error is correlated 2016-08-22 19:24:35 +02:00
Johannes Pfeifer f95619b46a Add header info to univariate_kalman_filter.m 2016-08-22 19:24:35 +02:00
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 6368636ee0 Move Kalman filter options consistency checks to dynare_estimation_init.m 2016-08-22 19:24:35 +02:00
Johannes Pfeifer 8aaca040b3 Expand check of fast_kalman_filter for presence of block-option 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 e939d51d58 display_problematic_vars_Jacobian.m: Fix bug where exogenous variables in dynamic Jacobian were not accounted for Prevents crashes in debug mode 2016-08-22 19:24:35 +02:00
Johannes Pfeifer ed22b6c4f8 Make datatomfile.m datafiles save name of creator and date 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 df8ad833fb Transform automatic loading of optimal_mh_scale_parameter.mat into option scale_file
Closes #503
2016-08-22 16:27:32 +02:00
Johannes Pfeifer 55e20aab1f Delete unused passing of file in posterior_sampler.m
Ports 919645d30e2361fb4c960ee78e42d401ad3d95ba to master
2016-08-22 16:27:32 +02:00
MichelJuillard 6a6ccfa966 Merge pull request #1257 from JohannesPfeifer/conf_sig
Conf sig
2016-08-21 16:14:28 +02:00
MichelJuillard d27bbe667f Merge pull request #1230 from JohannesPfeifer/load_mh_file
Save chain's proposal density and make load_mh_file and mh_recover load it
2016-08-21 16:12:12 +02:00
MichelJuillard 912409a71c Merge pull request #1268 from JohannesPfeifer/dynare_solve_error_message
Remove error-display from dynare_solve.m
2016-08-21 16:07:35 +02:00
Johannes Pfeifer e7b8222144 Updated header of dynare_solve.m 2016-08-21 11:47:52 +02:00
Johannes Pfeifer 14ab41e414 Move debugging information removed in 335ce74acb to evaluate_steady_state.m where it belongs 2016-08-21 11:45:11 +02:00
Johannes Pfeifer 335ce74acb Remove error-display from dynare_solve.m
Prevents estimation crashing when invalid starting values for steady state computation arise during e.g. mode-finding
2016-08-21 11:44:18 +02:00
Johannes Pfeifer 4d8295afdf Cosmetic fixes to display_problematic_vars_Jacobian.m 2016-08-21 11:28:47 +02:00
Johannes Pfeifer 9d9cb322c8 Make sure fields of estim_params are always properly initialized 2016-08-21 11:24:29 +02:00
MichelJuillard cc5cafdd15 Merge pull request #1254 from JohannesPfeifer/log_density_save
Save log_density at the mode and document oo_.posterior-fields
2016-08-21 11:13:19 +02:00
Michel Juillard 0ebef17df2 fix shocks_decomposition bug introduced in commit 75d699cbfa 2016-08-21 11:11:19 +02:00
MichelJuillard 4750eb64ff Merge pull request #1269 from JohannesPfeifer/eig_R2014a
Condition use of eig to compute left eigenvector on Matlab version
2016-08-21 09:54:47 +02:00
Johannes Pfeifer 72e84657a7 Condition use of eig to compute left eigenvector on Matlab version
Functionality is only supported in Matlab from 2014a/8.3 onwards. Closes #1266
2016-08-20 20:43:20 +02:00
MichelJuillard b5b9f46ff9 Merge pull request #1222 from JohannesPfeifer/paralleldelete
dynareParallelDelete.m: Condition delete-command on existence of file…
2016-08-20 18:37:01 +02:00
Johannes Pfeifer 4a723872eb dynareParallelDelete.m: Condition delete-command on existence of file to prevent warning
Closes #1195
2016-08-20 18:02:04 +02:00
MichelJuillard ee428ffb41 Merge pull request #1251 from JohannesPfeifer/resid_command
Check for complexity of steady state in resid.m
2016-08-20 17:41:22 +02:00
MichelJuillard 5c69c789f6 Merge pull request #1261 from JohannesPfeifer/bvar
BVAR: Save prior and posterior information in oo_
2016-08-20 17:39:34 +02:00
MichelJuillard 2e9725cfd0 Merge pull request #1267 from JohannesPfeifer/estimation_init
Fix two bugs in dynare_estimation_init.m
2016-08-20 17:36:48 +02:00
Michel Juillard 75d699cbfa fixing dates in shocks_decomposition.
Interface still missing
2016-08-20 16:31:25 +02:00
Johannes Pfeifer b1f1826d5f Fix two bugs in dynare_estimation_init.m
Makes sure that i) name field is always present and ii) that number fields of estim_params are only accessed after they have been set by set_prior
2016-08-17 21:47:46 +02:00
MichelJuillard 2b674b27d1 Merge pull request #1265 from JohannesPfeifer/dynare_solve_handle
dynare_solve.m: make sure str2func is only used on strings
2016-08-12 12:06:32 +02:00
Johannes Pfeifer 80049a6d09 dynare_solve.m: make sure str2func is only used on strings
Otherwise, code crashes
2016-08-12 11:59:57 +02:00
Johannes Pfeifer c156a5907c BVAR: Save prior and posterior information in oo_ 2016-08-01 10:41:04 +02:00
Johannes Pfeifer 8dadd1519e Restore backward compatibility of OSR command with maxit and tolf options
Translates these options into optim_opt structure
2016-07-22 16:53:19 +02:00
Johannes Pfeifer 1bd5c7cc0d Disentangle options_.conf_sig and set default to 0.9 2016-07-21 12:17:30 +02:00
Johannes Pfeifer f2f44a0989 Save log_density at the mode and document oo_.posterior-fields 2016-07-20 20:48:24 +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 578fb04590 Check for complexity of steady state in resid.m
Residuals might be 0, but steady state might be complex, resulting in hard-to-diagnose problems when calling steady.m
2016-07-14 15:04:27 +02:00
Michel Juillard 22f49971bc fixing bug in mcp model setup
makes perfect_foresight_problem more efficient
added test case for stack_solve_algo == 7
2016-07-03 10:56:44 +02:00
Michel Juillard 2f2413e64a addind ep accuracy check 2016-07-03 10:56:44 +02:00
Marco Ratto bf293396b6 Harmonize FilteredVariables with Updated and Smoothed ones, by adding steady state to stored values, both point estimate and MCMC
(cherry picked from commit fd0d7d6d27a7937b135521c4dd76d7fa242d89ab)
2016-07-01 20:40:17 +02:00
Johannes Pfeifer 7621ebb5ea Harmonize spelling and function arguments of collect_latex_files.m
All lower caps and no inputs
2016-07-01 19:09:29 +02:00
Johannes Pfeifer 9275cd089b Add eps-loader to rplot.m
Also makes sure that every single graph is saved when looping over figures
2016-07-01 19:09:29 +02:00
Johannes Pfeifer 2a2d81784b Allow rplot to plot exogenous variables 2016-07-01 19:09:29 +02:00
Stéphane Adjemian (Lupi) 46a149576b Merge branch 'pr#1241' 2016-07-01 16:30:49 +02:00
Stéphane Adjemian (Hermes) 2435040929 Changed default for nonlinear filters. 2016-07-01 11:47:21 +02:00
Stéphane Adjemian (Hermes) b6ecf5fdd0 Updated particles submodule (fixes for apf and cpf). 2016-07-01 11:41:39 +02:00
Johannes Pfeifer 2906cbbddd Add check whether toolbox is installed 2016-06-28 09:39:32 +02:00
Houtan Bastani 848d81eb84 Merge pull request #1238 from rattoma/gsa
Bug fixes for identification with ML
2016-06-27 23:45:05 +02:00
Stéphane Adjemian (Hermes) fcaf457f35 Cosmetic change (code factorization). 2016-06-24 17:35:56 +02:00
Johannes Pfeifer 420e80e538 discretionary_policy: Call steady_state-file to make sure that parameter dependence is correctly handled
Prevents cryptic crashes due to NaN in derivatives of objective function
2016-06-23 20:50:17 +02:00
Johannes Pfeifer 317f958184 Ramsey: Test whether number of instruments matches number of missing equation
Otherwise cryptic crashes can result
2016-06-23 20:48:01 +02:00
Marco Ratto be758613f4 fixed bugs that prevented the computation of the asymptotic Hessian with ML. 2016-06-19 11:09:59 +02:00
Marco Ratto 25120e54f5 added check for singular values whose eigenvectors contains only ONE column 2016-06-19 11:08:37 +02:00
Stéphane Adjemian (Hermes) 25243712ba Fixed bug on non linux platforms + Cosmetic changes.
The paths to mex files was wrong.
2016-06-17 22:02:34 +02:00
Johannes Pfeifer e214ec2976 Allow for parameter_set=mle_mode in conditional_forecast 2016-06-17 00:21:08 +02:00
Johannes Pfeifer 1c420e6056 Allow for parameter_set=mle_mode in shock_decomposition
Required after writing results into oo_.mle_mode for ML estimation
2016-06-17 00:21:08 +02:00
Stéphane Adjemian (Hermes) 1dea10d478 Updated dynare_config wrt #c7e848948156fe8febca22276a77c9586c565d87 2016-06-17 00:16:06 +02:00
Stéphane Adjemian (Hermes) af9b069830 Moved isoctave routine in base directory. 2016-06-17 00:04:00 +02:00
Stéphane Adjemian (Hermes) d80f6d9a99 Minimize the number of calls to addpath.
These calls have a prohibitive cost...
2016-06-16 23:55:07 +02:00
Stéphane Adjemian 3ae44efbea Merge pull request #1218 from rattoma/gsa
Allow Screening with neighborhood_width sampling.
2016-06-16 22:18:39 +02:00
Stéphane Adjemian (Lupi) 33d35bc3c5 Added quantile routine in missing.
This is missing if the stats toolbox is not available. Integration test
TeX/fs2000_corr_ME.mod was failing because of its absence.
2016-06-16 14:33:57 +02:00
Johannes Pfeifer f86b0a5ad6 Make dyn_forecast.m account for trend_coeffs saving coefficients for all variables 2016-06-16 12:05:38 +02:00
Johannes Pfeifer 3b09ab5424 Save Smoother.Trend and Smoother.Constant after MCMC 2016-06-16 12:05:38 +02:00
Johannes Pfeifer 1c84ccdc34 Save trend and constant for all variables in smoother 2016-06-16 12:05:38 +02:00
Johannes Pfeifer 3efe283bf0 Make oo_.Smoother.TrendCoeff have size of endogenous variables
Sets coefficients with unspecified trends to 0, allowing to later use the trend_var command for setting trends
2016-06-16 12:05:38 +02:00
Johannes Pfeifer 5d6d1336ef Enable filter_covariance option in posterior sampling 2016-06-16 12:05:38 +02:00
Stéphane Adjemian (Hermes) 65ae97d37d Fixed bug.
For uniform priors use the prior mean when computing the prior
moments (prior mode is not defined).
2016-06-16 11:59:47 +02:00
Stéphane Adjemian (Hermes) 789f21257e Avoid side effects on globals (prior CLI and write_latex_prior_table commands). 2016-06-16 11:57:16 +02:00
Stéphane Adjemian (Hermes) 2c074d7cd2 Check that a prior is defined in prior CLI command
Behaviour consistent with the logic introduced in commit
64d01a806e.
2016-06-16 11:16:23 +02:00
Stéphane Adjemian (Hermes) a91e4dec75 Bug fixes.
Introduced when we increased the size of the mat files saved on
disk (see commit #e2942662479f822cd4ca1251158f0b5037c3a446).
2016-06-16 11:15:22 +02:00
Stéphane Adjemian (Hermes) 64d01a806e Fixed behaviour of write_latex_prior_table command 2016-06-16 10:38:40 +02:00
Johannes Pfeifer e94a698a9b Implement write_latex_prior_table.m
Fixes and replaces write_table_prior.m and uses consistent name. Also includes documentation
2016-06-15 16:47:39 +02:00
Stéphane Adjemian (Lupi) fcb738616c Fixed bug in extened_path_mc.
Wrong calling sequence to the routine defining the shocks.
2016-06-15 16:01:08 +02:00
Stéphane Adjemian (Lupi) 1e7fc89e8d Replaced filesep by hard coded slash.
See 57501f802e.
2016-06-15 13:14:55 +02:00
Stéphane Adjemian (Lupi) 57501f802e Revert "Cosmetic change."
This reverts commit 544da84e73.

On Windows filesep returns a backslash ('\') as expected but
LaTeX, even on Windows, only understands slashes ('/') when
defining paths (for graphic or file inclusion).
2016-06-15 13:07:59 +02:00
Stéphane Adjemian (Hermes) 473d335851 Fixed bug (wrong structure names). 2016-06-15 00:35:40 +02:00
Johannes Pfeifer 029e9495ba Fix bug in dsge_var_likelihood.m where constant was not considered for dof when Gamma function was computed
Does not affect the maximum of the posterior as it only affects constant term
2016-06-15 00:30:28 +02:00
Johannes Pfeifer 4486d098b5 Save dsge_var objects at the mode 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 2cf882fec5 Remove comments on dynare_estimation_1.m after implementing store_smoother_results 2016-06-15 00:30:28 +02:00
Johannes Pfeifer d08fd37986 Do not set oo_.posterior.optimization-fields when mh_posterior_mode_estimation is used 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 552a9b5230 Fix bugs previously introduces in dynare_estimation_1.m related to penalty function 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 2446ab02ba Transform persistent variables of newrat.m into function arguments 2016-06-15 00:30:28 +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
Johannes Pfeifer 0edd8e2025 Add penalty_hessian.m and penalty_objective_function.m 2016-06-15 00:30:28 +02:00
Stéphane Adjemian (Hermes) 544da84e73 Cosmetic change.
Systematically use filesep instead of '/'.
2016-06-14 22:49:01 +02:00
Stéphane Adjemian (Hermes) 96128b32ab Fixed bug (missing folder separator). 2016-06-14 21:53:14 +02:00
Stéphane Adjemian (Hermes) 2a65e7a85a Merge branch 'master' into johannes-identification-fixes 2016-06-14 18:17:36 +02:00
Johannes Pfeifer fff88f1dc7 display_estimation_results_table.m: Move TeXEnd inside of if-clause to prevent crashes 2016-06-14 15:50:48 +02:00
Johannes Pfeifer b3877b3a9e Save chain's proposal density and make load_mh_file and mh_recover load it
Closes #504
2016-06-14 15:09:05 +02:00
Johannes Pfeifer faab010753 Change file ending from TeX to tex to prevent problems on Linux
Related to b454c28096
2016-06-14 12:13:48 +02:00
Houtan Bastani 5303d7079b submodule update: particles 2016-06-14 12:02:15 +02:00
Johannes Pfeifer 59cbee2b56 Provide output on posterior variance decomposition
Closes #1219
2016-06-14 11:53:38 +02:00
Johannes Pfeifer 5ca4204806 Only set texnames in McMCDiagnostics.m if TeX is requested 2016-06-14 11:53:38 +02:00
Johannes Pfeifer dc1c5f182c Make gsa function correctly extract parameter (TeX) names 2016-06-14 11:53:38 +02:00
Johannes Pfeifer 6be02ef086 Add caller function info to dyn_latex_table.m 2016-06-14 11:53:38 +02:00
Johannes Pfeifer 55b2cd6f4c Make sure underscores and backslashes are correctly handled in TeX-loaders of gsa 2016-06-14 11:53:38 +02:00
Johannes Pfeifer 7325dbe54e Expand collect_LaTeX_Files.m to gsa redform subfolders 2016-06-14 11:52:49 +02:00
Johannes Pfeifer a02f7cc8f3 Correct header of DsgeSmoother.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer 42f47e0f55 Correctly indent filt_mc_.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer c3e1c01864 Enable TeX output in rmse-mapping of gsa 2016-06-14 11:52:49 +02:00
Johannes Pfeifer cb9095977e Allow for underscores in TeX-output of gsa 2016-06-14 11:52:49 +02:00
Johannes Pfeifer 59eec342d2 Allow for second header string in dyntable.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer d02f8d0377 Allow for text-command in math environment by using amsmath package in collect_LaTeX_Files.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer f76a353d65 Allow for underscores in first header element in dyn_latex_table.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer 2c4c7558f4 Add TeX output to stab_map_2.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer 11687d8c66 Expand collect_LaTeX_Files.m to gsa Output folder 2016-06-14 11:52:49 +02:00
Johannes Pfeifer 74212ab199 Delete redundant legend input argument in filt_mc_.m that creates warning message in Matlab 2016-06-14 11:52:49 +02:00
Johannes Pfeifer ed1dbcac53 Fix setting of names and parameter names in stab_map_ 2016-06-14 11:52:49 +02:00
Johannes Pfeifer cba10b0d90 Bugfix for setting tex-names in mcf_analysis.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer 6f410f4cc1 Provide LaTeX output for model_comparison.m 2016-06-14 11:52:49 +02:00
Johannes Pfeifer f5c08fc0e8 Create LaTeX output for Smirnov tests 2016-06-14 11:52:49 +02:00
Johannes Pfeifer 9b82c72e4f Remove global options structure from dyntable 2016-06-14 11:52:17 +02:00
Johannes Pfeifer 849505ec62 Fix display of NaN parameters in TeX-table in ident_bruteforce.m 2016-06-14 11:52:17 +02:00
Johannes Pfeifer f851252b25 Pass options_ to dyn_latex_table.m to make it honor noprint option 2016-06-14 11:52:17 +02:00
Johannes Pfeifer c6f98433d2 Reset colormap to jet in plot_identification.m
Necessary after Matlab changed default
2016-06-14 11:52:17 +02:00
Johannes Pfeifer 73ec852433 Deal with required naming after allowing for correlations in identification in #1200 2016-06-14 11:52:17 +02:00
Johannes Pfeifer 00cdc05d58 Pass title texts to ident_bruteforce.m to make sure that previous TeX output is not overwritten by advanced option 2016-06-14 11:52:17 +02:00
Johannes Pfeifer e294266247 Increase default MaxNumberOfBytes to 100 MB
Closes #330
2016-06-14 11:51:14 +02:00
Houtan Bastani b454c28096 fix latex compilation on linux. #1207 2016-06-14 11:37:16 +02:00
Johannes Pfeifer 7ff453846a Fix passing of compflag in dyn_mex.m
Fixes 83eeafa32c
2016-06-14 10:45:44 +02:00
Houtan Bastani 83eeafa32c fix mex file compilation with MSVC. Closes #1227 2016-06-14 10:34:14 +02:00
Houtan Bastani 2bbfb8762b fix copyright notices 2016-06-14 10:30:57 +02:00
Michel Juillard f145a50a85 extend path: removed global options_ 2016-06-09 12:02:48 +02:00
Michel Juillard 4a6e14ea95 extended path: removed option for lcppath 2016-06-09 12:02:48 +02:00
Michel Juillard 8fa29513f3 extended path: fixing bug for order > 2 and several shocks 2016-06-09 12:02:48 +02:00
Stéphane Adjemian (Hermes) 335a188dac Fixed bug in extended path.
Allow innovations with zero variance (ie do not force removal of the
variables from the varexo list).
2016-06-09 10:32:25 +02:00
Marco Ratto fbc71aa95c Allow Screening with neighborhood_width sampling.
Allow calibrated values for neighborhood_width sampling to violate prior bounds.
2016-06-07 12:22:39 +02:00
Stéphane Adjemian (Charybdis) 3d16707dd9 Updated particles submodule (bug fixes). 2016-06-01 19:56:09 +02:00
Stéphane Adjemian (Charybdis) dc1cfb4509 Updated particles submodule (bug fix). 2016-06-01 17:12:39 +02:00
Stéphane Adjemian (Charybdis) 392977d4ef Changed default parameters for unscented transform (Particle filters). 2016-06-01 17:01:23 +02:00
Stéphane Adjemian (Charybdis) 15f83d0e18 Added new option for setting weights in CPF algorithm. 2016-06-01 16:29:53 +02:00
Stéphane Adjemian (Charybdis) 67b808207c Added new algorithm for the estimation of nonlinear models. 2016-06-01 16:29:53 +02:00
Stéphane Adjemian (Charybdis) 272e3c96f8 Updated particles submodule. 2016-06-01 16:29:53 +02:00
Michel Juillard e0475fd4ef extended path: use deterministic_simulation.status instead of maxerror 2016-05-31 12:10:12 +02:00
Michel Juillard 0ce2834281 extended path: fixed boundaries for linear problem 2016-05-31 12:10:12 +02:00
Michel Juillard 5024af0099 extended path: fixed calibrated shocks 2016-05-31 12:10:12 +02:00
Michel Juillard c14125d585 PATH: fixing bugs 2016-05-31 12:10:12 +02:00
Michel Juillard 76f008e4e4 PATH: remove calls to lcppath that doesn't work with perfect foresight models 2016-05-31 12:10:12 +02:00
Michel Juillard d106b20b69 perfect foresight: set boundaries with PATH 2016-05-31 12:10:12 +02:00
Michel Juillard ddb9c0657c fixing linear complementarity problem 2016-05-31 12:10:12 +02:00
Michel Juillard 450d7b099a fixing error status for PATH hook 2016-05-31 12:10:12 +02:00
Michel Juillard 11161063d4 removing debugging output 2016-05-31 12:10:12 +02:00
Michel Juillard c49332df43 add support for PATH for steady state 2016-05-31 12:10:12 +02:00
Michel Juillard c159dff19c adding hook for PATH solver 2016-05-31 12:10:12 +02:00
Michel Juillard b8132eb556 extended path: adding support for calibrated shock.
This commit is not satisfactory because it uses M_.det_shocks
for unexpected shocks. We need to improve on it soon.
2016-05-31 12:10:12 +02:00
Johannes Pfeifer 96098a17d2 Cosmetic fix to set_all_parameters.m 2016-05-30 13:31:22 +02:00
Johannes Pfeifer 118b3ccb74 catstruct.m: remove call to nargchk, which will be removed in future Matlab versions 2016-05-28 19:32:11 +02:00
Stéphane Adjemian (Charybdis) dfbad0404d Fixed crash in sim1_linear when periods=1.
Closes #1176.
2016-05-26 22:19:36 +02:00
Stéphane Adjemian (Charybdis) fb4dfc6da6 Fixed typo. 2016-05-24 22:32:02 +02:00
Michel Juillard cd55ed749c extended_path: fixing inititalization for PATH
(cherry picked from commit 7d29e917f77e7e20211e5be01544d86c64af8c65)
2016-05-24 18:08:33 +02:00
Michel Juillard 28c0c92ae8 fixing typos
(cherry picked from commit 86995a3bd478a3dc02919424aeb77e2a550a84c5)
2016-05-24 17:57:26 +02:00
Stéphane Adjemian (Charybdis) 3fa6a96bfb Added homotopy.
Fixes the issue of paths containing spurious solutions for (stochastic)
perfect foresight models.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Charybdis) cfc6957625 Cosmetic changes. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Charybdis) 8b5b7921f6 Improved solver for (S)EP.
Use previous solution as an initial condition for the perfect foresight problem.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Charybdis) 80f1baad7e Changed solver in simul_backward_nonlinear_model. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Charybdis) 6c7f3f1932 Added input to pass sequence of shocks. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) 7d1d860a53 Fixed ep.init option.
Initialization of the perfect foresight solver (in extended path) with
the solution of the first order approximation of the model was broken.

If the value of options_.ep.init is "true"" (1) then the solution of the
first order approximation is used as an initial guess for the newton
lilke solver. If the value of options_.ep.init is "false" (0) the solver
is initialized with the steady state.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) dabdda0506 Fixed wrong definition of a logical variable.
The second outputr returned by perfect_foresight_solver_core is the
max. abs. residual, not a dummy variable indicating success or failure
of the perfect foresight solver.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) fbf2fae036 Changed option value for unscented integration nodes. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) fdbd4fa7a7 Code factorization.
- Added routines for initializing and setting shocks in EP.
 - Added a specialized routine for doing Monte Carlo around EP.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) 3bbac629ed Cosmetic change.
Removed maximum_lead and maximum_lag in extended_path routines.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) d74f315bfb Fixed bug in (Stochastic) Extended Path algorithm.
Innovations were not correctly passed to the non linear solver. Closes #1128.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 4926b6c6ff Added a routine the residuals of a model.
Takes a path for the endogenous variables and returns the residuals of
the dynamic equations. This routine is useful for solving the model with
the PEA approach.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) ea1ebfa911 Added argument to simul_backward_nonlinear_model.
First input argument is a vector for the initial condition of the
endogenous variables. If empty, the steady state of the model is used.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) e507a6d0a9 Fixed copyright header. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 8958b7ef98 Cosmetic changes. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 3a1f74d7a7 Fixed typo. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 13ca15a278 Allow (S)EP with arbitrary sequence of innovations.
The third input argument of extended_path Matlab/Octave's routine is the
sequence of shocks (T*n array, where n is the number of exogenous
variables and T is the size of the sample). If the third argument is
empty, the (stochastic) extended path is run with gaussian
innovations (this corresponds to the previous behaviour).

TODO:
 - Fix the compatibility with ep.replic_nbr
 - Check the 'calibrated' mode.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) b60bd7b36b Removed globals from extended_path routine. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) ee78ad2049 Improved execution speed.
Removed some calls to bsxfun which is not optimal on sparse matrices. I
only removed the calls where I identified bottlenecks (with a Smets and
Wouters model), more tests are needed to decide if we have to remove other
occurences of bsxfun on sparse matrices.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) be0f6230ad Cosmetic changes.
- Use a switch-case block.
 - Added a warning when the user tries to solve a linear(ized) model
with solve_algo different from 0 (for a linear model).
 - Added an error message if the user try to solve a linearized model
with stack_solve_algo=6 (not implemented).
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 1815eb8e56 Code factorization. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 8a163842d0 Removed oo_ from sim1_linear routine. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 53747cb082 Fixed lmmcp option.
This option may be used in extended_path and perfect_foresight_solver commands.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) e0be60710c Removed oo_ from sim1_purely_{backward,forward} routines. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 290ce5db68 Removed oo_ from sim1_lbj routine. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 674c9ab286 Removed oo_ from sim1 routine. 2016-05-24 17:26:06 +02:00
Marco Ratto 3e8dbcfc7e Set mode_files in such a way that it can be handled with key-value pair.
We need a single mode file that contains variable xparams = [x1 x2 x3] all multiple modes, one per column.
Fixes #1199
2016-05-22 23:15:18 +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
Johannes Pfeifer 389f43019d Put fields of OSR in M_ into workspace to restore compatibility with 4.4.3 2016-05-22 11:41:54 +02:00
Johannes Pfeifer d10f8b42d7 Fix bug in convert_dyn_45_to_44.m if bayestopt_ is empty 2016-05-22 11:41:54 +02:00
Johannes Pfeifer 03563e012b Allow for pass OSR parameter bounds to optimizer 2016-05-22 11:41:54 +02:00
Johannes Pfeifer 9774d0544d Initialize fields of M_.osr to empty in global_initialization.m 2016-05-22 11:41:54 +02:00
Johannes Pfeifer 676182f550 Cosmetic fix to dynare_minimize_objective.m 2016-05-22 11:41:54 +02:00
MichelJuillard 3df1a1275f Merge pull request #1185 from JohannesPfeifer/bytecode_fixes
Bytecode fixes
2016-05-22 10:32:56 +02:00
Johannes Pfeifer 13d42e05a5 Add missing else-clause in simulated_moment_uncertainty.m
Fixes crash in unit tests
2016-05-22 10:03:56 +02:00
Stéphane Adjemian 0521aa4e09 Merge pull request #1188 from JohannesPfeifer/slice_marco
Add slice and factorization of posterior samplers
2016-05-22 01:45:14 +02:00
Johannes Pfeifer 161f674dd9 Fix two TeX loaders where apostrophe was missing 2016-05-20 12:43:52 +02:00
Johannes Pfeifer 7c97d7c662 Allow displaying 0 rows in disp_dr.m 2016-05-20 12:42:43 +02:00
Johannes Pfeifer 2baf88da47 Remove adaptive_metropolis_hastings 2016-05-19 23:16:29 +02:00
Johannes Pfeifer 89fd14f026 Filter out unit root cases that lead to crashes 2016-05-19 18:57:47 +02:00
Johannes Pfeifer 1f71331e58 Fix dynareParallelGetFiles.m call to random_walk_metropolis_hastings 2016-05-19 17:43:48 +02:00
Johannes Pfeifer 12ee5b7276 Fix copyrights and references to random_walk_metropolis_hastings headers 2016-05-19 17:15:31 +02:00
Johannes Pfeifer 781ea45777 Remove old independent_metropolis_hastings routines 2016-05-19 14:37:05 +02:00
Johannes Pfeifer 3073988ac1 Fix vector dimension for independent_metropolis_hastings 2016-05-19 14:37:05 +02:00
Johannes Pfeifer 86fcde0879 Cosmetic changes to dynare_estimation_1.m and store_smoother_results.m 2016-05-19 14:37:05 +02:00
Johannes Pfeifer 4898a66d2a Allow passing of optim option for TaRB 2016-05-19 14:37:05 +02:00
Johannes Pfeifer 90ab263587 Fix location of TaRB options 2016-05-19 14:37:05 +02:00
Johannes Pfeifer 413a264b21 Make read_key_value_string.m compatible with sublists 2016-05-19 14:37:05 +02:00
Johannes Pfeifer 091f94221f Delete unused TaRB_metropolis_hastings_core.m 2016-05-19 14:37:05 +02:00
Johannes Pfeifer c7e8489481 Rename autocorr into dyn_autocorr.m as it does not mirror the behavior of the econometric toolbox function 2016-05-19 14:37:05 +02:00
Marco Ratto 1d6961cc4c initialize mode field in slice sampler options 2016-05-19 14:37:05 +02:00
Marco Ratto e5ab7ed992 fixed unknown options warning messages 2016-05-19 14:37:05 +02:00
Marco Ratto 088db78118 Document computation of Inefficiency factors 2016-05-19 14:37:05 +02:00
Marco Ratto ebe34bc40f Make display of inefficiency factors use existing table util [thanks to Johannes] 2016-05-19 14:37:05 +02:00
Marco Ratto 7b3c42c6e1 provisions for reworked posterior sampling options:
- handle sub lists of individual samplers
- split checks in dynare_estimation_init.m and before running posterior_sampler.m [invhess checks]
- posterior sampler options checks moved from initial_estimation_checks.m to check_posterior_sampler_options.m
- added use_mh_covariance_matrix to imh and rwmh
- slice re-sets mode_compute=0 cova_compute=0
- updated test function
2016-05-19 14:37:05 +02:00
Houtan Bastani cf6e3cb14c preprocessor: rework posterior sampler options, #1177 2016-05-19 14:37:05 +02:00
Marco Ratto 35a1c7ac17 Commented options for slice sampler, including default values and associated restrictions/default for main options_ fields 2016-05-19 14:34:09 +02:00
Marco Ratto 9c62021d3c Move TaRB to posterior_sampler_iteration.m [PATCH from Johannes: thanks a lot] 2016-05-19 14:34:09 +02:00
Marco Ratto 0c01565298 Allow sampler specific options via optim;
bug fixes on options logic
2016-05-19 14:34:09 +02:00
Marco Ratto 22f51d1e75 moved autocorr to missing matlab econometrics toolbox [it is not in stats toolbox] 2016-05-19 14:34:09 +02:00
Marco Ratto 4445f17efa Manual merge with commit history of metropolis_hastings_initialization.m and random_walk_metropolis_hastings_core.m 2016-05-19 14:34:09 +02:00
Marco Ratto 357e3c2ac7 Make posterior_sampler_initialization.m compatible with new form of prior_draw.m 2016-05-19 14:34:09 +02:00
Marco Ratto 8e751be5ee bug fix for non integer Nc 2016-05-19 14:34:09 +02:00
Marco Ratto e69c5f6864 Bug fix for odd Nc 2016-05-19 14:34:09 +02:00
Marco Ratto 8bd963de64 Fill in posterior_mode with info from posterior samples. 2016-05-19 14:34:09 +02:00
Marco Ratto b830805cb6 Trap empty d [e.g. from slice sampler] 2016-05-19 14:34:09 +02:00
Marco Ratto a96dd5b964 for slice, always initialize empty invhess unless a new chain is initialized from a mode file 2016-05-19 14:34:09 +02:00
Marco Ratto 9089fc340c Initialize posterior_sampler_options. 2016-05-19 14:34:09 +02:00
Marco Ratto 46908d20c6 Provisions for new posterior sampler routines that factorize the individual iteration of individual samplers.
I contains a quick fix to adaptive_posterior_sampler.m, which cannot be embedded in the new structure.
2016-05-19 14:34:09 +02:00
Marco Ratto c30b6f20a6 Added routines that factor out posterior samplers into the iteration routine posterior_sampler_iteration.m.
It generalizes the random_walk_metropolis_hastings.m structure but adds two new items:
- check_posterior_sampler_options.m which is a wrapper for method specific options (stored in options_.posterior_options)
- posterior_sampler_iteration.m which is a wrapper of the individual iteration of any posterior sampler.

It already embeds, with parallelization implementation:
- random_walk metropolis hastings
- independent metropolis hastings
- slice sampler

It also contains a quick fix for TARB, although the latter should be embedded in posterior_sampler_iteration.m as well.

Any new posterior sampler can be simply added to posterior_sampler_iteration.m, with  wrapper to specific iterations in check_posterior_sampler_options.m
2016-05-19 14:34:09 +02:00
Marco Ratto b1b901fc61 Added SLICE sampler core routines 2016-05-19 14:34:09 +02:00
Marco Ratto 951dfe8ff4 When mh_posterior_mode_estimation, trap cases where the prior mode is at the boundary. 2016-05-19 14:34:09 +02:00
Marco Ratto a3ab6de6c8 Added function to compute of inefficiency factors, used in McMCDiagnostics.m
Requires missing autocorr (available in some MATLAB toolboxes).
Requires factor out CutSample in dynare_estimation_1.m
2016-05-19 14:34:09 +02:00
Johannes Pfeifer 0e2e1376c9 Fix bug in simulated moments
Closes #1105
2016-05-18 22:51:20 +02:00
Houtan Bastani 58eb60c95d fix copyright dates, headers 2016-05-18 15:06:49 +02:00
Houtan Bastani 6a0de7a724 Merge pull request #1189 from rattoma/gsa
gsa and identification fixes
2016-05-18 15:01:19 +02:00
Johannes Pfeifer c05c66cbaa Filter out error code 6 in dsge_var_likelihood.m
Crashes otherwise
2016-05-17 20:56:25 +02:00
Marco Ratto 42170c6c13 Fixes around models with unit roots. 2016-05-17 11:47:07 +02:00
Marco Ratto c9bc685049 Fix determination of full rank subspace of simulated moment uncertainty 2016-05-17 09:38:06 +02:00
Marco Ratto f0b346b397 added waitbar, to monitor computations [especially useful for large models] 2016-05-17 08:41:55 +02:00
Marco Ratto 7c8878c071 Allow neighborhood_width sampling in Morris + bug fix. 2016-05-17 08:41:16 +02:00
Marco Ratto 28aeb9f308 bug fix 2016-05-17 08:40:32 +02:00
Houtan Bastani 5723e7ea58 build system: remove support for 32-bit Matlab on OS X 2016-05-13 10:53:55 +02:00
Houtan Bastani 89667ea8da remove unused file. closes #1172 2016-05-11 15:12:27 +02:00
Michel Juillard 31f8d61586 make estimation honor steady state nocheck option 2016-05-10 15:54:11 +02:00
Houtan Bastani ccb197e74f fix copyright dates 2016-05-09 12:42:58 +02:00
Michel Juillard 5e5157e375 loglinear: bug correction 2016-05-06 10:12:12 +02:00
Michel Juillard 67ea280773 adding missing semi-colon 2016-05-06 10:11:53 +02:00
Michel Juillard ef232ac436 fixed log_variable function 2016-05-05 20:53:22 +02:00
Michel Juillard 3c7c2f46a4 more fixes for loglinear with lead/lagged exogenous variables 2016-05-05 20:41:02 +02:00
Michel Juillard 7e13fe5ef7 fix loglinear option with leaded or lagged exogenous variables 2016-05-05 20:41:02 +02:00
Stéphane Adjemian e07d97a16e Merge pull request #1186 from rattoma/gsa
gsa and identification fixes
2016-05-05 19:19:10 +02:00
Marco Ratto 1b769d1d5f 1) fixed bug with initialization of infox
2) distinguish between no solution (iwrong index) and violation of prior restrictions (inorestriction)
3) smirnov tests for indeterminacy and explosive roots should be done EXCLUDING no solution cases
2016-05-05 16:53:18 +02:00