Hello,
I try the following, but I don't manage to find the correct code unfortunately.
I have a database with patient ID's, treatment (1 or 3), gender (0 or 1) and age. I want to match all patients with treatment = 3 (72 in total) with patients with treatment = 1 (584 in total) in a 1:3 ratio (so I would like to get 216 unique ID's). The matching should be based on (closest) age and (exact) gender. Does somebody know the code for this?
I tried making two datasets and using joinby. However, I only got 188 ID's instead of 216.
I try the following, but I don't manage to find the correct code unfortunately.
I have a database with patient ID's, treatment (1 or 3), gender (0 or 1) and age. I want to match all patients with treatment = 3 (72 in total) with patients with treatment = 1 (584 in total) in a 1:3 ratio (so I would like to get 216 unique ID's). The matching should be based on (closest) age and (exact) gender. Does somebody know the code for this?
I tried making two datasets and using joinby. However, I only got 188 ID's instead of 216.
Comment