Johannes Pfeifer
a27bc872ad
execute_prior_posterior_function.m: move error in correct, transform error into warning
2021-08-17 11:06:01 +02:00
Johannes Pfeifer
0b491b3b09
Estimation: fix header column widths in display of results
2021-08-17 10:57:53 +02:00
Johannes Pfeifer
e944b783b9
method_of_moments: move to separate namespace
2021-08-16 14:08:31 +02:00
Johannes Pfeifer
341aca25ad
Liu West: Remove redundant option
2021-08-16 12:34:10 +02:00
Johannes Pfeifer
bfd92e79a7
Occbin: udpate options
2021-08-16 11:37:53 +02:00
Stéphane Adjemian (Charybdis)
1c54eb21d2
Cosmetic change (remove trailing spaces).
2021-08-16 11:19:28 +02:00
Willi Mutschler
a5995aec03
MoM: Check availability of optim toolbox for default mode_compute
...
lsqnonlin is an optimization algorithm that is specifically well suited for minimizing quadratic objectives, so I would like to have it as default. However, we fallback to csminwel if the optimization toolbox for Matlab or optim for Octave are not available.
2021-08-16 10:58:35 +02:00
Willi Mutschler
31f3bfa3d0
MoM: Changed some defaults and cosmetical changes
...
//wip
2021-08-16 10:58:35 +02:00
Willi Mutschler
fdba1170ae
MoM: Refactor check for duplicate moments, fix display of results
...
As we have a working interface now, this commit improves the provisional handling of finding duplicate moments. Previously, indices for GMM were created, but this is not really needed. This commit cleans this up and similar to SMM makes use of the matched_moments block.
As a by-product of the previous provisonal handling higher-order moments for SMM where not correctly displayed as no labels were created. This is now fixed. The comparison of data moments and estimated model moments is also in the same ordering as the inputed orthogonality conditions in matched_moments.
Signed-off-by: Willi Mutschler <willi@mutschler.eu>
2021-08-16 10:58:35 +02:00
Johannes Pfeifer
3c02d0c5b0
Occbin: remove redundant output
2021-08-10 13:54:59 +02:00
Stéphane Adjemian (Ryûk)
ebfa72740f
Changed default for initial step bound factor.
...
Should fix simulation failure in pac/trend-component-10/example1, that
seems to be caused by a too large value of this parameter.
2021-07-24 12:20:29 +02:00
Stéphane Adjemian (Ryûk)
873a9b1a38
Fix call to solve1 routine.
2021-07-23 22:16:43 +02:00
Stéphane Adjemian (Ryûk)
993872d5af
Update dseries submodule (track master branch).
2021-07-23 20:39:00 +02:00
Stéphane Adjemian (Ryûk)
0d092a36a0
Acknowledge option trust_region_initial_step_bound_factor in matlab based trust_region routine.
2021-07-23 19:44:16 +02:00
Stéphane Adjemian (Ryûk)
e72dde69d3
Add option for trust region algorithm (mex).
...
trust_region_initial_step_bound_factor is determinining thye initial
step bound. Default value is 100 (previous hard coded value was 1).
2021-07-23 19:44:16 +02:00
Sébastien Villemot
b34be496c5
Merge branch 'evaluate_planner' into 'master'
...
evaluate_planner_objective.m: correctly rely on lag/lead structure for perfect foresight
See merge request Dynare/dynare!1890
2021-07-23 14:01:22 +00:00
Johannes Pfeifer
440a0e460b
Storage of results: use subfolder
...
Ref. #1758
2021-07-23 14:12:17 +02:00
Johannes Pfeifer
e09d215964
evaluate_planner_objective.m: correctly rely on lag/lead structure for perfect foresight
...
Also cosmetic changes to indentation
2021-07-23 13:27:30 +02:00
Johannes Pfeifer
3d5601caec
check_model.m: fix logic of check for non-contemporaneous variables and remove redundant checks
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1792
2021-07-23 11:25:43 +02:00
Sébastien Villemot
41814becf1
Merge branch 'moments_varendo' into 'master'
...
dsge_simulated_theoretical_correlation/dsge_simulated_theoretical_covariance:...
Closes #1769
See merge request Dynare/dynare!1888
2021-07-22 16:25:01 +00:00
Johannes Pfeifer
4d43e1850d
dsge_simulated_theoretical_correlation/dsge_simulated_theoretical_covariance: only do computations once
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1769
2021-07-22 17:03:27 +02:00
Sébastien Villemot
3206ea9684
Merge branch 'evaluate_planner_objective' into 'master'
...
Streamline evaluate planner objective
See merge request Dynare/dynare!1887
2021-07-22 14:42:22 +00:00
Johannes Pfeifer
11c75592fb
evaluate_planner_objective.m: compute required moments directly
2021-07-22 15:01:15 +02:00
Sébastien Villemot
8b8f919a0f
Merge branch 'smoother2histval' into 'master'
...
Improvements for smoother2histval
See merge request Dynare/dynare!1886
2021-07-22 12:03:59 +00:00
Johannes Pfeifer
3fb41e075f
Matlab implementation of the consider_all_endogenous_and_auxiliary option
2021-07-22 13:12:27 +02:00
Johannes Pfeifer
a04c348d73
smoother2histval.m: provide warning when smoothed variables are missing
2021-07-22 12:22:18 +02:00
Sébastien Villemot
0e793faeb2
Merge branch 'pf_options' into 'master'
...
Particle filter: enable passing of option values and prepare for other samplers
Closes preprocessor#59
See merge request Dynare/dynare!1884
2021-07-22 09:50:10 +00:00
Johannes Pfeifer
80cad32068
Particle filter: enable passing of option values and prepare for other samplers
2021-07-21 23:00:32 +02:00
Sébastien Villemot
dc45ac6361
Merge branch 'master' into 'master'
...
occbin fixes and two small new features
See merge request Dynare/dynare!1883
2021-07-21 18:21:16 +00:00
Marco Ratto
4caebd76c9
added 2 new occbin.simul options (defaults preserve current behavior):
...
1) algo_truncation: sets the number of iterations for a truncated guess-verify algorithm (i.e. if max_iter<=algo_truncation, no error is triggered on output, but the user is happy with the last regime in the algorithm)
2) reset_regime_in_new_period: is set to true, it resets the guess regimes to unconstrained when a new shock arrives, instead of starting with a guess regime consistent with the one identified in previous time periods. this sometimes allows more robust convergence/identification of the regimes
2021-07-21 18:03:23 +02:00
Stéphane Adjemian (Ryûk)
cd2ed823b6
Fix constant in VAR and PAC expectations...
...
When the VAR auxiliary model has a constant.
2021-07-21 18:02:11 +02:00
Stéphane Adjemian (Ryûk)
a69f68bb7c
Modify companion matrix if VAR model has a constant.
2021-07-21 18:02:04 +02:00
Marco Ratto
ebdfcc80ec
fixed bug introduced in 229282a1c4
2021-07-21 17:59:01 +02:00
Marco Ratto
c48f737633
make header names compatible with earlier versions of MATLAB (e.g. it would crash with MATLAB 2017b)
2021-07-21 17:51:05 +02:00
Marco Ratto
85e35b1654
1) if not using relaxation, initial guess regime in verify step(occbin simul) is set equal to the guess regime used to updated states and shocks
...
2) fixed treatment of periodic solution in algo=3, now harmonized to algo=1
2021-07-21 17:51:03 +02:00
Marco Ratto
d3e5e7b8ef
Initialize state space matrices with occbin smoother, when realtime regimes are computed, otherwise they are set to 0 for t<first_period_occbin_update!
2021-07-21 17:51:00 +02:00
Marco Ratto
bec52fe731
with occbin smoother do not overwrite updated variables that have been already computed with reduced state space
2021-07-21 17:50:58 +02:00
Sébastien Villemot
4c94da514e
CI: bump to Octave 6.3.0
2021-07-21 17:29:12 +02:00
Sébastien Villemot
1045c442a9
Merge branch 'occbin_mean' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1882
2021-07-21 16:42:00 +02:00
Sébastien Villemot
a142907e44
Particles / Alternative samplers: header fixes and indentation
2021-07-21 16:37:56 +02:00
Johannes Pfeifer
944bf2b68e
occbin: work with non-demeaned data and in constraints
2021-07-21 13:42:38 +02:00
Sébastien Villemot
229282a1c4
Occbin: the +<basename>/occbin_difference.m file is now generated by the preprocessor
...
Some fields have also changed under M_.occbin.
Ref. #569
2021-07-20 12:35:15 +02:00
Sébastien Villemot
d5c35e3664
Occbin: fix function header
2021-07-19 15:30:54 +02:00
Marco Ratto
02072dde39
Add Occbin routines
...
Syntax is not yet finalized (see preprocessor#68).
Documentation still to be done.
Ref. #569
2021-07-16 17:20:11 +02:00
Stéphane Adjemian (Ryûk)
54f80e88d2
Add structural VAR as an auxiliary model for VAR based expectations and PAC expectations.
...
Ref. #1785
Just add option `structural` to the `var_model` command.
2021-07-16 10:25:18 +02:00
Stéphane Adjemian (Ryûk)
1d60c271d7
Add trap if equation has leads.
...
NLS estimation does not work if the equation has expected variables.
2021-07-15 17:36:02 +02:00
Stéphane Adjemian (Ryûk)
4b7a0ee29e
Change definition of islaggedvariables.
...
Previous definition could detect lags in an equation without any lag, for
instance if we have the following expression in the RHS: +(-1)*x.
2021-07-15 17:31:55 +02:00
Stéphane Adjemian (Ryûk)
14bc82b287
Add single equation estimation by NLS.
...
Ref. #1798 .
See example in tests/estimation/example_nls.mod.
2021-07-15 16:55:49 +02:00
Johannes Pfeifer
b2c6a6f7a1
initial_estimation_checks.m: error out if data is complex
...
Prevents cryptic message that likelihood became complex
2021-07-14 19:30:50 +02:00
Stéphane Adjemian (Ryûk)
2b4572affd
Allow arbitrary nonzero mean exogenous variables in PAC equations.
...
Previously any nonzero mean exogenous variable had to be centered on
the growth rate (first difference) of the (PAC's LHS) endogenous
variable.
2021-07-11 17:06:53 +02:00
Stéphane Adjemian (Ryûk)
d9298ca03a
Bug fix, wrong definition of the growth neutrality correction...
...
In PAC equations with optimizing and rule of thumb agents (division
by lambda was missing). Also add comments.
2021-07-11 17:06:53 +02:00
Sébastien Villemot
abd64c256e
New perfect_foresight_with_expectation_errors_{setup,solver} commands
...
These command solve the problem where agents think they know perfectly the
future (they behave as in perfect foresight), but make expectation errors.
Hence they can potentially be surprised in every period, and their expectations
about the future (incl. the final steady state) may change.
Currently the sequence of information sets needs to be passed through a CSV
file. Another interface may be added in the future.
The algorithm uses a sequence of (true) perfect foresight simulations (not
necessarily as many as there are periods, because if the information set does
not change between two periods, there is no need to do a new computation).
There are two possibilities for guess values:
— the default is to use the initial steady state for the simulation using the
first-period information set; then use previously simulated values as guess
values
— alternatively, with the terminal_steady_state_as_guess_value option, use the
terminal steady state as guess value for all future periods (this is actually
what the “true” perfect foresight solver does by default)
2021-07-09 18:16:46 +02:00
Stéphane Adjemian (Ryûk)
fe63082c42
Add lagged information set in VAR based expectations.
2021-07-06 23:06:46 +02:00
Johannes Pfeifer
f7a232061a
Remove unused options_-output
...
Prevents accidentally changing something
2021-06-22 18:17:11 +02:00
Sébastien Villemot
43607acf38
Merge branch 'resolveheader' of git.dynare.org:JohannesPfeifer/dynare
...
See merge request !1875
2021-06-16 17:41:40 +02:00
Sébastien Villemot
18a172bd45
Merge branch 'mcp_ramsey' of git.dynare.org:JohannesPfeifer/dynare
...
See merge request !1874
2021-06-16 17:41:40 +02:00
Sébastien Villemot
820df39ff7
Compatibility fix for MATLAB < R2019b
...
MATLAB < R2019b does not accept “bar(1, [2 3])”.
2021-06-16 17:41:40 +02:00
Johannes Pfeifer
1d10659b59
get_complementarity_conditions.m: fix equation numbering with ramsey_model
...
M_.equation_tags already contains the correct equation number
2021-06-16 13:21:49 +02:00
Johannes Pfeifer
32e1f34579
dynare_resolve.m: correct header and change naming of globals
2021-06-16 13:17:29 +02:00
Stéphane Adjemian (Ryuk)
8611143409
Updated particles submodule (fix for the online filter).
2021-06-15 22:09:35 +02:00
Normann Rion
3d27672c58
kth-order approximation of conditional welfare
...
Partially addresses issue #1680 :
- unconditional welfare resorts to dynare++ simulation tools, which shall be updated very soon
TO DO:
- implement a function computing kth-order approximation of simulated moments of y
2021-06-15 15:04:31 +02:00
Stéphane Adjemian (Ryuk)
edeb7911f3
Fix bug (initial period in extended path).
...
extended_path was crashing in preceeded by a call to the set_time command.
2021-06-15 14:24:38 +02:00
Sébastien Villemot
be38866487
Fix handling of heteroskedastic_shocks block with several declared periods
...
Closes : #1791
2021-06-15 12:54:54 +02:00
Johannes Pfeifer
e5b51f3257
DsgeSmoother.m: header cosmetics
...
[skip CI]
2021-06-15 11:16:41 +02:00
Sébastien Villemot
6258699060
Merge branch 'disclyap' of git.dynare.org:JohannesPfeifer/dynare
...
See merge request !1872
2021-06-14 15:29:01 +02:00
Sébastien Villemot
68bca0cd2a
Merge branch 'pruned_state_space' into 'master'
...
pruned_state_space: handle shocks with 0 variances
See merge request Dynare/dynare!1871
2021-06-14 10:37:45 +00:00
Johannes Pfeifer
e8c3758fc7
disclyap_fast.m: fix check for convergence with NaN
...
[skip CI]
2021-06-11 14:22:10 +02:00
Johannes Pfeifer
0116870399
pruned_state_space: handle shocks with 0 variances
2021-06-11 14:15:31 +02:00
Sébastien Villemot
45933779a4
Merge branch 'simult_' into 'master'
...
simult_.m: fix error message at order>3
See merge request Dynare/dynare!1870
2021-06-10 15:24:45 +00:00
Johannes Pfeifer
907066ae95
simult_.m: fix error message at order>3
2021-06-10 14:40:19 +02:00
Sébastien Villemot
766fff88f6
Use secure URL for link to GNU licenses
2021-06-09 17:35:05 +02:00
Sébastien Villemot
4733d97ceb
dseries: fix concatenation with empty dates objects
2021-06-09 17:33:25 +02:00
Sébastien Villemot
04c3fb3a31
Merge branch 'slice_record' of git.dynare.org:JohannesPfeifer/dynare
...
See merge request !1869
2021-06-09 14:41:03 +02:00
Johannes Pfeifer
f38a1edaee
posterior_sampler.m: trap case where record.ProposalCovariance is not filled (slice sampler)
2021-06-08 21:03:08 +02:00
Johannes Pfeifer
e546d686eb
dynare_solve.m: allow calling function directly
2021-06-04 21:24:53 +02:00
Johannes Pfeifer
4e0f2bf695
dynare_solve.m: have csolve honor selected options
2021-06-02 16:21:16 +02:00
Johannes Pfeifer
f4c0781f45
calibrate_mh_scale_parameter.m: Expand header
2021-06-01 11:34:39 +02:00
Johannes Pfeifer
f51a57374a
mh_tune_jscale: fix display of stepsize and provide warning if no updating can occur.
2021-06-01 11:23:07 +02:00
Johannes Pfeifer
fad86785da
evaluate_planner_objective.m: do not evaluate non-existing terms for linear models
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1781
2021-05-28 17:00:44 +02:00
Stéphane Adjemian (Charybdis)
27ee801a67
Add specialized version of sim1 for static models.
...
Also add an integration test and fix homotopy error message.
2021-05-28 14:11:34 +02:00
MichelJuillard
5ab724d38f
Following a change in the calling sequence. Fixes #1789
2021-05-28 13:49:58 +02:00
Stéphane Adjemian
77612e6bb7
Merge branch 'particle' into 'master'
...
non_linear_dsge_likelihood.m: filter out explosive initial simulation
See merge request Dynare/dynare!1861
2021-05-28 11:42:24 +00:00
Johannes Pfeifer
f97c138685
sim1_purely_backward.m: for purely static model, do not use past value for first iteration
...
Index 0 does not exist.
2021-05-27 22:37:45 +02:00
Johannes Pfeifer
cac6f82e34
non_linear_dsge_likelihood.m: filter out explosive initial simulation
2021-05-27 21:04:35 +02:00
Sébastien Villemot
abe8a05b43
Merge branch 'smoother_redux' into 'master'
...
Implement new option smoother_redux, to allow fast smoother for very large...
See merge request Dynare/dynare!1859
2021-05-27 16:33:21 +00:00
Sébastien Villemot
c4e0cd0565
Merge branch 'posterior_smoother' into 'master'
...
prior_posterior_statistics_core.m: filter out cases where model does not solve
See merge request Dynare/dynare!1860
2021-05-27 16:09:19 +00:00
Marco Ratto
5fa6265944
Implement new option smoother_redux, to allow fast smoother for very large models. It runs smoother only for state variables and computes the remaining ones ex-post
...
Contains improvements, in order to recover as much as possible static unobserved (filtered, smoothed, updated, k-step ahead), Variance, State_uncertainty, k-step ahead variances trying to map lagged states onto current ones using pinv(T). This has exceptions (namely lagged shocks which are ONLY used to recover static NON observed variables). this exception is also trapped.
For such extensions we can only recover smoothed variables starting from d+1. Variances CANNOT be recovered for such variables (the smoother gives ZERO.)
2021-05-27 16:59:15 +02:00
Johannes Pfeifer
7541b1b116
prior_draw.m: cosmetic fix
2021-05-27 16:46:40 +02:00
Johannes Pfeifer
5d1d5b8a85
prior_posterior_statistics_core.m: filter out cases where model does not solve
...
Relax qz_criterium by factor of 10, when taking posterior subdraws. Also makes sure `prior` option works as intended.
2021-05-27 16:46:28 +02:00
Sébastien Villemot
ae574fff78
Merge branch 'diagnostics' into 'master'
...
model_diagnostics.m: only provide message if imaginary component reaches tolerance level
See merge request Dynare/dynare!1855
2021-05-27 14:23:55 +00:00
Stéphane Adjemian (Charybdis)
3e7cd877d3
Fix error message consistently with 2743ca8fd
.
...
[skip ci]
2021-05-26 19:11:01 +02:00
Stéphane Adjemian (Charybdis)
2743ca8fdb
Fix workspace if dynare is called from a function.
2021-05-26 19:07:44 +02:00
Marcoo Ratto
1645f38269
Implement heteroskedastic filter and smoother
2021-05-26 18:45:16 +02:00
Sébastien Villemot
ba3522a9ba
Merge branch 'compute_decision_rules' into 'master'
...
Use of the compute_decision_rules function to factorize code
See merge request Dynare/dynare!1856
2021-05-25 16:18:43 +00:00
Selma Malmberg
9c6cc04b0d
Use of the compute_decision_rules function to factorize code (Ref.#1173)
2021-05-20 11:36:29 +02:00
Johannes Pfeifer
7e72b52677
model_diagnostics.m: only provide message if imaginary component reaches tolerance level
2021-05-20 11:23:48 +02:00
Johannes Pfeifer
456dc86ad1
identification: support optimal policy
...
Related to https://git.dynare.org/Dynare/dynare/-/merge_requests/1837
2021-05-14 13:38:42 +02:00
Johannes Pfeifer
7d4b01883d
get_identification_jacobians.m: remove unnecessary reordering of equations
2021-05-14 13:35:01 +02:00
Johannes Pfeifer
c8bc12ab6c
forcst.m: fix case with measurement error
2021-05-12 17:44:35 +02:00
Sébastien Villemot
0d6bc47158
Merge branch 'rattoma/dynare-mh_initialize_from_previous_mcmc'
...
Ref. !1841
2021-05-11 18:51:57 +02:00