Commit Graph

89 Commits (7ab86d31ec62469893454a02a11cc339c822ecaa)

Author SHA1 Message Date
Stéphane Adjemian (Scylla) 0f28422e9f This fixes #704. 2014-07-29 18:22:10 +02:00
Stéphane Adjemian (Scylla) c5af1d43ed Removed nobs and vobs members in @dseries class.
The syntax to get the number of observations and the number of
variables remains unaffected by this commit. If ts a @dseries object,
ts.nobs and ts.vobs are respectively the number of observations and
the number of variables.
2014-07-28 17:50:15 +02:00
Stéphane Adjemian (Scylla) 863fe4998f Fixed typo/bug (removed space). 2014-07-17 22:05:08 +02:00
Stéphane Adjemian (Scylla) 1a98943651 Fixed bug (tex names with underscores were not correctly saved in m datafile). 2014-07-17 22:05:08 +02:00
Stéphane Adjemian (Scylla) a261c3bbce Fixed bug. The instantiation of a dseries object with a file name (for the datafile) and a string (for the initial period) was not working correctly. 2014-07-17 22:05:08 +02:00
Stéphane Adjemian (Charybdis) 57c583867b Added new method @dseries/detrend. 2014-07-09 15:34:53 +02:00
Stéphane Adjemian (Charybdis) 9c733de40a Added unitary tests. 2014-07-08 14:06:55 +02:00
Houtan Bastani a64ded92cd dseries: fix subtraction bug. closes #686 2014-07-08 12:06:27 +02:00
Stéphane Adjemian (Scylla) 1b36d75947 Rewrote @dates/size and @dseries/size (compatibility fix for Octave). 2014-07-02 12:20:19 +02:00
Stéphane Adjemian (Scylla) 81541ac058 Fixed unitary test. 2014-06-27 18:39:18 +02:00
Stéphane Adjemian (Scylla) c4dac88ed2 Added the possibility to redefine the initial date (and implicitly the frequency) when a dseries object is instantiated with the name of a datafile. 2014-06-19 17:59:19 +02:00
Stéphane Adjemian (Charybdis) af1009d8a4 Merge branch 'master' into use-dynSeries 2014-06-12 17:42:52 +02:00
Stéphane Adjemian (Charybdis) 955dcab449 Removed init and freq members from dseries class (redundant informations).
The frequency and initial date can still be accessed with the usual syntax:

ts.freq
ts.init

It is also possible to get the last date:

ts.last

Added new methods frequency, firstdate and lastdate as alias for ts.dates.freq, ts.dates(1) and ts.dates(end)
2014-06-11 12:22:35 +02:00
Stéphane Adjemian (Charybdis) 3606cbc8ed Added new syntax to remove variables from a dseries object.
If ts is a dseries object, then

ts{'Variable_1','Variable_2'} = [];

or

ts{'Variable_@1,2@} = [];

will remove Variable_1 and Variable_2 from ts (if they exist).
2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) ff27824b29 Fixed bug related to the initialization of the dseries and dates object (test that the input argument is a string). 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) f0a3d6ad44 Added @dseries/remove method. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) d5066e9a44 Added unitary test. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) 353bab2117 Fixes issue #652. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) 2e280ecdcd Added dseries/end method.
Allows the following syntax to extract variables from a
dseries object ts:

us = ts{2:end};
2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) aa14faf508 Removed the possibility to extract subsamples from a dseries object with a vector of integers.
If ts is a dates object with 100 observations (ts.nobs=100), the
following syntax for selecting the last 90 observations *is not legal*:

ts(11:end)

ts has to be indexed instead with dates objects, as in the following example:

ts(d1:d2)

where d1 and d2 are dates objects.  To select the 90 last observations,
if the last date is unknown, the following syntax can be used:

ts(ts.dates(11:end))
2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) 7a96533339 Allow empty dseries objects in @dseries/horzcat method. Added unitary test. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 6aee567382 Save empty dates and dseries objects in memory (base workspace) instead of disk (faster). Added an initialization mode for dates and dseries constructor. The following commands:
dates('initialization');
dseries('initialization');

