Good afternoon, I have a large dataset of 6 million observations (containing both cases and controls), made in this way: - uniqueid : the unique code of each patient; - gender - age - casecontrol (1 for cases, 0 for controls). The cases are about 400,000 and i wanted to create a 1:3 matching with the controls, based on gender (same gender) and age (range of plus / minus 3 years). At the end i want to obtain a dataset like this: - id_control - gender_control - age_control - id_case - gender_case - age_case I found a macro online, but no way to obtain the id_case... if someone can provide me a solution, it will be extremely helpful. Thank you.
... View more