# Binary logistic regression with multiple independent variables

I have a group of 196 patients. I want to know if infection (the outcome, or dependent variable) depends on other variables. I am running a binary logistic regression with 8 independent variables (age, gender, type of surgery—6 different types, type of fixation, type of antibiotics). The categorical variables are automatically put into dummies by SPSS.

Some of my categorical variables have low frequencies (<5).

Can I run a binary logistic regression? Are the results reliable?

Update:
I have no categories with 0 patients, only some with only 1 or 2 patients. So I ran the regression and SPSS gives me the output above. Can I say that TRTCD2 and QSORRES are statistically significant? And that the p value or 1 or almost 1 are due to the small frequencies in this group?

• I edited your question. I assume that you switched dependent (the variable you want to explain) and independent variables (the variables that do the explaining). Correct me if I am wrong. – Maarten Buis Mar 21 '16 at 10:33
• You can say it is significant based on the P values...but we usually like to check for multicollinearty and reduce the number of predictors before assessing significance. I would suggest providing more information about your hypotheses and predictors. You should also note that some people do not consider Wald tests to be reliable and if you have a particular hypothesis in mind, you might be better off comparing nested models using a likelihood ratio test. – coreydevinanderson Dec 16 '17 at 3:11

At the heart of binary logistic regression is the estimation of the probability of an event. As detailed in RMS Notes 10.2.3 the minimum sample size needed just to estimate the intercept in a logistic model is 96 and that still results in a not great margin of error of +/- 0.1 in the estimated (constant) probability of event. If you had a single binary predictor the minimum sample size is 96 per each of the levels. So your sample size is insufficient for the task at hand. Not that p-values do not help this situation in any way.

Let's start with the easy case: If an independent variable has 0 people in one category, that category can't add anything to the model as ... well, there is nothing to model.

When categories have small numbers (but not 0), the standard errors tend to be large. E,g,

set.seed(123)
age <- rnorm(100, 25, 10)
catvar <- c("A", rep("B", 99))
depvar <- c(rep(0, 50), rep(1, 50))
mod1 <- glm(depvar~age + catvar, family = "binomial")
summary(mod1)

• – erica Mar 21 '16 at 12:04
• That seems logic. I have no categories with 0 patients, only some with only 1 or 2 patients. So I ran the regression and SPSS gives me the output above. Can I say that TRTCD2 and QSORRES are statistically significant. And that the p value or 1 or almost 1 are due to the small frequencies in this group? – erica Mar 21 '16 at 12:04