Last active
November 1, 2024 15:18
-
-
Save jkclem/42f504bd34ac6c07e8a513e7704757e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from statsmodels.discrete.discrete_model import Logit | |
# add an intercept since statsmodels does not | |
my_data['Intercept'] = 1 | |
# fit the logistic regression model using MLE | |
mle_mod = Logit(my_data[target], my_data[['Intercept'] + vars_of_interest]) | |
mle_mod_fit = mle_mod.fit(disp=False) | |
# print the summary | |
print(mle_mod_fit.summary()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment