Refer to group members...
Posted: Wed Jul 27, 2011 12:23 pm
Hi fellows,
this is a rather weird question I guess as I suppose there is an easy answer, but I simply can't think of it:
I have a database with many time series numbered from 1 to 96 (see attached workfile for an example of it including series 10 to 30 - don't be surprised,
the first 108 rows are NA, but rows 109 to 24 are not).
I need to categorize these series into two different groups, depending on whether the event was positive or negative - I do this by marking the respective series manually and save them as a group.
My question is:
How can i refer to the group members without having to mention their complete name?! (which would make the group categorization obsolete...)
For example, I need to do calculations with all of the members of the "positive" group.
However, I cannot use a "for !i=1 to..."-statement, as the groups member names are irregularly spaced, e.g.
Positive Group
ar10 ar14 ar15 ar16 ar18 ar20 ....
Negative Group
ar11 ar12 ar13 ar17 ar19 ar21 ....
For example, if I wish to access/refer to the members of the positive group ar10 ar14 ar15 ar16 ar18 ar20 .... (e.g. in order to calculate their stdev one by one and get the arithmetic mean of it or something alike), how could I do that without having to type their (irregularly spaced) names?
Is there a way to access them (for example by a group index number which I could access with a "for !i=1 to..."-statement, if there is something like that) or can I only solve the problem by re-entering the data in an ordered fashion (having positive events numbered ar1-ar45 and negative ar46-ar96)?
Your help is much appreciated!
this is a rather weird question I guess as I suppose there is an easy answer, but I simply can't think of it:
I have a database with many time series numbered from 1 to 96 (see attached workfile for an example of it including series 10 to 30 - don't be surprised,
the first 108 rows are NA, but rows 109 to 24 are not).
I need to categorize these series into two different groups, depending on whether the event was positive or negative - I do this by marking the respective series manually and save them as a group.
My question is:
How can i refer to the group members without having to mention their complete name?! (which would make the group categorization obsolete...)
For example, I need to do calculations with all of the members of the "positive" group.
However, I cannot use a "for !i=1 to..."-statement, as the groups member names are irregularly spaced, e.g.
Positive Group
ar10 ar14 ar15 ar16 ar18 ar20 ....
Negative Group
ar11 ar12 ar13 ar17 ar19 ar21 ....
For example, if I wish to access/refer to the members of the positive group ar10 ar14 ar15 ar16 ar18 ar20 .... (e.g. in order to calculate their stdev one by one and get the arithmetic mean of it or something alike), how could I do that without having to type their (irregularly spaced) names?
Is there a way to access them (for example by a group index number which I could access with a "for !i=1 to..."-statement, if there is something like that) or can I only solve the problem by re-entering the data in an ordered fashion (having positive events numbered ar1-ar45 and negative ar46-ar96)?
Your help is much appreciated!