I did propensity score matching for retrospective data, and now I want to run outcome analysis. For dichotomous variables, I heard that I need to do McNemar test since I should treat propensity score matched data as paired ones. Typical t-test table for dichotomous variables would be like:
Treatment group | Control group | |
---|---|---|
Yes | number | number |
No | number | number |
However, for McNemar test, I figured out that I need another vesion of table like:
Treatment group Yes | No | |
---|---|---|
Control group Yes | number | number |
No | number | number |
But I can't figure out how to find those numbers in table above. Because there are a lot of outcome variables, and number of participants in each group, I cannot count each pair as well. Please tell me how I can make a table needed and run McNemar's test in R.