Skip to content

Instantly share code, notes, and snippets.

@glamp
Last active December 25, 2018 03:25
Show Gist options
  • Save glamp/5074027 to your computer and use it in GitHub Desktop.
Save glamp/5074027 to your computer and use it in GitHub Desktop.
train_cols = data.columns[1:]
# Index([gre, gpa, prestige_2, prestige_3, prestige_4], dtype=object)
logit = sm.Logit(data['admit'], data[train_cols])
# fit the model
result = logit.fit()
@vickytilotia
Copy link

yeah!!!
use
import statsmodels as sm
instead of
import statsmodels.api as sm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment