[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: removing prefix
> I have a data set which uses different variable
> prefixes for different
> waves of the panel. So the variable name of the first wave is:
> To work with all the waves using the same commands I
> would like to
> remove the different prefixes (a_ for the first wave, b_ for the
> second and so on). To this end I used the "renpfix"
> command. However I
> could not figure out how I could replace the prefix for
> i.e. I want to change
> a_varname ===> varname
> How can that be done?
> renpfix a_ will of course only work once, as you can't have
> variables with the same name. You want either of the
> following two options:
> 1) use a loop with the help of -foreach- around the
> commands that you
> want to act on multiple variables.
> 2) use -reshape- . Read the manual for more information. Take
> advantage of the knowledge that in most cases a long data
> structure (all
> wave stacked 'on top' of each other, sharing the same
> variables) is more
> convenient than a wide datastructure (the one you have now,
> every wave
> needing its own new variables).
Another tool in this area is -renvars- from STB-60.
* For searches and help try: