SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
GS2
Obsidian | Level 7 GS2
Obsidian | Level 7

Using SAS 9.4

 

I have a data set with 299 obs. I want to propensity match the data set between 2 groups. Group 1 has 98 obs and group 2 has 201 obs. I would like to propensity match based on procedure_type (exact), age, sex, BMI, size. What would be the best way to get propensity match and get data set output? Below is my attempt but I am not sure this is correct. Thank you 

 

proc logistic data=lw.analysis;
class procedure_type;
model group = procedure_type age bmi size / link=glogit rsquare;
output out = ps_los pred = ps xbeta=logit_ps;
run;

1 REPLY 1
ballardw
Super User

I suggest looking at the examples for Proc PSMATCH and the documentation as a good starting place. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_psmatch_syntax.htm

 

The example in the Getting Started tab shows code to create a data set that uses Age, Gender and BMI to create matches for a Drug (the role of your procedure_type I think).

Steps would be to create a score, similar that in the example that incorporates "size" as well.

 

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 1 reply
  • 1722 views
  • 0 likes
  • 2 in conversation