Skip to content

Instantly share code, notes, and snippets.

{
"data_type":"stats",
"time_series_length":1,
"data":[
{
"id":"6c62d",
"id_data":[
{
"segment":{
"segment_name":"18-34",
import numpy as np
import statsmodels.api as sm
df = sm.datasets.ccard.load_pandas().data
df['intercept'] = 1.0
model = sm.Logit(df.OWNRENT, df[['intercept', 'AGE', 'INCOME']])
result = model.fit()
result.summary()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rc("savefig", dpi=200)
params = {'xtick.major.size' : 0,
'ytick.major.size' : 0}
for (k, v) in params.items():
plt.rcParams[k] = v
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.