transforms a ts into a vector
vecout=ts2vec(ts,arg1,...,argn)
* 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)
* vecout = (N x 1) vector
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 | ![]() | ![]() |