Commit Graph

35 Commits (6adf1c26392d737dc31844aa3add0441e040f4a8)

Author SHA1 Message Date
Johannes Pfeifer 8da98057b9
Have computation of decision rules and smoother only input and output required arguments instead of full oo_ and M_ 2023-09-25 17:17:34 +02:00
Johannes Pfeifer 41ac891f80 Factorize variance decomposition code 2023-09-07 17:13:09 +02:00
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
It is now supported by the MATLAB editor (as of R2022a).

The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).

The particles submodule is not updated at this point, because it is in an
inconsistent state.

[skip ci]
2022-04-13 14:54:25 +02:00
Johannes Pfeifer f7a232061a
Remove unused options_-output
Prevents accidentally changing something
2021-06-22 18:17:11 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Selma Malmberg 9c6cc04b0d Use of the compute_decision_rules function to factorize code (Ref.#1173) 2021-05-20 11:36:29 +02:00
Sébastien Villemot 47477e152a
Bump minimal Octave version to 6.2.0 2021-03-12 16:21:57 +01:00
Johannes Pfeifer 1245d41a6a moments_varendo: store var_list in files
Allows identifying changes in var_list in the future
2021-01-25 15:56:44 +01:00
Sébastien Villemot c160d24074
Octave 6 implements intersect(…, 'stable')
[skip ci]
2020-11-30 18:26:50 +01:00
Johannes Pfeifer 6e06acc7f4 Fix moment computation with Measurement errors
- check logic for M_.H was faulty
- M_.H was not updated in posterior sampling
2020-06-29 13:20:02 +02:00
Sébastien Villemot 6e0f104d7e
Bump minimal MATLAB version to R2014a
Ref. #1713
2020-04-07 16:32:32 +02:00
Sébastien Villemot e93c7b6b25
Reorder files generated by “moments_varendo” option of “estimation”
If there were more than 10 files of Metropolis parameter draws, the ordering
the files containing the posterior moments could be different from that of the
parameter draws. This is because the “dir()” command was used to order the
files containing the parameter draws, and because the command uses alphabetic
ordering, file #10 would come before #2.

This commit enforces the numerical ordering of files.
2020-03-12 15:56:55 +01:00
Sébastien Villemot 49dc997073
Global reindentation of MATLAB code (excluding submodules)
Also convert to Unix end-of-lines, and remove trailing whitespaces.
2019-12-20 16:30:27 +01:00
Sébastien Villemot e48177543b
intersect(…, 'stable') was introduced in MATLAB R2013a
Re-use the existing Octave replacement by making it MATLAB-compatible.
2019-03-26 18:53:51 +01:00
Sébastien Villemot 0b1c465b38
Octave compatibility fix: intersect(..., 'stable')
The 'stable' option of intersect(), which keeps the element order of the first
argument, is not available on Octave. Provide a fallback implementation, and
adapt the code.
2019-02-15 18:43:19 +01:00
Johannes Pfeifer b333f6bf2b
Correctly update covariance matrix of shocks for posterior draws 2018-12-15 19:23:05 +01:00
Johannes Pfeifer a1222a1d1b Implement variance decomposition with measurement error 2017-10-05 11:33:17 +02:00
Johannes Pfeifer 8ab6c6ef98 Fix copy and past mistake in dsge_simulated_theoretical_variance_decomposition
Prevented correct deletion of stale prior MC files
2017-09-15 10:07:19 +02:00
Johannes Pfeifer 0b9244dc01 Posterior moments: fix bug that prevented updating decision rules for parameter vector, leading to wrong results/crashes when computing second moments
When removing globals in 24cd423671 the call to set_parameters.m, which relies on M_ being global, was not removed. The problem arises

1. When computing second moments for big models with drsize*SampleSize>MaxMegaBytes (in which case decision rules dr were not saved, but recomputed)
2. When computing the conditional variance decomposition for all models regardless of size (dsge_simulated_theoretical_conditional_variance_decomposition.m relied on the wrong M_.Sigma_e in this case)
2017-07-21 17:47:24 +02:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis) a53636e24e Fixed copyright notices. 2017-05-16 14:11:15 +02:00
Stéphane Adjemian (Charybdis) 88e1701289 Removed useless commas and semicolons. 2017-05-16 13:24:46 +02:00
MichelJuillard 4b3550efbc Merge pull request #691 from JohannesPfeifer/var_decomp_unit
Fix dsge_simulated_theoretical_variance_decomposition.m for non-stationa...
2015-07-20 14:03:22 +02:00
Johannes Pfeifer fa1f7794d5 Delete stale files from previous MCMC runs
Closes #566. Also adds cosmetic changes to headers of affected routines
2015-05-09 15:13:59 +02:00
Johannes Pfeifer fb17e0da36 Fix dsge_simulated_theoretical_variance_decomposition.m for non-stationary variables only
If all variables contain unit roots, dsge_simulated_theoretical_variance_decomposition.m crashes because tmp is NaN. Instead, the first draw is now checked for a unit root and a warning is displayed.
2014-07-16 16:52:02 +02:00
Michel Juillard bb6d3f539e fixing bug in writing variance decomposition files 2012-10-21 10:14:38 +02:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Sébastien Villemot a50e65fb6c Rename set_stationary_variables_list to get_variables_list
This function has nothing to do with stationary variables now that
unit_root_vars has been removed.

Closes: #218
2012-06-06 12:27:46 +02:00
Michel Juillard 7408714ea1 added dname as argument to CheckPath function and changed all calls to
this function. Suppressed use of globals in CheckPath.
2011-12-15 17:35:27 +01:00
Stéphane Adjemian (Scylla) 24cd423671 Removed globals from resol.m (changed calling sequence). Added texinfo header.
Removed trailing whitespace.
2011-09-17 12:53:38 +02:00
sebastien 502e3e1df8 Beautified MATLAB code (Unix newline convention + Emacs indentation), except: AIM, swz, particle
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3250 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:17:34 +00:00
stepan d6fe54dc18 + Bug fixes related to the computation of prior (and posterior) moments.
+ Cosmetic changes.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2791 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-26 10:21:30 +00:00
stepan f039875f60 + Various bug fixes related to prior sampling.
+ Removed globals in set_stationary_variables_list.m.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2771 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-15 14:36:30 +00:00
stepan e3043c4107 + Changed dsge_simulated_theoretical_*.m files. They can be used to compute the prior distribution
of second order moments and variance decompositions.
+ Changed calls to dsge_simulated_theoretical_* functions.
+ Fixed headers.
+ Cosmetic changes.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2759 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-11 14:39:52 +00:00
stepan b04e65196f Changed names of four functions (these functions will be used for posterior *and* prior sampling).
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2758 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-11 13:22:52 +00:00