I am working on a problem to identify the risk factors to infection after operation. So there are risk factors such as age, pre existing condition, cause of infection etc. Since the dependent variable and most of variables are categorical data, I used logistic regression first, in which the factor A is not significant.

Just want to double confirm, I used chi square test just between the dependent variable and A, this time the P value is 0.03 which means they are correlated. Can anyone give me a hint? Does this imply the correlation between the factors?


1 Answer 1


A few points:

1) The fact that the independent variables are categorical is irrelevant for the choice of logistic regression.

2) A significant chi-square value means the two variables are associated, but if both are categorical, it's not really correlation. If both variables have only 2 levels, there are analogues of correlation.

3) (your main question) It appears you did a logistic regression with multiple independent variables and compared it to a chi-square test between only two variables (infection and A). These ask two different questions, so they get different answers. The first asks whether A affects the odds of infection after controlling for other variables. The second does not control for any other variables. If all the independent variables were completely unrelated, then I believe the effect sizes (odds ratios) would stay the same. However, this hardly ever happens in real life (except in some very controlled experiments).

4) Just as an aside, it is better to look at effect sizes, not just p values.

  • $\begingroup$ I was going to say "Shame on you" for using "affects" instead of "links with," "is associated with," etc. but then I realized the variable certainly could affect what odds are obtained (i.e., printed out). $\endgroup$
    – rolando2
    Nov 7, 2013 at 15:52
  • $\begingroup$ Oh, yeah, that causal language thing trips me every so often; I know better but it's so natural to write that way. $\endgroup$
    – Peter Flom
    Nov 7, 2013 at 16:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.