selecting a cohort of matched controls

Posts: 0

selecting a cohort of matched controls

I have a dataset of cases (N=681) and I am trying to select a 1:2 cohort of matched controls from a dataset of ~20,000 eligible patients.

Both datasets contain the variables:

I first want to match based on surgery date, selecting all eligible controls who had a surgery within 30 days (plus or minus) from the date each case had surgery.

Then, among those patients with a matched surgery date, I would like to select the two patients who were closest in age to the case (plus or minus) to serve as its controls. If there are multiple patients equally close in age to the case, I would like to use simple random sampling to select the controls from among them.

No control should be selected more than once; so although a patient may be eligible to serve as a control for more than one case, once a patient is selected as a control they need to be removed from the pool of eligible controls.

Can anyone help me write the syntax to select this matched cohort? I'm having quite a hard time figuring it out!!

Thanks so much!
Valued Guide
Posts: 2,106

Re: selecting a cohort of matched controls

Perhaps these articles from SUGI will help

(BTW, I just googled
+sas select matched controls
to get an extensive list of approaches.)

I generally attack these "fuzzy matches" with PROC SQL. The "between" operator and "min" function make it pretty straightforward, though it does require a bit of fiddling.

Unless you need to do subsequent chart abstraction, using a 1:many match will increase your power without any increase in work.

Doc Muhlbaier
Post a Question
Discussion Stats
  • 1 reply
  • 2 in conversation