Appropriate test for matched data (outcome with 4 levels, two groups) I am analyzing differences between two cohorts that have been matched 1:1 (using R matchit) for age and sex. I have several variables where I would like to know whether there are significant differences between groups. For continuous variables, am I right to assume that paired t-tests are appropriate? I also have several nominal variables (with two to five levels) that I would like to compare. If the data wasn't matched, I would just be using chi-square tests but this doesn't seem to be appropriate. Can anyone advise on which test to use, not only to find out whether there are differences between the two cohorts but also for post-hoc analyses to find out which levels of the variable are different? (If you also have suggestions for R packages/functions, please let me know.) Many thanks!
 A: The choice of analytic approach is a bit too arbitrary for my taste, which raises the question of why was matching done on variables that are so very easy to adjust for as covariates using a flexible nonlinear function of age.  I am assuming that no observations were discarded during the matching process (which would have made matching an even worse choice).  This seems to be an ideal problem for semi-parametric or parametric regression models (depending on the nature of Y) and using all the original data.
A: For all analyses, you can perform the analysis you would have performed had you had a randomized experiment, except that you need to include cluster-robust standard errors with pair membership as the cluster. So, for continuous outcomes, you can use a linear regression of the outcome on the treatment; for nominal outcomes, you can use a multinomial logistic regression of the outcome on the treatment (or just a regular logistic regression for two-level outcomes).
If you're using a version of MatchIt prior to 4.0.0 and you use nearest neighbor matching (the default), you will need to create a new column in the match.data() output containing pair membership. I have code to do that here. Otherwise, the subclass variable in the match.data() output contains pair membership. MatchIt 4.0.0 will be on CRAN soon, but for now you can install it using devtools::install_github("ngreifer/MatchIt").
