Marco Ratto
77e87be48b
try with base regime before returning error
2023-02-03 14:20:39 +01:00
Marco Ratto
22e6fb1814
make sure also ALL updated variables in period 1 are reconstructed with smoother_redux. test model changed accordingly.
2023-02-03 14:20:28 +01:00
Marco Ratto
7132cb593e
bug fix for init variables to be defined only with occbin PKF
2023-02-03 14:20:16 +01:00
Marco Ratto
50aa20c742
eliminate buggy and useless check for existence of guess regime variable. this may create bugs in running PKF update step!
2023-02-03 14:20:02 +01:00
Marco Ratto
e51a30eaf5
Bug fix for the case where no prior is defined for estim params
2023-02-03 14:19:50 +01:00
Marco Ratto
a346639020
when filter is NOT diffuse, allow likelihood to handle violation of constraints in period 1.
2023-02-03 14:19:28 +01:00
Marco Ratto
6598d615d1
in some cases, order is not yet set to 1
2023-02-03 14:19:16 +01:00
Marco Ratto
a91c36f920
first_period_occbin_update is an index, not a boolean
2023-02-03 14:19:05 +01:00
Marco Ratto
74acb2d1f5
bug fix using index t
2023-02-03 14:18:54 +01:00
Marco Ratto
21c9d59e8c
incorporate information about states in period 0 for occbin with smoother_redux
2023-02-03 14:18:32 +01:00
Marco Ratto
0622f01f4e
filter out t=1 when storing aalphahat and eetahat
2023-02-03 14:18:21 +01:00
Marco Ratto
b90dff1986
retrieve states in period 0 from smoother and deploy this to:
...
- allow having binding regimes in period 1 with occbin
- further improve recovering of smoothed variables in period 1 under smoother_redux option
2023-02-03 14:18:10 +01:00
Sébastien Villemot
5aca770931
perfect_foresight_with_expectation_errors_{setup,solver}: fix bugs with several exogenous
...
Closes : #1883
2023-01-24 15:02:07 +01:00
Sébastien Villemot
538f38d269
Merge branch 'occbin_debug' into 'master'
...
missing_observations_kalman_filter.m: provide debugging information on PKF problems
See merge request Dynare/dynare!2122
2023-01-23 10:39:17 +00:00
Johannes Pfeifer
4307711c60
missing_observations_kalman_filter.m: provide debugging information on PKF problems
2023-01-19 11:57:35 +01:00
Sébastien Villemot
cfaf5a685d
Preprocessor: actually obey the “mfs” option for the static model
...
As a consequence, fix steady state computation when mfs > 0.
2023-01-17 19:08:32 +01:00
Sébastien Villemot
8aabdaee9c
Consolidate functions for solving steady state with block and/or bytecode
2023-01-17 15:25:47 +01:00
Sébastien Villemot
7b6058509f
Drop unused function
2023-01-17 14:48:36 +01:00
Sébastien Villemot
005769210a
Drop unused function
2023-01-17 14:47:52 +01:00
Sébastien Villemot
5342476196
Drop unused function
2023-01-17 14:46:50 +01:00
Sébastien Villemot
023afc7ebb
Drop unused function
2023-01-17 14:46:46 +01:00
Sébastien Villemot
1c5c1639e1
Drop unused function
2023-01-16 14:38:09 +01:00
Sébastien Villemot
e5f100b152
Drop unused function
2023-01-16 14:38:06 +01:00
Sébastien Villemot
c187d0ead9
Drop unused function
...
It should probably have been removed in 9c6e219990
.
2023-01-16 14:38:03 +01:00
Sébastien Villemot
8f1a4cb363
Drop block-decomposed first-order perturbation solution and kalman filter
2023-01-13 16:57:49 +01:00
Stéphane Adjemian (Ryûk)
91dd917d62
Cosmetic/Efficiency changes.
...
- Use bsxfun for centering data if possible,
- Factorise LU decomposition,
- Remove useless operations during the presampling step.
2023-01-12 17:45:51 +01:00
Sébastien Villemot
e250067959
Use sparse representation for block-decomposed perfect foresight and steady state computation
...
Ref. #1859
2023-01-12 16:28:02 +01:00
Sébastien Villemot
3c55aa57e1
Use sparse representation for evaluating the static model
...
We also take advantage of the fact that the non-block version is always
available next to the block one, so when we are only interested in the residual
as a whole, we simplify by using the non-block version.
2023-01-10 16:21:44 +01:00
Sébastien Villemot
b343f0231d
Ensure that generated sparse MEX files are unloaded before the preprocessor is run
...
This workaround already existed for the legacy representation.
2023-01-10 16:07:29 +01:00
Johannes Pfeifer
0b0a4ef386
dsge_likelihood.m: flag analytical_derivation as incompatible with endogenous_prior
2023-01-09 17:57:18 +01:00
Sébastien Villemot
f84753025d
Bytecode: the block and non-block versions now coexist in parallel
...
As a consequence, a new “block_decomposed” option of the bytecode MEX has been
introduced to explicitly select the block-decomposed version.
Note that we do not always use the “block_decomposed” option even when the
“block” option has been passed to the user, in situations where the block
decomposition brings nothing (e.g. when evaluating the residuals of the whole
model).
2023-01-09 15:20:46 +01:00
Stéphane Adjemian (Ryûk)
b7693c3273
Add routine for conditional likelihood (first order).
2023-01-06 14:57:45 +01:00
Sébastien Villemot
f93a7f7192
Merge branch 'disp_aux_4' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2118
2023-01-04 10:59:21 +01:00
Johannes Pfeifer
45450651a2
model_info.m: fix display of block decomposition
2023-01-03 16:17:43 +01:00
Sébastien Villemot
ead9023cec
Merge branch 'steady_nan' into 'master'
...
steady state computation: trap cases where parameters are NaN
See merge request Dynare/dynare!2119
2023-01-03 11:24:26 +00:00
Stéphane Adjemian (Guts)
5b72a3041c
Use new unit tests interface.
2023-01-02 22:58:20 +01:00
Johannes Pfeifer
64d61c3268
steady state computation: trap cases where parameters are NaN
2022-12-28 11:48:23 +01:00
Johannes Pfeifer
1866286fb8
subst_auxvar.m: correctly take care of exo leads and lags
2022-12-21 11:16:41 +01:00
Johannes Pfeifer
1219f085e7
disp_dr.m: fix display for type 4 auxiliaries
2022-12-20 13:06:05 +01:00
Stéphane Adjemian (Ryûk)
aee541aabe
Update dseries submodule.
2022-12-15 17:25:29 +01:00
Johannes Pfeifer
a4634cd1b7
dynare_estimation_init.m: set observable mapping for inversion filter if only smoother is used
2022-12-09 13:19:32 +01:00
Johannes Pfeifer
e7ca989b21
prior_posterior_statistics.m: fix logical condition
2022-12-05 14:52:03 +01:00
Johannes Pfeifer
9de0688cfe
Make default jscale depend on number of estimated parameters
...
Related to https://git.dynare.org/Dynare/dynare/-/issues/1849
2022-12-03 16:00:27 +01:00
Sébastien Villemot
d574705b4a
Design and performance improvement to solve_algo={12,14}
...
Use the new time-recursive block decomposition computed by the preprocessor
for:
- the simulation of backward models with “simul_backward”
- the perfect foresight simulation of purely backward/forward/static models
Also note that in this case, the preprocessor now defaults to “mfs=3” (i.e. it
minimizes the set of feedback variables and tries to renormalize equations).
This replaces the previous algorithm based on Dulmage-Mendelsohn (dmperm), plus
an ad hoc identification of some equations that can be evaluated (those with a
LHS equal to a variable, the log of a variable, or the diff-log of a variable).
By the way, the block_trust_region MEX has been modified so that it accepts a
boolean argument to decide whether it performs a Dulmage-Mendelsohn
decomposition (if not, then it performs a simple trust region on the whole
nonlinear system).
This provides a significant performance improvement (of almost an order of
magnitude for solve_algo=14 on a 700 equations model).
2022-11-30 14:47:57 +01:00
Johannes Pfeifer
bbdcdc89a2
sim1.m: use operation that preserves sparsity
2022-11-28 16:20:44 +01:00
Sébastien Villemot
ba9b0e9829
Merge branch 'occbin_IVF' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2019
2022-11-28 11:05:03 +01:00
Stéphane Adjemian (Charybdis)
3aeb1ff7e3
Fix pac.estimate.iterate_ols.
...
Was crashing if the auxiliary model contains a constant.
See https://forum.dynare.org/t/iterative-ols-for-pac-equation/21379 .
2022-11-24 16:29:49 +01:00
Johannes Pfeifer
26fbc6c56d
IVF: improve error handling
2022-11-23 16:46:40 +01:00
Johannes Pfeifer
80f6799c38
IVF: only store smoother results if requested
2022-11-23 16:44:18 +01:00
Johannes Pfeifer
1e2fb88d32
IVF: fix error handling for smoother
2022-11-23 15:37:12 +01:00
Johannes Pfeifer
eeecccd29b
IVF_core.m: fix header
2022-11-23 15:18:44 +01:00
Johannes Pfeifer
2c879cc64c
compute_trend_coefficients.m: fix header
2022-11-18 22:04:07 +01:00
Marco Ratto
178e892e04
big fix for initialization of diffuse filter with correlated observation error covariance matrix
2022-11-18 12:41:15 +01:00
Marco Ratto
81ba952414
big fix in diffuse filter initialization: incorrect mapping of observables when removing zero columns of T
2022-11-18 10:52:37 +01:00
Sébastien Villemot
3184db12f2
Merge branch 'occbin_smoother' into 'master'
...
OccBin Smoother: do not write non-converged results to oo_
Closes #1863
See merge request Dynare/dynare!2100
2022-11-16 18:40:05 +00:00
Johannes Pfeifer
4d603fb335
OccBin Smoother: do not write non-converged results to oo_
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1863
2022-11-16 17:13:08 +01:00
Marco Ratto
03f93c5329
bug fix with steady state when plotting the expand of groups of shocks
2022-11-15 23:10:38 +01:00
Marco Ratto
b0ce054c00
missing line that stores info on violation of constraint in expectation (needed to check for periodic solutions)
2022-11-15 23:09:48 +01:00
Sébastien Villemot
7075e05ddf
Merge branch 'cosmetic' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2096
2022-11-07 14:21:26 +01:00
Sébastien Villemot
d602453bb6
CI: bump to Octave 7.3.0
2022-11-07 14:11:27 +01:00
Johannes Pfeifer
5dbbe6d72c
compute_Pinf_Pstar.m: fix header
2022-11-07 10:12:34 +01:00
Sébastien Villemot
b336fbeb0d
Merge branch 'occbin_features' of git.dynare.org:rattoma/dynare
...
Ref. !2094
2022-11-04 14:59:06 +01:00
Marco Ratto
a1e0c35c1f
bug fix when max_check_ahead_periods interacts with curb_retrench
2022-11-04 11:20:52 +01:00
Marco Ratto
2f23604824
new option max_check_ahead_periods (renaming old undocumented option max_periods), that truncates the number of periods for which agents check ahead the regime (a sort of myopic behavior beyond max_check_ahead_periods),
...
the option is valid for simul, smoother and likelihood.
2022-11-04 11:17:37 +01:00
Sébastien Villemot
ee200a03b8
isoctave: performance improvement
...
Explicitly specify that OCTAVE_VERSION is a builtin. Otherwise the call to
“exists” will look for a file, among other things, which takes a lot of time.
2022-11-02 17:54:58 +01:00
Sébastien Villemot
720de52702
Make get_equation_number_by_tag more robust
...
The implementation was relying on the fact that in M_.equations_tags, all
equations have a name tag and they appear in the order given by equation
numbers. There is no guarantee that this will always be the case, so use a more
robust approach.
By the way, improve the implementation of get_equation_name_by_number.
2022-10-26 14:18:59 +02:00
Sébastien Villemot
5f6946a1b9
Display equation names in “model_info” command
2022-10-25 18:41:17 +02:00
Sébastien Villemot
befc6f59b9
Improve comments
...
[skip ci]
2022-10-24 18:05:15 +02:00
Marco Ratto
e31b313776
cosmetic change
2022-10-20 19:09:52 +02:00
Marco Ratto
d0150997f6
accept periodic solution in simulations ONLY IF two regimes differ by one period, to avoid pathological solutions.
...
We also do not check for periodicity when check ahead periods have been increased endogenously, again to avoid mis-identified periodicity.
Any other type of periodicity, is flagged as non-convergence with error code 313 (infinite loop of solutions).
2022-10-20 16:13:34 +02:00
Marco Ratto
2ccd3d4a0e
if max_periods is set to finite number, enforce algorithm to check ahead ONLY until max_periods (i.e. when we want agents to be myopic beyond some future period)
2022-10-20 16:11:01 +02:00
Marco Ratto
3765ef77cd
add option reset_check_ahead_periods_in_new_period:
...
when performing stochastic simulations, check ahead periods may increase endogenously at some point for regimes very long in expectation. such longer check ahead periods may considerably slow down convergence in subsequent periods, so users may want to avoid this.
2022-10-20 16:10:14 +02:00
Marco Ratto
f8adfa3fa5
with smoother_redux, factor out definition of nk to reconstruct filtered variables, and use a local variable nk (so options_.nk may remain empty).
2022-10-20 15:30:37 +02:00
Marco Ratto
bb9e45d0d0
max size for QMC is 1111
2022-10-20 15:14:39 +02:00
Marco Ratto
1a46c1dc89
impede prior_trunc=0 when doing sensitivity
2022-10-20 15:14:09 +02:00
Marco Ratto
eb41618614
trap errors also in univariate update step for occbin
2022-10-20 15:06:36 +02:00
Marco Ratto
ce21248e97
set noprint = true when simulating, to avoid crashes; only save info1 file under debug option
2022-10-20 15:06:26 +02:00
Marco Ratto
eb6f17e783
check if initial states are empty, and set them to zero.
2022-10-20 15:05:39 +02:00
Johannes Pfeifer
cbbbdf4b3d
make_y_.m: fix interaction with steady_state_model
...
closes https://git.dynare.org/Dynare/dynare/-/issues/1866
2022-10-13 16:33:58 +02:00
Johannes Pfeifer
fe0606ae06
logarithmic_reduction.m: use positive penalty add-on
2022-10-11 16:13:03 +02:00
Johannes Pfeifer
5226db4b3c
logarithmic_reduction.m: add missing error codes
2022-10-11 16:12:03 +02:00
NormannR
afb044c23e
Fix cycle reduction:
...
(i) making the norms consistent between cycle_reduction and its test;
(ii) remove hard errors in cycle_reduction Fortran and Matlab routines
2022-10-11 12:11:30 +02:00
NormannR
855887b249
Implements a logarithmic reduction Fortran routine and the associated test
2022-10-11 12:11:06 +02:00
NormannR
3ea0baf21e
Matlab logarithmic reduction: making norms and error codes consistent with cyclic reduction codes
2022-10-11 09:51:22 +02:00
Sébastien Villemot
e8444c16a7
Merge branch 'kalman_algo_3' into 'master'
...
kalman_update_algo_3.m: correct options name
See merge request Dynare/dynare!2090
2022-10-10 15:36:03 +00:00
Johannes Pfeifer
95a15815a8
kalman_update_algo_3.m: correct options name
2022-10-08 18:01:05 +02:00
Johannes Pfeifer
7874c302a0
Cycle reduction: account for new error codes
2022-10-03 17:15:20 +02:00
Sébastien Villemot
5b8fee5237
Merge branch 'cycle_reduction_fortran' of git.dynare.org:normann/dynare
...
Ref. !2085
2022-10-03 14:40:55 +02:00
Normann Rion
d17204cc84
Implements a cycle reduction Fortran routine and the associated test.
...
The Fortran routine replaces the former Matlab code in matlab/cycle_reduction.m
2022-10-03 14:38:12 +02:00
Sébastien Villemot
2ab174aa8c
Merge branch 'cosmetics' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2087
2022-10-03 14:31:35 +02:00
Sébastien Villemot
9938f08790
Merge branch 'occbin_error' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2086
2022-10-03 14:31:02 +02:00
Normann Rion
7af14aaa0d
Fix cycle_reduction.m:
...
- a condition of an if-then-else block is never fulfilled
- dimensions are inconsistent in the solution-check output message
2022-10-03 11:21:15 +02:00
Johannes Pfeifer
d5d3e9060b
calibrate_mh_scale_parameter.m: fix typo in error message
...
[skip CI]
2022-09-30 14:01:34 +02:00
Johannes Pfeifer
5defbdeb92
dsge_likelihood.m: add missing penalty for Occbin
2022-09-30 09:55:00 +02:00
Normann Rion
1b12d9e44b
Fixes local_state_space_iteration_3_test: sets a default value for the number of threads local_state_space_iteration_3 may use
2022-09-27 11:03:36 +02:00
Sébastien Villemot
39ac1f7628
Particles submodule update
...
This should have gone into !2071 .
2022-09-26 17:55:36 +02:00
NormannR
4cdb763ea4
Integrates the local_state_space_iteration_3 mex into dynare's bayesian estimation eco-system
...
Should be merged after the mex MR !2045 and the particles MR !16
2022-09-26 09:14:34 +02:00
Sébastien Villemot
755c5645a6
Merge branch 'irf' into 'master'
...
Fix posterior IRF generation with loglinear option
See merge request Dynare/dynare!2083
2022-09-21 15:44:11 +00:00
Stéphane Adjemian (Ryûk)
9ea8e17ff2
Update dseries submodule.
...
Add function returning dummy variable in a dseries object.
2022-09-21 10:56:53 +02:00
Johannes Pfeifer
ee8dfb76c4
Fix posterior IRF generation with loglinear
...
The unlogged steady state was used for both the starting value and the baseline
2022-09-21 10:14:23 +02:00