1
$\begingroup$

I would like to know which is statistically more advisable and what are the advantages and disadvantages of each approach.

My data frame data has Y, the outcome, and A and B, the predictor variables. A and B are categorical with multiple levels each (the levels are A0, A1, A2, and A3 for A; and B0, B1, B2, and B3 for B). I want to explore the interaction A * Band calculate some epidemiological measures whose formulas are more manageable when A and B are binary each.

It is possible to keep a meaningful interpretation in my results if I split the data frame into several chunks and fit a logistic regression with binary predictors for each chunk of data. This has the advantage that I can easily calculate the epidemiological measures that are of interest for my analysis. However, this approach might compromise the sample size and there might be other disadvantages that I am not aware of.

Alternatively, I could use the full data frame and fit a single logistic regression with categorical predictors and do the same pairwise comparisons as above - more difficult but possible. This has the advantage of keeping a good sample size and probably other good properties that I am not aware of. But there might be some disadvantages that I might not be aware of and would like to know.

Thanks in advance for any help.

$\endgroup$
  • $\begingroup$ I don't agree. My question explores a different aspect. $\endgroup$ – Krantz Feb 16 at 21:56
  • $\begingroup$ I'm not sure I understand how your question is any different from fitting a model with an interaction effect between A & B (possibly after collapsing categories) and fitting separate models? This question has been asked many times on CV before. $\endgroup$ – StatsStudent Feb 16 at 22:08
  • $\begingroup$ model with an interaction effect between A & B after collapsing categories is not part of my question. I am not doing that in my analysis. $\endgroup$ – Krantz Feb 16 at 22:10
  • $\begingroup$ But you've written "I want to explore the interaction A * B and calculate some epidemiological measures whose formulas are more manageable when A and B are binary each. It is possible to keep a meaningful interpretation in my results if I split the data frame into several chunks and fit a logistic regression with binary predictors for each chunk of data." This sounds like trying to chose between interaction effects and fitting separate models. If that's not what you are asking, I would suggest editing this to make your question clearer. $\endgroup$ – StatsStudent Feb 16 at 22:30
1
$\begingroup$

logistic regression with categorical data will assume that there is a scale between the categories, it can not handle unordered categories.

Having said that, you could split A and B into one-hot encoded vectors and perform a logistic regression on this representation, which will only include binary variables.

If your analysis still applies to this model, you are golden. Otherwise, there will be differences between the chunked model and the full model.

$\endgroup$
  • $\begingroup$ Thanks, @Ulfgard. Could you provide some advantages and disadvantages of each approach along with some citable references if possible? $\endgroup$ – Krantz Feb 16 at 16:51
  • $\begingroup$ I'm not sure I understand this. Logistic regression can handle unordered categories. For example, it public health and medicine, it's very common to see logistic regression used with race as a categorical predictor and clearly there is no ordering of races. $\endgroup$ – StatsStudent Feb 16 at 22:44
  • $\begingroup$ If Logistic regression can handle unordered categories., then what would be the statistical disadvantage of single logistic regression with categorical predictors as compared to multiple logistic regressions with binary predictors? Any citable references? $\endgroup$ – Krantz Feb 16 at 22:58
  • $\begingroup$ I'm not sure I understand the need for multiple logistic regressions. When you include a categorical predictor in a model, the program is simply converting the categories to dummy variables in the background. So you as long as you coded the dummy variables the same way, a logistic regression model with dummies is the same as a logistic regression with a categorical variable. $\endgroup$ – StatsStudent Feb 16 at 23:28
  • $\begingroup$ Thanks, @StatsStudent. I have the same intuition as you. But could you help with some citable references to support this: So you as long as you coded the dummy variables the same way, multiple logistic regressions with binary predictors is the same as a single logistic regression with categorical predictors? $\endgroup$ – Krantz Feb 16 at 23:40

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.