I have a table of means and ns from several studies comparing x
and y
groups. I've also computed the ratio of the means for each row:
# A tibble: 6 × 5
M_x n_x M_y n_y ratio_xy
<dbl> <dbl> <dbl> <dbl> <dbl>
1 11 27 8.11 520 1.36
2 2.61 30 1.2 32 2.17
3 2.48 41 1.29 45 1.92
4 2.9 33 2.41 31 1.20
5 3.96 24 2.48 22 1.60
6 3.4 5 2.78 3 1.22
I'd like to calculate the an "overall" ratio of M_x
to M_y
across all studies. My first thought was to compute the ratio of the weighted means of x
and y
:
#> library(dplyr)
#
#> dat %>%
#+ summarize(
#+ Mw_x = weighted.mean(M_x, n_x),
#+ Mw_y = weighted.mean(M_y, n_y),
#+ ratiow_xy = Mw_x / Mw_y
#+ )
# A tibble: 1 × 3
Mw_x Mw_y ratiow_xy
<dbl> <dbl> <dbl>
1 4.28 6.82 0.628
Although ratio_xy
is > 1 for each individual row, ratiow_xy
across all rows is < 1. I assume this is an example of Simpson's paradox, probably driven by the disproportionately large n_y
in the first row.
Questions:
- My intuition is that the rowwise ratios are "right" and the aggregate is "wrong," but my (basic) understanding of Simpson's paradox is it's not so straightforward. How should I interpret these results, or are they interpretable at all?
- If it's even appropriate, is there another aggregation approach that would capture the direction of ratios in each row?
I've read through some other CV threads on Simpson's paradox (e.g., 1, 2, 3). These have been informative in general, but focus on different kinds of cases, and I'm still unsure how to approach my particular problem.