Hello everyone,

[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)
And I manually enter the matchgroup values for the cases that I'm interested in. My issue is this time I have about 1000 matchgroup values to enter, and I can't possibly sit there and list them all manually.
Is there a better way to do this?

Thank you so much for your help,

Jon