Commit Graph

3712 Commits (4c9153650f950a9c76f9f7e9e6e92677eed7c4b4)

Author SHA1 Message Date
Stéphane Adjemian (Charybdis) 4c9153650f Cosmetic and efficiency changes. 2013-09-20 23:17:17 +02:00
Stéphane Adjemian (Charybdis) 15825c9034 Changed logic in numgrad2.
Do not compute the left derivative if the evaluation of the objective function at x+h returns a non zero cost_flag (ie a problem with BK, steady state, ...).
2013-09-20 23:17:17 +02:00
Stéphane Adjemian (Charybdis) d116fea0d9 Removed useless routines for gradient evaluation (called by csminwell). 2013-09-20 23:17:17 +02:00
Stéphane Adjemian (Charybdis) 22968497ad Fixed bug manifesting if a model is first estimated with cova_compute=0 and if the resulting mode file is loaded after.
Added condition on the existence of hh in the mode_file.
2013-09-19 15:25:23 +02:00
Stéphane Adjemian (Charybdis) b95f000d8f Added new routine to generate strings randomly. 2013-09-19 14:43:35 +02:00
Stéphane Adjemian (Charybdis) 9f63c4081f Fixed bug affecting fs2000/fs2000_calib.mod and shock_decomp_calibrated_model/example1_calib_shock_decomp.mod. 2013-09-18 11:38:58 +02:00
Stéphane Adjemian (Charybdis) 7dc6013eaa Added headers. 2013-09-18 11:34:10 +02:00
Stéphane Adjemian (Charybdis) a51d8bfe31 Added Baxter and King (1999) band pass filter for dynSeries objects. 2013-09-18 11:34:10 +02:00
Stéphane Adjemian (Charybdis) 07b50fd8b8 Added missing tag for triggering unitary tests. 2013-09-18 11:34:10 +02:00
Stéphane Adjemian (Charybdis) 52e5e44b1c Do not produce plot in dynSeries::hpcycle unitary test. 2013-09-18 11:34:10 +02:00
Stéphane Adjemian (Charybdis) ce4fe4113d Added methods in dynSeries class for filtering (hptrend and hpcycle). 2013-09-18 11:34:10 +02:00
Michel Juillard a29db4175d fixed bug with calibrated models in dyn_estimation_init.m introduced
in commit 952139b
2013-09-18 11:23:47 +02:00
Johannes Pfeifer ea69f50134 Improve display of posterior parameters and clarify use of HPD 2013-09-16 17:11:25 +02:00
Sébastien Villemot e123670675 Fix bug introduced in 952139b
The 'hh' variable is now always defined, so we now test if it is empty.
2013-09-13 18:23:24 +02:00
Stéphane Adjemian (Charybdis) 743252a571 Fixed typo.
Solves failing tests for dynSeries' constructor reported here:

http://www.dynare.org/stepan/dynare/tests/report-de590fb2f7dbe41b25097e12b09037a595f1b6d0.log
2013-09-12 10:56:05 +02:00
Houtan Bastani de590fb2f7 bug fix: include nofunctions in global_initialization.m 2013-09-11 14:09:22 -04:00
Stéphane Adjemian (Charybdis) 0ed35166de Added unitary tests (instantiation of the dynSeries class form an excel file).
(cherry picked from commit 84075cab81)
2013-09-11 17:25:07 +02:00
Stéphane Adjemian (Charybdis) 109066de2b Added the possibility to instantiate the dynSeries class from an excel (xls or xlsx) file.
Closes #348

(cherry picked from commit b7b4a9afdc)
2013-09-11 17:24:12 +02:00
Stéphane Adjemian (Charybdis) 952139bbc9 Changes related to the treatment of the (optionally) provided mode file.
(1) Added more checks on the content of the provided mode file compared the the list of declared parameters (the condition on the number of parameters is not strong enough).

(2) Added a mechanism to adapt the content of the mode file if possible. For instance, if the estimated parameters are a subset of the parameters in the mode file, we only need to discard some of the parameters in the mode file.

(3) Added output argument in dynare_estimation_init, which returns the hessian matrix (hh) with the estimated mode.
2013-09-10 22:25:16 +02:00
Stéphane Adjemian (Charybdis) afed204526 Cosmetic. Renamed hh (figure handle not to be confused hessian matrix) as fh. 2013-09-10 22:25:16 +02:00
Johannes Pfeifer ea5ee4722b Reintroduces nofunctions option mentioned in the manual that got somehow lost 2013-09-10 16:35:50 +02:00
Stéphane Adjemian (Charybdis) 2e2315611c Fixed bug (conversion of variable names in tex).
(cherry picked from commit 80218a1b65)
2013-09-09 12:16:19 +02:00
Stéphane Adjemian (Charybdis) f337c2b072 Fixed bugs (misuse of inputname function, as in commit #4ce2c3644af333733d802383559de8c0340213bd). 2013-09-07 14:31:50 +02:00
Stéphane Adjemian (Charybdis) 6b237eb6c2 Added method dynTimeIndex::mpower -> lead-lag operators à la G-M ;-).
This method can be used to apply the lead and lag methods an arbitrary number of times to a dynSeries object. For instance, if ts is a dynSeries object, and if we define

