BookmarkSubscribeRSS Feed
Denali
Quartz | Level 8

Dear All,

 

I am designing a matched case-control study. I have 25 patients diagnosed with COVID and cancer as the case group. I would like to select 50 subjects from a dataset containing 4000 cancer patients as a comparison/control group based on the following matching variables: age (+/-5 years), cance type (8 cancer types: lung, melanoma, sarcoma...etc), gender (male vs. female), year of chemotherapy, race (White vs. Black vs. Others) and survival > 6 months (Yes/No). The priority of the matching variables are listed as the order above.

 

Can you please advise me on the code? Please let me know if you need further clarifications.Thank you!

 

 

3 REPLIES 3
Reeza
Super User
Have you looked into PROC PSMATCH?

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_psmatch_examples04.htm

If you need code examples you will need to provide data examples, specifically both of your input data sets.
Denali
Quartz | Level 8

@Reeza Thanks for your suggestions. l am not specifically looking for propensity score matching but just the regular matching step. Is there a code for that instead? Do I need to run the Proc Freq first to ensure the frequency of each variable or it does not matter so much?

Reeza
Super User
Then you're just writing manual SQL code. There isn't a proc for direct matching, but the Mayo clinic used to have a bunch of SAS macros.
I personally thing PSMATCH with the REGION and CALIPERS can be set to do what you want but I've never directly tried it.

I would have assumed that you've ensured that your criteria makes sense already for the matching so not sure what the PROC FREQ will add to the process.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 897 views
  • 0 likes
  • 2 in conversation