Hi Koen, Thank you for your reply. I have done a lot of reading and found some macros - but no where I can download some macro syntax. This surprises me as this is a "common" problem/methodology, and I thought some procedure (like there is now procedures for PS matching of all kinds) or pre-existing code/macro/syntax existed. Im afraid Im not good enough at coding to be able to figure out to code something like this. I have found an old paper (1995) explaining different matching procedures - and exactly this one I need to create a risk set - using a macro called %match - with an appendix to follow up. I was just curios if that kind of syntax was available anywhere to be adjusted to my data of course - but principally "all" risk set matching is the same - based on different variables of course. This is the paper: https://www.mayo.edu/research/documents/biostat-56pdf/doc-10026923
... View more
Hi, I need to do risk set matching on my dataset. The cases are women whom become pregnant at eg. day X after diagnosis. The controls are the entire population and a woman can be a control if not yet pregnant at day X. Does anyone know where to download syntax for a macro or anything that can be of use. Besides the time variable I have an already calculated PS score to match on. I would prefer to do it with replacement.
... View more
Hi Michaell, I have tried this, but for some reason I dont know this results in a dataset where two or more cases come out with the same _matchID. I dont know why this happens, but I need individual matchid's pr. case. Do you have any ideas on how/why this happens, and how I can avoid it?
... View more
Hi, I would like to do a greedy matching - but with replacement and all of the possible control matches pr. case - does anyone know how to code this in the PSMATCH procedure? I need to have all possible matches shown pr. case within the specified caliper of course as I need to take another variable into account after the matching procedure. Present code is this which works, but 1) Doesnt provide all possible matches 2) doesnt have replacement: ods graphics on; proc psmatch data=stat5 region=cs; class eventbarn; psdata treatvar=eventbarn (Treated='1') ps=ssps; match method=greedy (k=3) caliper=0.2; assess ps var=(baseline_edss disease_duration age_diagnosis) / plots=all; output out(obs=match) =outstat1 matchid=_matchid; run;
... View more