Is it possible to conduct a regression if all dependent and independent variables are categorical variables?

  • 3
    $\begingroup$ It's certainly possible, even for common or garden regression, so long as the response (dependent) variable is be treated purely numerically. Depending on your software, you may need to push or force that to happen. With a suitably wide definition of regression, to include logistic or ordinal regression, it's not only possible, it's commonplace. $\endgroup$ – Nick Cox Jul 28 '13 at 14:17

We need to be clear on our terms here, but in general, yes:

  • If your dependent variable is continuous (and the residuals are normally distributed—see here), but all of your independent variables are categorical, this is just an ANOVA.
  • If your dependent variable is categorical and your independent variables are continuous, this would be logistic regression (possibly binary, ordinal, or multinomial, depending).
  • If both your dependent variable and your independent variables are categorical variables, you can still use logistic regression—it's kind of the ANOVA-ish version of LR.

Note that both logistic regression and ordinary least squares (linear) regression are special cases of the Generalized Linear Model.

  • $\begingroup$ It is the third case that you have mentioned, i tried LR, none of the coefficients found to be significant. I thought i might be doing something wrong. $\endgroup$ – altruist Jul 28 '13 at 14:20
  • 2
    $\begingroup$ I don't think ANOVA requires a continuous dependent variable any more than it requires normally distributed residuals. These are just conditions under which ANOVA is expected to work well. $\endgroup$ – Nick Cox Jul 28 '13 at 14:20
  • 1
    $\begingroup$ @NickCox, you're right, of course; we're quibbling over how we define & apply these terms. The way I would put it is that the model is derived from those assumptions, but the ANOVA can be used even if they aren't met, w/ the question of whether the results will be helpful depending. $\endgroup$ – gung - Reinstate Monica Jul 28 '13 at 14:25
  • 1
    $\begingroup$ @altruist, I laid out the three cases for the sake of conceptual clarity; I recognize that the last is what you want. Note that whether or not you're using the software correctly to fit the model & whether or not your coefficients are 'significant' is unrelated to whether or not LR is the appropriate model for your situation. $\endgroup$ – gung - Reinstate Monica Jul 28 '13 at 14:27
  • 5
    $\begingroup$ Note that being categorical is sometimes a matter of definition for the software, and sometimes in the mind of the beholder. What is number of children, for example? $\endgroup$ – Nick Cox Jul 28 '13 at 14:31

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.