2
$\begingroup$

I have two variables, one continuous and one categorical which I currently both use as predictor variables in a logistic regression model.

Their relationship is shown in the following plot with the x axis showing the different categories of the categorical variable and the y axis showing the values of the continuous predictor variable.

enter image description here

Being quite new to statistics in general, I wonder if one can make general statements as to whether one should only use the categorical, only the continuous variable or whether in some situations it still makes sense to use both variables even if they are clearly correlated as in the plot above.

$\endgroup$
4
  • 2
    $\begingroup$ I think is hard to tell wether you should use one or both without knowing anything else about the context of the analysis. There might be very good substantive reasons for including both in the model. On the other hand, you want to avoid collinearity between your predictors, and if that is an issue then you could justify using only one of them based on that. $\endgroup$
    – David
    Commented May 21, 2013 at 23:01
  • 1
    $\begingroup$ An answer would in part depend on their relationship to the response. $\endgroup$
    – Glen_b
    Commented May 21, 2013 at 23:28
  • 5
    $\begingroup$ The categorical variable looks very suspicious, not because it's missing "J", but because the whiskers do not overlap at all, which prompted me to think that the categorical one is just a regrouped version of the continuous one. If that's the case, it's quite unlikely that both of them will be retained, because the continuous one is likely going to knock the categorical one out: the categorical is less predictive to begin with, and it takes whopping 11 degrees of freedom (12 if the blank one is real). If they are different things, then as the comments above said, we will need to know more. $\endgroup$ Commented May 22, 2013 at 2:55
  • 1
    $\begingroup$ @Penguin_Knight Yes you are right, I should have mentioned that the categorical variable is indeed a partition of the continuous variable. Even then it wasn't clear to me that it is obvious one can drop it. Thank you $\endgroup$
    – user695652
    Commented May 23, 2013 at 20:46

1 Answer 1

1
$\begingroup$

As it became clear in the comments that the categorical variable just was a binning of the continuous one, the answer is clear: Only use the continuous variable as a predictor.

But beware: assuming that a continuous variable acts linearly in logistic regression, is a strong assumption, so model it with a regression spline, see Logistic Regression with regression splines in R.

$\endgroup$

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.