My issue is perfect separation with a logistic model testing two binary factors and their interaction on the dependent variable. When I do not include the interaction term, the model works, when I include the interaction term I get
"PerfectSeparationError: Perfect separation detected, results not available"
There is already a question answered on perfect separation for logistic regression, but this question specifically pertains to perfect separation error with an interaction term in the model.
Here is my data Dataframe
My code:
endog_cols = df.columns[1:3]
exog_cols = df.columns[4:8]
logit2 = sm.GLM(df[endog_cols], df[exog_cols], family = sm.families.Binomial()).fit()