Page 1 of 1

Labeling Vector Series

Posted: Wed Jun 03, 2015 3:18 am
by Finn Weiss
Hi,

i am writing a procedure which should calculate 12 differnet time series with weights for one variable.
So i want to declare a vector of series with the name of the variable, kind of:

declare vector[series] ('w'+%l(variable))(rows)

I know that this does not work, but is there any possibility to use the label of a time series to build a vector which contains this name?

Best regards

Re: Labeling Vector Series

Posted: Wed Jun 03, 2015 7:33 am
by TomDoan
I'm assuming that you're creating a separate one for each of several series. To do that, you can use the HASH aggregator, added with v9:

dec hash[vect[series]] myw
dim myw(%l(variable))(row)

myw("abc") will be the VECT[SERIES] for key "ABC" and myw("def") will be the VECT[SERIES] for the key "DEF" (keys are case-insensitive).

Re: Labeling Vector Series

Posted: Wed Jun 03, 2015 7:48 am
by Finn Weiss
Okay Thanks