Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
0 results Searching
Select Git revision
Loading items
Show changes
54 files
+ 1184
280
Compare changes
  • Side-by-side
  • Inline

Files

+84 −8
Original line number Diff line number Diff line
@@ -9709,12 +9709,6 @@ A @code{nobs}*1 cell of strings or a @code{nobs}*p character array, the names of
@item tex
 A @code{nobs}*1 cell of strings or a @code{nobs}*p character array, the tex names of the variables.

@item freq
A scalar integer equal to 1, 4, 12 or 52, the frequency of the dataset.

@item init
A single element @dates object, the initial date of the sample.

@item dates
A @dates object with @code{nobs} element, the dates of the sample.

@@ -9723,13 +9717,13 @@ A @code{nobs} by @code{vobs} array of doubles, the data.

@end table

@noindent @code{freq}, @code{nobs}, @code{vobs}, @code{data}, @code{name}, @code{tex} are private members. The following constructors are available:
@noindent @code{nobs}, @code{vobs}, @code{data}, @code{name}, @code{tex} are private members. The following constructors are available:

@deftypefn  {dseries} dseries ()
@deftypefnx {dseries} dseries (@var{INITIAL_DATE})
@deftypefnx {dseries} dseries (@var{RANGE_OF_DATES})

Instantiates an empty @dseries object, with, if defined, an initial date given by the single element @dates object @var{INITIAL_DATE} or the first element of the @dates object @var{RANGE_OF_DATES} (the frequency is then set accordingly).
Instantiates an empty @dseries object, with, if defined, an initial date given by the single element @dates object @var{INITIAL_DATE} or the first element of the @dates object @var{RANGE_OF_DATES}.

@end deftypefn

@@ -10156,6 +10150,24 @@ ans is a dseries object:

@sp 1

@deftypefn {dseries} {@var{f} =} freq (@var{B})

Returns the frequency of the variables in @dseries object @var{B}.

@examplehead
@example
>> ts = dseries(randn(3,2),'1973Q1');
>> ts.freq

ans =

     4
@end example

@end deftypefn

@sp 1

@deftypefn{dseries} {@var{D} =} horzcat (@var{A}, @var{B}[, ...])

Overloads the @code{horzcat} Matlab/Octave's method for @dseries
@@ -10273,6 +10285,21 @@ The previous code should produce something like:

@sp 1

@deftypefn {dseries} {@var{f} =} init (@var{B})

Returns the initial date in @dseries object @var{B}.

@examplehead
@example
>> ts = dseries(randn(3,2),'1973Q1');
>> ts.init
ans = <dates: 1973Q1>
@end example

@end deftypefn

@sp 1

@deftypefn {dseries} {@var{C} = } insert (@var{A}, @var{B}, @var{I})

Inserts variables contained in @dseries object @var{B} in @dseries object @var{A} at positions specified by integer scalars in vector @var{I}, returns augmented @dseries object @var{C}. The integer scalars in @var{I} must take values between @code{1} and @code{A.length()+1} and refers to @var{A}'s column numbers. The @dseries objects @var{A} and @var{B} need not to be defined over the same time ranges, but it is assumed that they have common frequency.
@@ -10389,6 +10416,21 @@ ans is a dseries object:

@sp 1

@deftypefn {dseries} {@var{l} =} last (@var{B})

Returns the last date in @dseries object @var{B}.

@examplehead
@example
>> ts = dseries(randn(3,2),'1973Q1');
>> ts.last
ans = <dates: 1973Q3>
@end example

@end deftypefn

@sp 1

@deftypefn {dseries} {@var{B} = } lead (@var{A}[, @var{p}])

Returns leaded time series. Default value of @var{p}, the number of leads, is @code{1}. As for the @code{lag} method, the @dseries class overloads the parenthesis so that @code{ts.lead(p)} is equivalent to @code{ts(p)}.
@@ -10844,6 +10886,40 @@ ts1 is a dseries object:

@sp 1

@deftypefn{dseries} {@var{C} =} remove (@var{A}, @var{B})

Alias for the @code {pop} method with two arguments. Removes variable @var{B} from @dseries object @var{A}.

@examplehead
@example
>> ts0 = dseries(ones(3,3));
>> ts1 = ts0.remove('Variable_2');

ts1 is a dseries object:

   | Variable_1 | Variable_3
1Y | 1          | 1
2Y | 1          | 1
3Y | 1          | 1
@end example

@sp 1

A shorter syntax is available: @code{remove(ts,'Variable_2')} is
equivalent to @code{ts@{'Variable_2'@} = []} (@code{[]} can be replaced
by any empty object). This alternative syntax is usefull if more than
one variable has to be removed. For instance:
@example
ts@{'Variable_@@2,3,4@@'@} = [];
@end example
will remove @code{Variable_2}, @code{Variable_3} and @code{Variable_4}
from @dseries object @code{ts} (if these variables exist). Regular
expressions cannot be used but implicit loops can.

@end deftypefn

@sp 1

@deftypefn{dseries} {@var{B} =} rename (@var{A},@var{oldname},@var{newname})

Rename variable @var{oldname} to @var{newname} in @dseries object