<< subper Time series values >>

Grocer >> Time series > ts2vec

ts2vec

transforms a ts into a vector

CALLING SEQUENCE

vecout=ts2vec(ts,arg1,...,argn)

PARAMETERS

Input

* ts = a time series (between quotes or not)

* argi =

  - a date strings (in even number) corresponding to the bounds over which the values are taken

  - or a (1 x 2*n) vector of date strings corresponding to the bounds over which the values are taken  (optional : if not provided, the function operates over the whole time range of the series)

 

Output

* vecout = (N x 1) vector

DESCRIPTION

Transforms the values of a timeseries into the vector of its value.

EXAMPLE

load(GROCERDIR+'/data/bdhenderic.dat') // load Hendry and Ericsson database
s = ts2vec(ly,'1970q1','1979q4') // returns the value of ly over the 70's
s = ts2vec(ly,['1970q1','1979q4']) // returns again the value of ly over the 70's
s = ts2vec(lp,'1970q1','1970q4','1971q3','1979q4') // returns the value of lp over the 70's except for the first 2 quarters of 1971
s = ts2vec(lp,['1970q1','1970q4','1971q3','1979q4']) // returns again the value of lp over the 70's except for the first 2 quarters of 1971

AUTHOR

Eric Dubois 2002

Report an issue
<< subper Time series values >>