create variables emptydatesobject and emptydseriesobject in base workspace.
2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Charybdis) 0206792c12 Save empty dates and dseries objects on disk (in dynareroot), to reduce the time needed to instantiate new objects. 2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Charybdis) f054428318 Merge branch 'master' into bitbucket-use-dynSeries 2014-05-18 09:13:09 +02:00
Stéphane Adjemian (Scylla) 16194cedd9 Removed calls/references to @dynDate (replaces by @dates). 2014-04-30 15:44:30 +02:00
Stéphane Adjemian (Scylla) f03dd893a8 Allow the syntax o.disp() for @dates and @dseries objects. 2014-04-30 11:11:45 +02:00
Sébastien Villemot d5da406544 Fixed bug in dseries constructor introduced in 4e1c26db. 2014-03-27 18:25:46 +01:00
Stéphane Adjemian (Scylla) 4e1c26db76 Changed dseries' constructor so that the third and fourth inputs arguments accept cell of strings *and* character arrays.
=> It is possible to pass M_.endo_names as a third input argument.
2014-03-26 11:40:21 +01:00
Stéphane Adjemian (Scylla) 5afee622d4 Fixed typo. 2014-03-24 16:51:42 +01:00
Stéphane Adjemian (Scylla) 37ab300dd2 Changed @dseries/display method. Do not display all the variables if the number of variables is greater than 10.
Note that the behaviour of @dseries/disp is not changed (displays all the variables).
2014-03-22 12:24:30 +01:00
Stéphane Adjemian (Scylla) 20041ac70c New syntax for populating an empty dseries object.
If ts is an empty dseries object with a defined range of dates:

ts = dseries(dates('1990Q1'):dates('1990Q4'));

Then the following syntaxes are valid:

1. ts(:) = 1;
2. ts(:) = [1, 2];
3. ts(:) = randn(4,1);
4. ts(:) = dseries(1);
5. ts(:) = dseries([1, 2]);
6. ts(:) = dseries(randn(4,2));
7. ts(:) = dseries(randn(4,2),dates('1950M1'):dates('1950M4'));

Remarks.

[1] In cases 1., 2., 4. and 5. the single observation is replicated to match the number of dates in ts.

[2] In cases 4. to 7. the dates in the right member of the assignment are lost (ie ts.dates is not affected by the dates defined in the right members).
2014-03-22 12:07:29 +01:00
Stéphane Adjemian (Scylla) 9712f4abe6 Added the possibility to pass a range of dates to the dseries constructor. 2014-03-22 11:23:46 +01:00
Houtan Bastani d469c3590d reporting, dates: make shiftS calls more efficient 2014-02-06 15:30:19 +01:00
Stéphane Adjemian (Scylla) 63c289adba If us and ts are dseries objects, chain(ts,us) and ts.chain(us) return the same dseries object. 2014-02-01 11:38:10 +01:00
Stéphane Adjemian (Scylla) 90b47d2704 Added chain method in dseries class. 2014-02-01 11:38:10 +01:00
Stéphane Adjemian (Scylla) fa6e97a929 Fixed copyright year. 2014-01-29 17:22:44 +01:00
Stéphane Adjemian (Scylla) b93eab8bf2 Added overloaded cumprod function (dseries class). 2014-01-29 17:22:10 +01:00
Stéphane Adjemian (Scylla) 4254da0a00 Fixed bug. Closes #590. 2014-01-29 13:51:34 +01:00
Stéphane Adjemian (Scylla) 5f46f983c1 Fixed bug. Closes #591. 2014-01-29 12:57:55 +01:00
Houtan Bastani 3f5d18f5c5 dseries: allow assign to select by date string as opposed to dates 2014-01-17 14:59:20 -05:00
Stéphane Adjemian (Charybdis) 8b093aecbb Allow assignation of variables in an empty dseries object. 2014-01-16 10:06:30 +01:00
Stéphane Adjemian (Charybdis) 117f338eff Implement broadcasting for operations (+,-,* and /) between dseries and scalar or vectors. Efficiency and cosmetic changes. 2014-01-16 10:06:30 +01:00
Stéphane Adjemian (Charybdis) 3534c68be6 Fixed bug. Allow selection of an observation with a date defined in a formatted string. 2014-01-16 10:06:30 +01:00
Stéphane Adjemian (Charybdis) add3b1401f Fixed bug (a string passed to a dseries object can be a date). 2014-01-16 10:06:30 +01:00
Houtan Bastani 168895f428 dseries: fix display when TABLE is empty 2014-01-14 09:03:24 -05:00
Stéphane Adjemian (Scylla) dd10c788ff Added @dseries/abs method. Returns the absolute value of a dseries object. 2013-12-13 18:30:37 +01:00
Sébastien Villemot 6e8b35c7f3 Fix bug in method disp of dseries. 2013-12-13 16:49:08 +01:00
Stéphane Adjemian (Scylla) cf567dd5c0 Bug fix. Force axis tight in @dseries/plot method (otherwise the method crashes if Matlab/octave considers a too large x-abscissa). 2013-12-11 10:01:22 +01:00
Stéphane Adjemian (Charybdis) deed4df569 Added @dseries/mpower method (element-by-element powers). 2013-12-03 23:57:53 +01:00
Stéphane Adjemian (Scylla) a6a10055da Fixed bug (problem with dates selection in @dseries::subsref). 2013-11-29 19:02:40 +01:00