I have a fair amount of experience using Stata interactively, but little
programming experience, and I now have run into a problem that can only be
solved with programming (I think). Any help with how I ought to think
about it would be greatly appreciated. Thus, my first post to the
list. By the way, I'm using Intercooled Stata 8.1.
The dataset has a string var whose values correspond to the names of dummy
variables in the dataset. What I want to do is generate a new dummy var
which equals 1 for a given observation if the dummy for the var whose name
corresponds to that observation's string value also equals 1; the new dummy
will be 0 otherwise. I think an illustration of what the data might look
like will help more than that convoluted description:
The actual dataset has fifty string values and fifty corresponding
dichotomous vars and around 5500 observations. Any ideas about how I ought
to think about this and/or what commands might be useful in getting this
coded? I sense there is something simple I'm missing . . .