import pandas as pd
import statsmodels.api as sm
data = {
'y': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
'x0': [1] * 66,
'x1': [-62.8, 3.3, -120.8, -18.1, -3.8, -61.2, -20.3, -194.5, 20.8, -106.1,
-39.4, -164.1, -308.9, 7.2, -118.3, -185.9, -34.6, -27.9, -48.2,
-49.2, -19.2, -18.1, -98.0, -129.0, -4.0, -8.7, -59.2, -13.1, -38.0,
-57.9, -8.8, -64.7, -11.4, 43.0, 47.0, -3.3, 35.0, 46.7, 20.8, 33.0,
26.1, 68.6, 37.3, 59.0, 49.6, 12.5, 37.3, 35.3, 49.5, 18.1, 31.4, 21.5,
8.5, 40.6, 34.6, 19.9, 17.4, 54.7, 53.5, 35.9, 39.4, 53.1, 39.8, 59.5,
16.3, 21.7],
'x2': [-89.5, -3.5, -103.2, -28.8, -50.6, -56.2, -17.4, -25.8, -4.3, -22.9,
-35.7, -17.7, -65.8, -22.6, -34.2, -280.0, -19.4, 6.3, 6.8, -17.2,
-36.7, -6.5, -20.8, -14.2, -15.8, -36.3, -12.8, -17.6, 1.6, 0.7, -9.1,
-4.0, 4.8, 16.4, 16.0, 4.0, 20.8, 12.6, 12.5, 23.6, 10.4, 13.8, 33.4,
23.1, 23.8, 7.0, 34.1, 4.2, 25.1, 13.5, 15.7, -14.4, 5.8, 5.8, 26.4,
26.7, 12.6, 14.6, 20.6, 26.4, 30.5, 7.1, 13.8, 7.0, 20.4, -7.8],
'x3': [1.7, 1.1, 2.5, 1.1, 0.9, 1.7, 1.0, 0.5, 1.0, 1.5, 1.2, 1.3, 0.8, 2.0,
1.5, 6.7, 3.4, 1.3, 1.6, 0.3, 0.8, 0.9, 1.7, 1.3, 2.1, 2.8, 2.1, 0.9,
1.2, 0.8, 0.9, 0.1, 0.9, 1.3, 1.9, 1.9, 2.7, 1.9, 0.9, 2.4, 1.5, 2.1,
1.0, 1.5, 1.8, 1.5, 2.6, 4.0, 1.9, 1.0, 1.5, 1.8, 2.3, 1.3, 1.7, 1.1,
2.0, 1.9, 1.9, 1.2, 2.0, 1.0, 1.6]
}
df = pd.DataFrame(data)
model = sm.Logit(df['y'], df[['x0', 'x1', 'x2', 'x3']])
result = model.fit()
print(result.summary())