>> B = dynTimeIndex()-1;
>> F = dynTimeIndex()+1;

B and F can be used as lag and lead operators and the following syntax:

>> us = ts(F^2);

is equivalent to

>> us = ts.lead(2)

or

>> us = ts.lead.lead
2013-09-06 16:49:40 +02:00
Stéphane Adjemian (Charybdis) f14db386c6 Added missing case for set_names in subsref. This commit and the previous one fix the bug in @dynSeries::set_names method reported at http://www.dynare.org/stepan/dynare/tests/report-f4c01a43bc2882e7fd18f3cd82344fff9644088c.log. 2013-09-06 16:27:25 +02:00
Stéphane Adjemian (Charybdis) e641cdd455 Fixed unitary tests. If not specified, the name a variable in a dynSeries object is not '--NaN--' but 'Variable_xx' where x is the number of the variable. 2013-09-06 16:27:25 +02:00
Stéphane Adjemian (Charybdis) 4ce2c3644a Fixed bug (The argument of inputname must be the input argument number not the input argument itself). 2013-09-06 12:01:53 +02:00
Stéphane Adjemian (Charybdis) 23a6ad22dd Fixed bug causing unitary tests for dynSeries::plus and dynSeries::minus to fail.
See http://www.dynare.org/stepan/dynare/tests/report-f4c01a43bc2882e7fd18f3cd82344fff9644088c.log
2013-09-06 10:33:50 +02:00
Stéphane Adjemian (Charybdis) f4c01a43bc Introduce new syntax for shifting backward or forward a dynSeries object.
Suppose that ts is a dynSeries object and let

t = dynTimeIndex();

Then

us = ts.lag();  <=>  us = ts(t-1);

us = ts.lag(2);  <=>  us = ts(t-2);

us = ts.lead();  <=>  us = ts(t+1);

Added corresponding unitary test.
2013-09-05 17:46:04 +02:00
Stéphane Adjemian (Charybdis) fecb61421f Added new class (dynTimeIndex). 2013-09-05 17:38:51 +02:00
Stéphane Adjemian (Charybdis) feff44fe79 Added dynSeries::lead method. 2013-09-05 16:51:10 +02:00
Stéphane Adjemian (Charybdis) 1edb4c6d9a Added condition on dynSeries::lag method (input must be positive). 2013-09-05 16:50:27 +02:00
Stéphane Adjemian (Charybdis) 2975350319 Fixed typo (cosmetic). 2013-09-05 16:49:44 +02:00
Stéphane Adjemian (Charybdis) c9c0a25538 Added missing semicolon and deleted trailing whitespaces. 2013-09-05 12:31:37 +02:00
Stéphane Adjemian (Charybdis) 12fc7a4241 Cosmetic changes. Removed useless curly braces and deleted trailing white spaces. 2013-09-05 12:17:55 +02:00
Stéphane Adjemian (Charybdis) 02eb19fb49 Fixed bug. Added missing case for calls to the dynSeries::lag method. 2013-09-05 12:16:07 +02:00
Stéphane Adjemian (Charybdis) b76b0c8add Moved the commented first line, used to declare that the routine has unitary tests, after the declaration of the function, otherwise help is not displayed. 2013-09-05 11:34:19 +02:00
Stéphane Adjemian (Charybdis) 61c4244410 Added unitary test. 2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) 56be6eb463 Added new interface to dynDate. The constructor accepts a character ('Y', 'A', 'Q', 'M' or 'W') as the second input to specify the frequency instead of an integer (1, 4, 12, or 52). The following expressions are equivalent:
a = dynDate([1945 3],4);
a = dynDate([1945 3],'Q');
2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) d44732a8ca Fixed copy/paste typo in unitary test. 2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) 9a5749343c Added tests in dynDate constructor (when dynDate is called with two input arguments: time and frequency). 2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) a2d5873a3f Fixed typo (useless space). 2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) c47131f052 Cosmetic change. 2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) ce400706ef Added test for integer input (dynDate constructor with one numeric input). 2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) 0f10880d07 Added 'Y' or 'A' for yearly data in dynDate class.
Follwing expressions are equivalent:

a = dynDate('2009');
a = dynDate('2009y');
a = dynDate('2009a');
a = dynaDate(2009);
2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) 4dced05d1d Fixed typo. 2013-09-05 10:14:02 +02:00
Stéphane Adjemian (Charybdis) d0fed77f97 Added routine for testing if a string contains letter(s). 2013-09-05 10:14:02 +02:00
Sébastien Villemot 6183679fd9 Merge pull request #465 from JohannesPfeifer/conditional_variance_decomp
Bugfix for conditional variance decomposition
2013-09-04 02:21:40 -07:00
Johannes Pfeifer c2e6feeb75 Deletion of unused definition of H_is_diagonal
Cosmetic fix
2013-09-04 11:11:29 +02:00
Johannes Pfeifer e1a0fd0524 Bugfix for conditional variance decomposition
sigma_e_is_diagonal was erroneously set to 0 if the covariance matrix was diagonal, but contained a 0 on the main diagonal.
2013-09-04 11:11:14 +02:00