# Comparing multiple distinct proportions between two groups

I have two groups (group 1: $$n=100$$, and group 2: $$n=200$$), and multiple proportions for each group (where the number represents the proportion of individuals in the group with each disease). Example:

                           group1    group2
high cholesterol           0.20      0.28
high blood pressure        0.18      0.16
cardiovascular disease     0.13      0.20
diabetes                   0.25      0.20
vitamin d deficiency       0.05      0.15


I want to calculate whether there is a significant difference between the two groups, overall, across the disease categories. Since this data is not a contingency table, I clearly cannot use a chi-squared test or a Fisher's Exact Test. I know how to compare single proportions across two groups, but is there a way to compare multiple proportions across the two groups simultaneously and get a single p-value? Of course, I could test each disease individually with a two-proportion z-test and then adjust for multiple comparisons, but can I test everything at once (in the flavor of a Fisher Exact Test)?

UPDATE: The categories are not disjoint as an individual can have 0 diseases or $$>1$$ diseases (seen by the fact that the proportions for either group do not add up to 1), which is why we cannot use the usual strategies that are used for a contingency table. In essence, instead of comparing the proportions $$A$$ and $$B$$ across two groups, I am trying to compare the vectors of proportions, $$A = [a_1, a_2, a_3, a_4, a_5]$$ and $$B = [b_1, b_2, b_3, b_4, b_5]$$ across two groups.

• Are diseases disjoint? Why not counts 20, 16, 13, 25, 5 in Gp 1 and counts 56, 32, etc. in Gp 2? What does it mean to 'compare' frequencies of diseases 'across the two groups' ? What do you really want to know? Looks as if Gp 2 could be 'higher' in three diseases and Gp1 1 higher in 2, so there is a hint that groups aren't homogeneous. // Isn't the main issue whether each disease is significantly different across groups. If not that, then what? // A chisq test of homogeneity might confirm disease prevalances not uniform across groups. Important? Commented Aug 25, 2020 at 4:47
• @BruceET the proportions were just one way of representing the data, the counts that you stated are fine, too. I don't think a chi-squared test for homogeneity can be used here, as this is not a contingency table, since an individual can have more than one disease and hence fall into $>1$ cells of the table (or none).
– bob
Commented Aug 25, 2020 at 15:29
• Is your purpose to find some sort of test (any sort of test) that one might apply to your data? Or is there something you would like to know from the data? Commented Aug 25, 2020 at 15:36
• @BruceET I would like to test whether the vector of disease proportions for group 1 is significantly different from the vector of disease proportions for group 2.
– bob
Commented Aug 25, 2020 at 15:37
• Then all I can suggest is that you have at least 25 with disease in G1 and at least 40 in G2 (allowing for unspecified degrees of overlap). In R, prop.test(c(25,40), c(100,200)) yields P-value, 0.4, far from significant. Commented Aug 25, 2020 at 16:10

Continuing from my comment: On the assumption that disease categories are mutually exclusive, and using an additional category None so that groups total $$n_1 = 100, n_2 = 200,$$ as stated, here is a chi-squared test of homogeneity (in R) of disease category across groups.

G1 = c(20, 17, 13, 25,  5, 20)
G2 = c(56, 32, 40, 40, 20, 12)
TBL = rbind(G1, G2)
out = chisq.test(TBL);  our

Pearson's Chi-squared test

data:  TBL
X-squared = 18.593, df = 5, p-value = 0.002288


The null hypothesis of homogeneity is rejected (P-value $$0.0023).$$

Observed counts $$X_{ij}$$ echo the input, expected counts $$E_{ij}$$ are based on row and column totals of the table (assuming homogeneity). For example, $$E_{11} = 100(76/300) = 25.33333.$$

The chi-squared statistic (X-squared in output) is $$Q = \sum_{i=1}^2\sum_{j=1}^6 \frac{(X_{ij}-E_{ij})^2}{E_{ij}}=18.593,$$ which is distributed approximately as $$\mathsf{Chisq}(\nu),$$ where the number of degrees of freedom is $$\nu = (2-1)(6-1) = 5.$$ The P-value is the probability $$0.0023$$ under the density curve of $$\mathsf{Chisq}(5)$$ to the right of $$18.593.$$

In order for $$Q$$ to have this chi-squared distribution the $$E_{ij}$$s should exceed $$5,$$ which is true for your data.

out$$obs [,1] [,2] [,3] [,4] [,5] [,6] G1 20 17 13 25 5 20 G2 56 32 40 40 20 12 out$$exp
[,1]     [,2]     [,3]     [,4]      [,5]     [,6]
G1 25.33333 16.33333 17.66667 21.66667  8.333333 10.66667
G2 50.66667 32.66667 35.33333 43.33333 16.666667 21.33333
out$res [,1] [,2] [,3] [,4] [,5] [,6] G1 -1.0596259 0.1649572 -1.110272 0.7161149 -1.1547005 2.857738 G2 0.7492686 -0.1166424 0.785081 -0.5063697 0.8164966 -2.020726  The Pearson residuals are the square roots of the the $$rc = 12$$ contributions $$C_{ij} = \frac{(X_{ij}-E_{ij})^2}{E_{ij}},$$ given the signs of the differences $$D_{ij} = X_{ij}-E_{ij}.$$ Residuals with the largest absolute values point the way to the contributions most responsible for a large enough value $$Q$$ to lead to rejection. Here the key residuals are for the category None, so number of G1 subjects not having one of the five diseases is larger than expected if categories were homogeneous across groups. Otherwise, disease categories 1 and 5 seem different among the groups. Separate ad hoc tests (perhaps at the 1% level to avoid 'false discovery' according to the Bonferroni method), would show which differences are significant. • How critical is the 'assumption that disease categories are mutually exclusive'? 3 of categories listed are not in fact diseases, but biochemical statuses that are non specific markers for il health, and each can affect the other. Diabetes and cardiovascular health are interlinked. Commented Aug 25, 2020 at 5:03 • For a chi-squared test you need disjoint categories. Somehow you haven't made the purpose of your proposed analysis clear. // Is possible overlap of categories is the reason group counts don't add to group sizes 100 or 200? Maybe combine categories for disjointness. // Maybe look at disease vs. none. And separately at 'one or more markers" vs none. // But without knowing your objective it's difficult to provide useful advice. // Suggest major re-write of your question. Then maybe one of us can be more helpful. Commented Aug 25, 2020 at 15:10 • @BruceET thank you for your answer, but disease categories are not mutually exclusive, as an individual can have$0$diseases or$>1\$ disease. That is why I am confused as to whether there is a way to test the vectors of proportions against each other, or whether my only options is to do five separate two-proportion z-tests and adjust for multiplicity.
– bob
Commented Aug 25, 2020 at 15:34
• You can flip the binary logistic regression model to predict the group from the 5 disease occurrence variables. This is discussed in the binary logistic regression chapter in RMS. This uses a univariate approach to handle a multivariate problem, with minimal assumptions. The approach is due to Peter O'Brien. Commented Sep 17, 2021 at 12:27

What you have here is 5 variables with the same type (binary) of response. Most professional journals would analyze these individually. To analyze jointly you would need a multivariate method for (presumably correlated) binary variables. Off the top of my head I can think of treating them as multivariate normal observations on 5 variates, each with the binary response, and a common correlation matrix, or with a with a multiplicative logistic model which includes a random term to account for the correlation between measures for each subject and conditional upon which the observations are independent. I can't say I've ever seen either of these approaches.

• A note: because the data are proportions, modeling them with normal distributions isn't appropriate. Commented Apr 2, 2021 at 21:56