I'm modeling (using GLM) one binary explanatory variable against a binary response variable.

The output looks ok to me, but I'm a biologist with a basic knowledge of stats, I just wanted to ask if there's any rule/caveat/problem for modeling a binary versus a binary?


In the general linear model the explanatory variables can be binary, categorical, discrete or continuous but the response variable is generally continuous. For a generalized linear model the explanatory variables can still be binary, categorical, discrete or continuous but applying the logit as the link function allows for the response variable to be binary too. So that is a longwinded way of saying in a generalized linear model you can have a binary explanatory variable with a binary response.

  • 5
    $\begingroup$ +1, in addition to @MichaelChernick's answer, you may find it simpler to use a $\chi^2$ test of independence for a 2x2 contingency table, which is, in essence, a special case of the GLiM where both variables are binary. $\endgroup$ – gung Aug 8 '12 at 17:15
  • $\begingroup$ @Gung Nice point. $\endgroup$ – Michael Chernick Aug 8 '12 at 17:29
  • $\begingroup$ Interesting, @gung, that you would recommend a chi-square test per se, as opposed to assessing odds ratios or a phi correlation. The former yields a statement about probability; that latter two, statements about effect size, which are normally more interesting to both of us, I think. $\endgroup$ – rolando2 Aug 8 '12 at 22:30
  • $\begingroup$ Hi, @rolando2, I think you're right, of course. I only mention that it's simpler, which can be a virtue in some circumstances. $\endgroup$ – gung Aug 8 '12 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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