BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bretthouston
Obsidian | Level 7

Hello, 

 

I recently performed a propensity analysis using stratification (n=7 strata). To estimate the treatment effect across all stratas, I would like to pool this estimate using proc freq. I've tried the following code:

 

proc psmatch data=HipF region=cs(extend=0);

class TXAstatus sex CS1 CS2 CS3 year2014 year2015 anesth2 anesth3 surg2 surg3;

psmodel TXAstatus (Treated='1') = age sex CS1 CS2 CS3 preopHb anesth2 anesth3 surg2 surg3 year2014 year2015;

strata nstrata=7 key=none;

assess lps var=(age sex CS1 CS2 CS3 preopHb anesth2 anesth3 surg2 surg3 year2014 year2015) / 

plots = (stddiff) stddev=pooled;

output out(obs=region)=TXAstrat10;

run;

 

proc freq data=TXAstrat;

tables Tx*TXAstatus / cmh;

exact mcnem;

by _STRATA_;

run;

 

Despite specifying 'CMH', this seems to generate stratum-specific ORs and RRs. Is there an option that I'm missing here? 

 

Thanks in advance,

Brett

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

You should remove the BY statement and place the _STRATA_ variable on the TABLES statement.

 

proc freq data=TXAstrat;

tables _strata_*Tx*TXAstatus / cmh;

exact mcnem;

run;

 

View solution in original post

2 REPLIES 2
SAS_Rob
SAS Employee

You should remove the BY statement and place the _STRATA_ variable on the TABLES statement.

 

proc freq data=TXAstrat;

tables _strata_*Tx*TXAstatus / cmh;

exact mcnem;

run;

 

bretthouston
Obsidian | Level 7
Thank-you, this is perfect. Much appreciated!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 488 views
  • 3 likes
  • 2 in conversation