# Can you use logistic regression on predictors that are binary (0 or 1) [duplicate]

How well does logistic regression behave with a large number of predictor variables that are all binary?

So say p > 1000 (number of predictors) and the Range(p) = 0 or 1

• I guess it would work to some extend, probably also depending on how balanced your outcomes are. But why don't you give a bit of info as to why you'd do this i the first place as opposed to use a more suitable model?
– sheß
May 10, 2016 at 17:25
• Why wouldn't logistic regression work in this case? There is no assumption on the predictors in the logistic regression model, they are just known constants? May 10, 2016 at 17:27
• @kjetilbhalvorsen, that's what I thought but then the other commenter seems to be saying that logistic regression may not be the best suited? May 10, 2016 at 17:28
• @sheß well I have a binary classification problem where all my predictors (several thousand) are all binary ... thoughts? May 10, 2016 at 17:29
• As long as p < n you should be fine. Your model will be something like $\log{\frac{\mu_0}{\mu_0+\mu_1}}=x\beta$. In fact, the results will be exactly the same as if you passed your data in a grouped form BUT you cannot use the deviance to assess your model fit. You can use the LRT, but not the deviance. May 10, 2016 at 17:44