Thanks Nick for his opinion about using the letters in place of numbers
- I'm sort of forced into using the char() function because some data
files refer to the waves by number and others by letter. I share the
data files with a few others so I dare not change their names to fit my
purposes.
Nick Cox wrote:
Taking another look at the code, an alternative is
foreach i in c d e f { global `i'indvars "pid `i'hid" }
The point is mostly one of maintenance.
I wouldn't trust myself to remember that char(99) is "c" for more
than a few minutes.
More to the point, on revisiting the code
later a programmer (even the original programmer) who shared this
failure of memory would have to work that out afresh. Using the letters
directly is more transparent.