Labeling Vector Series

For questions and discussion related to reading in and working with data.
Finn Weiss
Posts: 15
Joined: Fri Apr 24, 2015 8:48 am

Labeling Vector Series

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Labeling Vector Series

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

Re: Labeling Vector Series

Unread post by Finn Weiss »

Okay Thanks
Post Reply