Labeling Vector Series
-
Finn Weiss
- Posts: 15
- Joined: Fri Apr 24, 2015 8:48 am
Labeling Vector Series
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
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
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).
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).