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.
Have you worked through this example from the documentation?
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.
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.