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

So this may be more of a "stat" question than a SAS question but I have never learned the process of matching in school. Regression was what was ingrained in me and that was the method to use when it came to dealing with confounders. However, in the industry I'm currently working in, they match patients and since this is what's more commonly used I was told to try to do matching for a project.

 

My issue is, I don't understand how exactly psmatch works and if it is possible to do a proc ANOVA using the results of psmatch. All the examples I looked at, they ran a ttest using the output file from psmatch. I however, needed to try to compare 3 groups, and only matched the control group with the treated group due to psmatch not working with 3 groups, the 3rd group is also kind of a control but not exactly. I am trying to match using propensity score weighting. I understand that this data can spit out a ATTWGT variable that is basically the "Weight" for each subject. I know that if I were to just compare 2 groups I could specify the weight statement in a proc ttest. I was wondering if there was a way to do this with proc ANOVA. If not, using matchid also doesn't work because this was based on weights and not exact matching. I was told that matching basically just would pair patients up that had similar features(Based on what we matched on) and when I run a statistical test, I just use the matched pair and throw out the unmatched data.

 

I guess I'm just not understanding what exactly psmatch does and what I'm supposed to do after running psmatch. Any help would be appreciated, thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Isn't that just running it multiple times or am I missing something obvious?

Run it once to match Case + Group1
Run it again to match Case + Group2
Verify Group / Group 2 are aligned, but they should be as well.

View solution in original post

4 REPLIES 4
Reeza
Super User

Have you worked through this example from the documentation?

https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_psmatch_examples05.htm&docsetVers...

 

I would suggest working through as many as you can to understand how it works. 

 

Otherwise here's a quick intro into analysis of case-control studies/data.

https://health.ucdavis.edu/ctsc/area/biostatistics/Documents/Case-Control%20Studies_8Nov2016_Kim.pdf

 

If you google with that term you'll find many tutorials out there. 

 


@Leon27607 wrote:

So this may be more of a "stat" question than a SAS question but I have never learned the process of matching in school. Regression was what was ingrained in me and that was the method to use when it came to dealing with confounders. However, in the industry I'm currently working in, they match patients and since this is what's more commonly used I was told to try to do matching for a project.

 

My issue is, I don't understand how exactly psmatch works and if it is possible to do a proc ANOVA using the results of psmatch. All the examples I looked at, they ran a ttest using the output file from psmatch. I however, needed to try to compare 3 groups, and only matched the control group with the treated group due to psmatch not working with 3 groups, the 3rd group is also kind of a control but not exactly. I am trying to match using propensity score weighting. I understand that this data can spit out a ATTWGT variable that is basically the "Weight" for each subject. I know that if I were to just compare 2 groups I could specify the weight statement in a proc ttest. I was wondering if there was a way to do this with proc ANOVA. If not, using matchid also doesn't work because this was based on weights and not exact matching. I was told that matching basically just would pair patients up that had similar features(Based on what we matched on) and when I run a statistical test, I just use the matched pair and throw out the unmatched data.

 

I guess I'm just not understanding what exactly psmatch does and what I'm supposed to do after running psmatch. Any help would be appreciated, thanks.


 

Leon27607
Fluorite | Level 6

Thanks for the links Reeza, but I think my issue is how do I deal with the 3rd group? My 3 groups could basically be labeled as 0,1, and 2. PSmatch only lets me match on a binary variable. This is the part I'm struggling with. Like ideally I could run psmatch on all 3 groups and then run proc GLM. I've been unable to find how you can do this in SAS.

Reeza
Super User
Isn't that just running it multiple times or am I missing something obvious?

Run it once to match Case + Group1
Run it again to match Case + Group2
Verify Group / Group 2 are aligned, but they should be as well.
Leon27607
Fluorite | Level 6

Oh, yeah you're actually right. My thought process was, if we match Case + Group2, doesn't it ignore all information from Group 1? That's what I was kind of hung-up on. I was just wondering if there was any way to do a "3-way" match because even googling for it didn't give me very great answers.

 

I also was thinking that perhaps I would have different weights in the 2 data sets but I just checked and all the weights in the "case" group are just 1. Your suggestion makes much more sense now. Thanks.

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
  • 4 replies
  • 1222 views
  • 2 likes
  • 2 in conversation