Case-Control Matching - what now??

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 1
Joined: Tue Aug 01, 2017 6:17 pm

Case-Control Matching - what now??

Postby bonnieerin » Thu Aug 03, 2017 4:40 pm

Hi all,

I'm attempting to run some analyses using case matched controls and am having a devil of a time finding any resources online for how to do this.

I ran the syntax (after using point and click menus, getting errors, pasting the syntax, and modifying it to fix errors - phew!) and have what I believe is the correct output.

I've been given a variable (that I called MCases) that lists IDs that "match" each participant in my experimental group. I've verified that there are the correct number of values (i.e., one for each experimental group participant and no repeats) and that the values correspond to IDS in my control group.

However, I have no idea how to now pare down my dataset to contain ONLY these participants! Other than going through and hand deleting the 2000+ control participants who didn't make the cut.

Does anyone know simple syntax for doing this? A simple example, pretend my data look like this:

ID X Y Group MCases
1 3 3 1 6
2 3 3 1 9
3 3 3 1 7
4 3 3 1 11
5 3 3 1 14
6 3 3 2
7 3 3 2
8 3 3 2
9 3 3 2

So clearly, 1 is matched to 6, 2 to 9, and so on. 8 isn't matched to anyone. I'd like to delete all the ones that aren't matched to any experimental gp participants without having to go through and do it by hand, if possible.

Thank you so much! I am happy to answer any followup questions and appreciate your input! :)


Who is online

Users browsing this forum: No registered users and 1 guest