In [196]:
import pandas as pd
from pandas import DataFrame
import statsmodels.api as sm
import pylab as pl
AuswertungExcel = pd.read_excel('Auswertung.xlsx')
import numpy as np
In [197]:
AuswertungExcel.columns
Out[197]:
In [198]:
#Partner
PartnerDataFrame = DataFrame()
In [199]:
PartnerDataFrame[[u'overMedian', u'Partner_ebay', u'Partner_Philips', u'Partner_WMF', u'Partner_a.t.u', u'Partner_aral', u'Partner_asstel', u'Partner_blume2000.de', u'Partner_c&a', u'Partner_dehner', u'Partner_expedia', u'Partner_express', u'Partner_galeria', u'Partner_hvb', u'Partner_itunes', u'Partner_linda', u'Partner_mexx', u'Partner_mydays', u'Partner_opel', u'Partner_quelle', u'Partner_real', u'Partner_rewe', u'Partner_sportarena.de', u'Partner_tchibo', u'Partner_telekom', u'Partner_yello', u'Partner_zalando', u'Satzzeiche_!', u'Satzzeiche_.', u'Satzzeiche_?']]=AuswertungExcel[[u'overMedian', u'Partner_ebay', u'Partner_Philips', u'Partner_WMF', u'Partner_a.t.u', u'Partner_aral', u'Partner_asstel', u'Partner_blume2000.de', u'Partner_c&a', u'Partner_dehner', u'Partner_expedia', u'Partner_express', u'Partner_galeria', u'Partner_hvb', u'Partner_itunes', u'Partner_linda', u'Partner_mexx', u'Partner_mydays', u'Partner_opel', u'Partner_quelle', u'Partner_real', u'Partner_rewe', u'Partner_sportarena.de', u'Partner_tchibo', u'Partner_telekom', u'Partner_yello', u'Partner_zalando', u'Satzzeiche_!', u'Satzzeiche_.', u'Satzzeiche_?']]
In [200]:
print PartnerDataFrame.std()
In [207]:
X_Kategorien = PartnerDataFrame[[u'Partner_ebay', u'Partner_WMF', u'Partner_a.t.u', u'Partner_aral', u'Partner_asstel', u'Partner_blume2000.de', u'Partner_c&a', u'Partner_dehner', u'Partner_expedia', u'Partner_express', u'Partner_galeria', u'Partner_hvb', u'Partner_itunes', u'Partner_linda', u'Partner_mexx', u'Partner_mydays', u'Partner_opel', u'Partner_quelle', u'Partner_real', u'Partner_rewe', u'Partner_sportarena.de', u'Partner_tchibo', u'Partner_telekom', u'Partner_yello', u'Partner_zalando', u'Satzzeiche_?']]
X_Kategorien = sm.add_constant(X_Kategorien)
In [208]:
Y_Overmedian = PartnerDataFrame['overMedian']
In [209]:
#X_Kategorien
In [210]:
X_Kategorien_Train = X_Kategorien
Y_Overmedian_Train = Y_Overmedian
In [211]:
logit = sm.Logit(Y_Overmedian_Train,X_Kategorien_Train)
In [212]:
result = logit.fit()
In [213]:
result.summary()
Out[213]:
In [ ]:
In [ ]:
In [ ]: