kosukeimai / MatchIt

R package MatchIt
200 stars 42 forks source link

Obtaining odds ratios vs risk ratios using avg_comparisons() #196

Open pchan7 opened 1 month ago

pchan7 commented 1 month ago

I have a quick question about obtaining odds ratios vs risk ratios for a binary outcome using avg_comparisons() after matching. I was reading the tutorial materials (thank you for the great materials!) and it says the following:

"The outcome model should be one appropriate for binary outcomes (e.g., logistic regression) but is unrelated to the desired effect measure because we can compute any of the above effect measures using avg_comparisons() after the logistic regression."

My question is, if my binary outcome of interest is not rare (prevalence = ~15%), is it still true that I can compute risk ratio as my effect measure? I thought risk ratios could be interpreted from a logistic model only when the prevalence was relatively low, so I'm a bit puzzled by the quoted statement. Ideally I want to report risk ratios as my effect measure.

ngreifer commented 1 month ago

Medical researchers have often wanted to report risk ratios, which are more interpretable than odds ratios, but logistic regression produces coefficients that have the interpretation of odds ratios. However, when the "rare outcome assumption" is met, the coefficient in a logistic regression can be interpreted as a risk ratio. I assume that is what you are referring to.

None of that is relevant here because the coefficient on treatment in a logistic regression with covariates corresponds to a conditional odds ratio, and matching is only valid for estimate marginal odds ratios. To estimate marginal odds ratios, you have to estimate the marginal counterfactual risks. How you contrast the risks is up to you (e.g., as a risk difference, risk ratio, or odds ratio), but that is unrelated to the model. The model is used to produce the counterfactual risks only; its coefficients are not to be interpreted.

So, you can ignore everything you know about the relationship between risk ratios and odds ratios and the rare outcome assumption in this context; we are not interpreting model coefficients and are instead interpreting contrasts between estimated counterfactual risks. That is the beauty of the marginal effects procedure for estimating treatment effects.