Commit Graph

194 Commits (90fa92f8a95b0908aeb49ec84bddd047afa83362)

Author SHA1 Message Date
Stéphane Adjemian (Charybdis) db485235b5 data, name and tex of the dynSeries class are also private members that cannot be overwritten.
(cherry picked from commit 609f94881f)
2013-09-24 16:47:52 +02:00
Stéphane Adjemian (Charybdis) 3dee1674d5 Added unitary tests.
(cherry picked from commit 667e308585)
2013-09-24 16:47:52 +02:00
Stéphane Adjemian (Charybdis) 2ae0812012 Added the possibility to overwrite the time and init member of a dynSeries object (not allowed for freq, nobs and vobs).
(cherry picked from commit b0d6e2b7b6)
2013-09-24 16:47:52 +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
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) 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) 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) 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) 5d5f6257d5 Do not display all the observations if a dynSeries object has more than forty observations. 2013-09-03 17:54:18 +02:00
Stéphane Adjemian (Charybdis) 686e3322e9 Added unitary test. 2013-09-03 16:39:13 +02:00
Stéphane Adjemian (Charybdis) 7dfbb903ea Check that size and save methods (dynSeries) come in last position. 2013-09-03 16:39:02 +02:00
Stéphane Adjemian (Charybdis) a15cf73a3e Changed the syntax so that the difference between calling a member or a method is more explicit (dynSeries). 2013-09-03 16:07:38 +02:00
Sébastien Villemot 6414889ee6 Remove spurious keyboard() call 2013-08-12 11:30:28 +02:00
Houtan Bastani 7d1899df20 dynSeries: fix scalar subtraction for octave 2013-07-22 17:02:13 -04:00
Houtan Bastani 2955232780 dynSeries: add scalar addition 2013-07-18 14:50:32 -04:00
Houtan Bastani 1853d20daf dynSeries: add scalar subtraction 2013-07-18 14:27:09 -04:00
Stéphane Adjemian (Charybdis) f2d0da4d80 Merge branch 'master' into experimental-unitary-tests 2013-07-05 14:28:56 +02:00
Stéphane Adjemian (Charybdis) 141d720b77 Fixed error in copyright. 2013-07-05 13:56:48 +02:00
Stéphane Adjemian (Charybdis) e9dca040a6 Added missing routine in commit c19905725fd91e91a7fb42437ff8155921a5b8bd. 2013-07-05 13:56:48 +02:00
Stéphane Adjemian (Charybdis) e75df484e9 Code factorization. 2013-07-05 13:56:48 +02:00
Stéphane Adjemian (Charybdis) 1657111fa8 Added tags for unitary tests. 2013-07-04 15:00:24 +02:00
Stéphane Adjemian (Charybdis) 45d7568712 Fixed typo. 2013-07-04 14:38:22 +02:00
Stéphane Adjemian (Charybdis) e69c7a68f4 Changed unitary tests (check also the number of observations). 2013-07-03 16:30:17 +02:00
Stéphane Adjemian (Charybdis) 0d366ea2cf Added overloaded vertcat method in dynSeries class.
*Exemple*

Suppose ts1, ts2, and ts3 are three dynSeries objects with the same variables. Then

ts4 = [ts1; ts2; ts3]

is a dynSeries object with the observations contained in ts1, ts2 and ts3 (in that order).
2013-07-03 16:25:33 +02:00
Stéphane Adjemian (Charybdis) 6db5ba51cb Added unitary tests. 2013-07-03 15:24:32 +02:00
Stéphane Adjemian (Charybdis) 1fce665e31 Cosmetic change. 2013-07-03 15:16:11 +02:00
Stéphane Adjemian (Charybdis) 0a544809b2 Fixed bug related to broadcasting in dynSeries objects. 2013-07-03 15:16:00 +02:00
Stéphane Adjemian (Charybdis) 55ea513f74 Added broadcasting when assigning new data to a dynSeries object.
*Examples*

 * ts.A(qq(1950,1):qq(1950,4)) = 1 will put ones for variable A in periods 1950Q1 to 1950Q4

 * ts{'A','B'}(qq(1950,1):qq(1950,4)) = 1 will put ones for variables A and B in periods 1950Q1 to 1950Q4

 * ts{'A','B'}(qq(1950,1):qq(1950,4)) = ones(4,1) will put ones(4,1) for variables A and B and sub-periods 1950Q1-1950Q4

 * ts{'A','B'}(qq(1950,1):qq(1950,4)) = ones(1,2) will put ones(1,2) for variables A and B and each period between 1950Q1 and 1950Q4
2013-07-03 14:54:05 +02:00
Stéphane Adjemian (Charybdis) 84522ce87f Fixed bug in @dynSeries/subsasgn that pops up when length(S) is equal to two and S(1).type is a dot.
Allows Syntax like:

ts.A1(rg) = B

where ts is a dynSeries object, A1 is a variable in the database, rg is a dynDates object and B an array of doubles.
2013-07-03 11:59:52 +02:00
Stéphane Adjemian (Charybdis) 627dda5fc0 Added error message if @dynSeries/dynSeries is called with an empty string. 2013-07-03 10:59:50 +02:00
Stéphane Adjemian (Charybdis) 7459a5dcbb Changed the behaviour of @dynSeries/save method when the chosen file name corresponds to an existing file in the same folder. 2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis) 375d7aae8e Fixed typo and added unitary test. 2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis) 5ededa8848 Rewrote @dynSeries/subsasgn.
The following syntaxes are now allowed:

ts{'VARIABLE_NAME'}(range) = data;

where range is a dynDates object and data is an array of doubles, or

ts{'VARIABLE_NAME'}(range) = TS{'OTHER_VARIABLE_NAME'}(range)

where ts and TS are dynSeries objects.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis) b5c3ef2ade Added new unitary test in @dynSeries/subsasgn overloaded method. 2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis) c3da506760 Added provisions for recursive call to @dynSeries/subsasgn overloaded method. 2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis) 0fea61a551 Fixed typo (wrong numbering of the last unitary tests). 2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis) 603aeeccb6 Added provisions for date(s) selection. 2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis) e7b22213de Added comments. 2013-07-01 17:24:22 +02:00