- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hey everyone,
I'm quite new to SAS programming and I'm trying to work with the psmatch procedure. I'm trying to achieve a 1:2 fixed matching with caliper.
This is my code:
proc psmatch data = test1 region = Cs; class Locus_Stumpf R Kompli_chir;
psmodel Locus_Stumpf(Treated='1') = Alter OP_Jahr OP_Erweiterung
HIPEC Kompli_alle Kompli_chir OP_Typ Histo_Siegel R T N M UICC_einfach;
match method = greedy (k=2 order=descending) stat = PS exact = R exact = Kompli_chir caliper = 0.05;
output out (obs=match) = Outgs matchid = MatchID;
run;
in the log, it shows following warning, when I run this code:
Some treated units have less than the specified K=2 matched controls because there are not
enough available controls for these treated units.
I have 83 treated subjects in my data and my goal is it to match exactly 2 untreated subjects per treated subject (k=2). I thought that if I used method = greedy with a caliper, SAS would pair exactly one to two, automatically excluding all treated subjects, for which there aren't enough untreated subjects in the caliper width.
Instead, the program pairs some treated subjects with only ONE untreated subject instead of two.
Why is it mantaining the treated subjects when the program should actually exclude them? or did I understand the method = greedy option wrongly?
How can I achieve that the program excludes all treated subjects, for which there don't exist 2 adequate untreated partners (within the caliper width)?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would have expected the OBS=MATCH to have restricted the dataset to just matched values but you already have that in your code. I do not see an option to do what you request by default but you can filter it out fairly easily after the fact by isolating any records that only have one 1 match.