2
$\begingroup$

I've got a set of 1000 patients and I am measuring two different blood values (CRP and IL6) and choosing a categorical cutoff values for both (CRP>10 and IL6 >2). I now would like to know if there is a correlation between the two categorical variables.

Which test should I use for comparing the categorical variables? (I suppose Chi Square test or McNemar test?) Are those variables paired or unpaired/independent?

(For comparing the continuous values one should probably use Pearson or Spearman correlation depending on if the variables are normally distributed?)

$\endgroup$
3
  • 2
    $\begingroup$ Why are you choosing cutoffs? And on what basis? Usually it's not a good idea to break continuous variables into categories. $\endgroup$
    – EdM
    Commented Dec 15, 2019 at 23:57
  • 1
    $\begingroup$ I am using established cutoff values. (And i want to present the tests for the continous and categorical variables) $\endgroup$
    – R-Testerr
    Commented Dec 16, 2019 at 0:45
  • 1
    $\begingroup$ For the categorical variables, it sounds like you are interested in phi or Cramer's V to assess the degree of association, and if you want a hypothesis test, probably a chi-square test of association. $\endgroup$ Commented Dec 16, 2019 at 1:53

1 Answer 1

2
$\begingroup$

You first need to answer the question: "What type of correlation between these 2 categorical variables do I care about?"

Even for a 2 x 2 table like yours, there are at least 21 different objective measures of association to choose among, enumerated by Tan et al, Information Systems 29: 293-313, 2004. The choice among them has to do with what aspects of the association you wish to emphasize. The measures differ in terms of symmetry in variable permutation, invariance upon scaling rows and columns, and so forth.

Your two examples help to illustrate the issues. The phi coefficient recommended in a comment is closely related to the $\chi^2$ test; the $\chi^2$ statistic is the square of phi times the total number of counts ($N$) in a 2 x 2 table. That takes into account all observations in the 4 cells of the table, in a symmetric way. McNemar's test ignores the cases in which both are positive or both are negative, and uses only the cases in which the two classifications disagree to form its statistic.

The phi coefficient and its associated $\chi^2$ test might be the simplest to understand or explain to someone else, and it has the advantage of being calculated like the Pearson correlation coefficient in a 2 x 2 table.* But before you jump to use it, spend a bit of time thinking about the types of correlations you care about between your dichotomized measures.

Finally, having said all that, I still think that you will be better off examining CRP and IL6 as continuous values. Plots of one versus the other, perhaps overlaid with a smoothed curve as provided by loess, should provide a good deal more insight into the relationships between their values than will any categorical analysis based on arbitrary (even if "established") cutoff values.


*I've based this on a definition of phi that allows it to range over [-1,1] for a 2 x 2 table. Some define phi $= \sqrt{\chi^2/N}$, in which case it ranges over [0,1] and is equivalent to Cramer's V for a 2 x 2 table.

$\endgroup$
3
  • $\begingroup$ Thank you very much for you answer! I read that Chi Square test ist for independent(/unpaired) variables only. Are the both blood values I am meassuring unpaired even though they are being measured within the same patient group? Is it allowed to chose Chi Square test here? Would the variables still be independent(/unpaired) if I had two composite parameters A=C+D and B=C+F which are being measured within the same patient group? Sorry for my bad english + statistics knowledge $\endgroup$
    – R-Testerr
    Commented Dec 19, 2019 at 12:43
  • 1
    $\begingroup$ @R-Testerr consider separately the issues of the correlation value to display and the test to run. This answer discusses how to analyze data when 2 different measurements have been made on the same individuals, examining 3 different types of hypotheses and the ways they might be tested. McNemar's test is correct for some questions asked of paired data, but your audience might understand the phi coefficient better than McNemar's statistic. A chi-square test, ignoring pairing, will lead to lower power so your risk with it is false negatives. $\endgroup$
    – EdM
    Commented Dec 19, 2019 at 16:42
  • 1
    $\begingroup$ @R-Testerr note that there are several flavors of McNemar's test, extensively compared in Statist. Med. 33: 2850-2875, 2014 along with ways to calculate confidence intervals for paired proportion differences, ratios, and odds ratios. Note that bootstrapping can provide estimates of bias and confidence intervals for measures of association other than McNemar's test even if they don't have explicit mathematical representations. So again, think about what form of association you wish to emphasize. $\endgroup$
    – EdM
    Commented Dec 20, 2019 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.