# number of pairwise comparisons in Bonferroni correction

#### bahjat

##### New Member
Hello.
I did chi square test on data of 60 patients having COVID 19.
The variable in the rows is the severity of case (mild, moderate, severe)
while the variable in the columns is lymphocytes count (normal, lymphopenia).
I found a significant diference and I liked to do a post hoc test using Bonferroni correction
and it is known that we should divide the alpha level 0.05 on the number of pairwise comparisons
and here I got confused about how to calculate the number of pairwise comparisons because I searched online
and found two different ways to calculate the number of pairwise comparisons:
First way, I have three pairwise comparisons coming from comarison of severity categories (mild to moderate), (mild to severe) and (moderate to severe).
Second way, I have six pairwise comparions that come from multiplying number of rows by number of columns i.e. 3 by 2 equaling 6.
So, which way should I use and why?

#### Attachments

• 56.6 KB Views: 3

#### bahjat

##### New Member
by my count this is three....
If I do three comparisons will this mean ignoring the difference between lymphocytes categories (norml vs lymphopenia) and just
checking differences among severity categories?

#### fed2

##### Active Member
ummmmmmmm, no. The lymph categories will be dependent, i don't know if that counts as 'ignoring' them. So basically you would have 3 chi square tests on 2 x 2 tables. assuming this is what you are trying to do, maybe not.

#### bahjat

##### New Member
Yes you are right, 3 chi square tests on 2 x 2 tables thanks for your clarification. Now I divide 0.05 by 3 and the p value used to test for significance will be 0.016, and below I attached a snapshot of Excel file in which I did the calculations, how to interpret results? the numbers that are in yellow shadow they represent p values, right? so what is the p value of comparison between mild vs moderate, what is the p value of mild vs severe and what is the p value of moderate vs severe? Sorry if I am bothering you with questions.

#### Attachments

• 29.5 KB Views: 3

#### fed2

##### Active Member
this looks like the p-value for comparing lymph vs normal based on comparing column props dichotomized as in the column group or not.
For example 0.0372 is chi square for this table
lymph,not
moderate,11,11
not moderate,9,29

is that what you wantto do?

#### hlsmith

##### Less is more. Stay pure. Stay poor.
I didn't read the above posts. Why convert lymphocytes to groups, you lose info. Plot three histograms and post those. Also, how did you define COVID-19 into three groups? What was the criteria?

P.S., Chi-sq sucks - it doesn't tell you anything clinically!!!

#### bahjat

##### New Member
this looks like the p-value for comparing lymph vs normal based on comparing column props dichotomized as in the column group or not.
For example 0.0372 is chi square for this table
lymph,not
moderate,11,11
not moderate,9,29

is that what you wantto do?
What I want is to see what subgroup is responsible for the significance and I did the calculations as described in many websites
and I understand the meaning of adjusted residuals but I just don't understand the meaning of each p value in each cell
that are below adjusted residuals and highlighted with yellow color.

#### bahjat

##### New Member
I didn't read the above posts. Why convert lymphocytes to groups, you lose info. Plot three histograms and post those. Also, how did you define COVID-19 into three groups? What was the criteria?

P.S., Chi-sq sucks - it doesn't tell you anything clinically!!!
Hi. I already analyzed data in the way you mention i.e. without grouping into normal and lymphopenia
but I liked to analyze it in a different way which is grouping. Severity of cases was defined on clinical base including
extent of lung infiltration and oxygen saturation and other indicators

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Well you are losing even more information creating a 'composite' severity classification. Categorizing lymphocytes is silly. What day was lymphocytes collected on, and is it the same for everyone?

Categorizing lymphocytes is like telling me last night I was overweight since my BMI was 30.0 and telling me this morning my weight is fine since I have a BMI of 29.9 after exhaling a liter of moister while sleeping. Just treat it like a continuous variable. You may have to use a transformation or nonparametric, but forcing this into a chi-sq is pointless. Telling a clinician about a standardized residuals and backassward pvalues has not utility. Plus given your sample size is also silly. Given them an effect estimate with a couple precision bounds so they can make up their own minds on clinical significances and irrelevant statistical significance.

Or given them the actual pvalue interpretation and watch them sink - the probability of the null hypothesis being true given as extreme results conditional on blank and blank. And oh yeah if you want to interpret this here are residuals. And you would multiply all of the pvalues by 3 due to the the number of possible comparisons - so you lose some more power there.

P.S., Did all of the patients have the same SARS-CoV-2 strain? If not, you got some heterogeneity and generalizable issues there. And what was their vax status. Pretty soon your sparsity in a sample of 60 is so overwhelming you have nothing. And can you know all of the composite severity info prior to lymphocyte value and if so, are any of them mutable - so as to be able to intervene on them and change lymphocyte values?

#### bahjat

##### New Member
I didn't read the above posts. Why convert lymphocytes to groups, you lose info. Plot three histograms and post those. Also, how did you define COVID-19 into three groups? What was the criteria?

P.S., Chi-sq sucks - it doesn't tell you anything clinically!!!
Hi. I already analyzed data in the way you mention i.e. without grouping into normal and lymphopenia
but I liked to analyze it in a different way which is grouping. Severity of cases was defined on clinical base including
extent of lung infiltration and oxygen saturation and other indicators
Well you are losing even more information creating a 'composite' severity classification. Categorizing lymphocytes is silly. What day was lymphocytes collected on, and is it the same for everyone?

Categorizing lymphocytes is like telling me last night I was overweight since my BMI was 30.0 and telling me this morning my weight is fine since I have a BMI of 29.9 after exhaling a liter of moister while sleeping. Just treat it like a continuous variable. You may have to use a transformation or nonparametric, but forcing this into a chi-sq is pointless. Telling a clinician about a standardized residuals and backassward pvalues has not utility. Plus given your sample size is also silly. Given them an effect estimate with a couple precision bounds so they can make up their own minds on clinical significances and irrelevant statistical significance.

Or given them the actual pvalue interpretation and watch them sink - the probability of the null hypothesis being true given as extreme results conditional on blank and blank. And oh yeah if you want to interpret this here are residuals. And you would multiply all of the pvalues by 3 due to the the number of possible comparisons - so you lose some more power there.

P.S., Did all of the patients have the same SARS-CoV-2 strain? If not, you got some heterogeneity and generalizable issues there. And what was their vax status. Pretty soon your sparsity in a sample of 60 is so overwhelming you have nothing. And can you know all of the composite severity info prior to lymphocyte value and if so, are any of them mutable - so as to be able to intervene on them and change lymphocyte values?
Thanks for your detailed and useful explanation. Yes it seems that I better deal with lymphocytes as a continuous variable. Regarding SARS-CoV-2 strain and vaccination status I didn't take them into account.

#### fed2

##### Active Member
I just don't understand the meaning of each p value in each cell
that are below adjusted residuals and highlighted with yellow color.
this looks like the p-value for comparing lymph vs normal based on comparing column props dichotomized as in the column group or not.
For example 0.0372 is chi square for this table
lymph,not
moderate,11,11
not moderate,9,29