I have a list of cases and a list of controls with their respective age.
Now I want to match one control to each case with a maximum age difference of 3. The goal is to get as many matches as possible, the age difference doesn't need to be optimized.
Is this possible with pymatch?
I've tried the following (just an example, not the real data):
I have a list of cases and a list of controls with their respective age.
Now I want to match one control to each case with a maximum age difference of 3. The goal is to get as many matches as possible, the age difference doesn't need to be optimized.
Is this possible with
pymatch
?I've tried the following (just an example, not the real data):
I'd like to have a 1:1 mapping like that, with as many matches as possible, but without replacement (ie every case has exactly one control).
However,
pymatch
matches with replacement (which is attempted to fix in #20 ), but even then matches are not optimized for number of matches