How do I find suitable comparison people for each case? (matching cases and controls)
In brief
How do I find suitable comparison people for each case? The data assistant "Match cases and controls" (Edit data) looks for up to k controls (0) for each case (1) that are equal or similar in the chosen characteristics (matching). The columns "Gruppe" and "Abgleich" are created.
How it works in Statable
- Choose the column with case (1) and control (0); optionally columns that must be exactly equal.
- Choose number columns, each with a tolerance: the largest allowed distance. With 0 only an equal value counts.
- Choose "Controls per case" (1 to 5).
- "Calculate the matching", look at the result, then "Create new columns".
The rule
- The cases are worked through in the order of the rows.
- A control fits if it is not yet used, matches in all characteristics that need exact equality and is at most the tolerance away in each number.
- Among the fitting controls the one with the smallest distance wins, in a tie the one in the smallest row. The distance is the sum of the differences, each divided by the tolerance; with tolerance 0 it is 0.
- A control is used only once (without replacement).
- A row with a missing value in the case column or in a matching column does not take part. Statable counts such rows.
Reading the result
- The table shows: cases in total, fully matched (all k controls found), partly matched, without a control, the number of controls found and the rows that do not take part.
- For each number column the standardized mean difference before and after is shown: the difference between the means of cases and controls, divided by the common spread. Before means all cases and controls, after only the matched ones. A value closer to 0 afterwards means: the groups have become more similar in this characteristic.
Warnings
- The method is greedy and depends on the order of the rows: for each case in turn it takes the next free control and does not look for the best overall result. A different order can give different pairs.
- Cases without a control drop out of the comparison. This changes whom the comparison describes.
- The matching balances only the chosen characteristics. Everything else stays unequal, and the matching does not show a cause.
- The analysis afterwards must take the matching into account, for example with paired or conditional methods. Comparing only within the groups that remain is not an experiment.
- Do not calculate and choose from the same data until it fits: anyone who changes tolerance and characteristics until the result pleases can no longer trust the result.
Requirements and limits
- The case column has the values 1 (case) and 0 (control). At least one case and one control with all values are needed.
- A column may appear in only one place: as the case column, as an exactly equal column or as a number. A case weight that is set does not enter the matching.
- This step is entered in the log of the data changes.
Typical examples
- For each person with the illness (case) two persons without it (controls) of the same sex and at most 2 years apart in age.
- Form a comparison group for a support group by age and prior knowledge.