[EDIT: I just realize that's not how people have been posting code - please bear with me as I try to fix that.]
Thank you all - I appreciate your patience with me as I stumble through using this program.
My data has a bunch of cases and controls that are matched (at a ratio of 1:10) by the variable 'matchgroup', and this variable matchgroup goes up to about 13,000. I have ~1200 cases and I need to pick out their respective controls. The cases are indicated in a dummy variable I named 'omitted_cases.' Is there a way I can generate another dummy variable for the respective controls?
My method so far has been something along the lines of:
Code:
gen dummy_variable = 0 replace dummy_variable = 1 if inlist(matchgroup, 1, 2, 3, 4)
Is there a better way to do this?
Thank you so much for your help,
Jon
0 Response to Is there a way to list the observations that share a particular set of values for one variable?
Post a Comment