In [50]:
import statsmodels.formula.api as smf
import numpy as np
import pandas as pd
from pandas import DataFrame
import matplotlib.pyplot as plt
Auswertung = pd.read_excel('Auswertung.xlsx')

In [2]:


In [2]:


In [3]:
final=pd.read_excel('final_version_patrick.xlsx')

In [4]:
final.columns


Out[4]:
Index([u'Betreff', u'OeffnungsrateClean', u'ObUeberMedian', u'Kategorie', u'Satzzeichen', u'Anrede', u'highlight_0', u'highlight_1', u'highlight_2', u'highlight_3', u'partner_0', u'partner_1', u'Incentive_0', u'Incentive_1', u'ifSatzzeichen', u'ifPartner', u'ifIncentive', u'ifHighlight', u'ifAnrede', u'Partner0_a.t.u', u'Partner0_aral', u'Partner0_asstel', u'Partner0_blume2000.de', u'Partner0_c&a', u'Partner0_dehner', u'Partner0_dm', u'Partner0_ebay', u'Partner0_expedia', u'Partner0_express', u'Partner0_galeria', u'Partner0_hvb', u'Partner0_itunes', u'Partner0_linda', u'Partner0_mexx', u'Partner0_mydays', u'Partner0_opel', u'Partner0_philips', u'Partner0_quelle', u'Partner0_real', u'Partner0_rewe', u'Partner0_sportarena.de', u'Partner0_tchibo', u'Partner0_telekom', u'Partner0_wmf', u'Partner0_yello', u'Partner0_zalando', u'Satzzeiche_!', u'Satzzeiche_.', u'Satzzeiche_?', u'Anrede_anrede', u'Anrede_title', u'Partner1_dm', u'Partner1_ebay', u'Partner1_philips', u'Partner1_wmf', u'Highlights0_angebot', u'Highlights0_bestpreisgarantie', u'Highlights0_exklusiv', u'Highlights0_geschenk', u'Highlights0_gewinn', u'Highlights0_gratis', u'Highlights0_highlight', u'Highlights0_jetzt', u'Highlights0_nur', u'Highlights0_prämie', u'Highlights0_punktestand', u'Highlights0_rabatt', u'Highlights0_reduziert', u'Highlights0_sale', u'Highlights0_schnell', u'Highlights0_sichern', u'Highlights0_sparen', u'Highlights0_wichtig', u'Highlights0_wsv', u'Highlights0_wuensche', u'Highlights0_wünsche', u'Highlights1_angebot', u'Highlights1_geschenk', u'Highlights1_gewinn', u'Highlights1_gratis', u'Highlights1_highlight', u'Highlights1_jetzt', u'Highlights1_nur', u'Highlights1_prämie', u'Highlights1_punktestand', u'Highlights1_reduziert', u'Highlights1_sale', u'Highlights1_schnell', u'Highlights1_sichern', u'Highlights1_sparen', u'Highlights1_special', u'Highlights2_gewinn', u'Highlights2_jetzt', u'Highlights2_nur', u'Highlights2_prämie', u'Highlights2_reduziert', u'Highlights2_sichern', u'Highlights2_sparen', u'Highlights2_special', u'Highlights3_gewinn', ...], dtype='object')

In [5]:
final[u'Satzzeichen'].head()


Out[5]:
0      !
1    NaN
2    NaN
3      !
4      !
Name: Satzzeichen, dtype: object

In [6]:
Satzzeichen = final[[u'OeffnungsrateClean',u'Satzzeichen']]

In [7]:
mod = smf.ols(formula='OeffnungsrateClean ~ Satzzeichen',data=Satzzeichen)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.509
Model:                            OLS   Adj. R-squared:                  0.501
Method:                 Least Squares   F-statistic:                     63.80
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           9.81e-20
Time:                        11:32:49   Log-Likelihood:                 166.43
No. Observations:                 126   AIC:                            -326.9
Df Residuals:                     123   BIC:                            -318.4
Df Model:                           2                                         
Covariance Type:            nonrobust                                         
====================================================================================
                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
------------------------------------------------------------------------------------
Intercept            0.2584      0.006     42.945      0.000         0.246     0.270
Satzzeichen[T..]     0.5554      0.066      8.461      0.000         0.425     0.685
Satzzeichen[T.?]     0.1949      0.025      7.666      0.000         0.145     0.245
==============================================================================
Omnibus:                       14.917   Durbin-Watson:                   2.109
Prob(Omnibus):                  0.001   Jarque-Bera (JB):               49.909
Skew:                           0.172   Prob(JB):                     1.45e-11
Kurtosis:                       6.064   Cond. No.                         11.3
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [8]:
# Satzzeichen scheint eine große Auswirkung auf die Oeffnungsrate zu haben
# der Schnittswert mit ! als Basis ist 0,2584
# Wenn stattdessen wir ein . als beenedes Satzzeichen haben steigt die Oeffnungsrate im Durchschnitt auf 0,2584 + 0,5544 = 0,8138
# 214.93808049% Steigerung (im Vergleich zu der Basis)
# Wenn wir ein Fragezeichen hier anwenden steigt der Wert im Durchschnitt auf 0,2584 + 0,1949 = 0,5553 #76.1997% Steigerung

In [8]:


In [8]:


In [9]:
mod = smf.ols(formula='OeffnungsrateClean ~ Anrede',data=final)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.009
Model:                            OLS   Adj. R-squared:                 -0.012
Method:                 Least Squares   F-statistic:                    0.4108
Date:                Mon, 01 Jun 2015   Prob (F-statistic):              0.525
Time:                        11:32:49   Log-Likelihood:                 32.037
No. Observations:                  49   AIC:                            -60.07
Df Residuals:                      47   BIC:                            -56.29
Df Model:                           1                                         
Covariance Type:            nonrobust                                         
===================================================================================
                      coef    std err          t      P>|t|      [95.0% Conf. Int.]
-----------------------------------------------------------------------------------
Intercept           0.2990      0.021     14.153      0.000         0.256     0.341
Anrede[T.title]     0.0274      0.043      0.641      0.525        -0.059     0.113
==============================================================================
Omnibus:                       32.363   Durbin-Watson:                   2.039
Prob(Omnibus):                  0.000   Jarque-Bera (JB):               72.339
Skew:                           1.916   Prob(JB):                     1.96e-16
Kurtosis:                       7.555   Cond. No.                         2.49
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [10]:
# Anrede = titel,anrede
# die Auswertung ist im Vergleich zu anrede
# hier haben wir keine signifikanten Ergebnisse

In [11]:
Partner = final[[u'OeffnungsrateClean',u'partner_0']]

In [12]:
mod = smf.ols(formula='OeffnungsrateClean ~ partner_0',data=Partner)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.386
Model:                            OLS   Adj. R-squared:                  0.258
Method:                 Least Squares   F-statistic:                     3.025
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           2.10e-05
Time:                        11:32:50   Log-Likelihood:                 206.56
No. Observations:                 152   AIC:                            -359.1
Df Residuals:                     125   BIC:                            -277.5
Df Model:                          26                                         
Covariance Type:            nonrobust                                         
==============================================================================================
                                 coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------
Intercept                      0.1854      0.040      4.684      0.000         0.107     0.264
partner_0[T.aral]              0.0430      0.052      0.821      0.413        -0.061     0.147
partner_0[T.asstel]            0.0241      0.056      0.431      0.667        -0.087     0.135
partner_0[T.blume2000.de]      0.0873      0.079      1.103      0.272        -0.069     0.244
partner_0[T.c&a]               0.0542      0.079      0.685      0.495        -0.102     0.211
partner_0[T.dehner]            0.0792      0.063      1.265      0.208        -0.045     0.203
partner_0[T.dm]                0.1072      0.041      2.614      0.010         0.026     0.188
partner_0[T.ebay]              0.0499      0.063      0.797      0.427        -0.074     0.174
partner_0[T.expedia]           0.0429      0.046      0.924      0.357        -0.049     0.135
partner_0[T.express]           0.0246      0.056      0.440      0.661        -0.086     0.135
partner_0[T.galeria]           0.1556      0.044      3.516      0.001         0.068     0.243
partner_0[T.hvb]              -0.0175      0.079     -0.222      0.825        -0.174     0.139
partner_0[T.itunes]            0.0535      0.063      0.855      0.394        -0.070     0.177
partner_0[T.linda]             0.0035      0.056      0.063      0.950        -0.107     0.114
partner_0[T.mexx]              0.0045      0.063      0.071      0.943        -0.119     0.128
partner_0[T.mydays]            0.0379      0.052      0.723      0.471        -0.066     0.142
partner_0[T.opel]             -0.0168      0.048     -0.346      0.730        -0.113     0.079
partner_0[T.philips]           0.0545      0.056      0.974      0.332        -0.056     0.165
partner_0[T.quelle]            0.0499      0.079      0.630      0.530        -0.107     0.207
partner_0[T.real]              0.0302      0.052      0.577      0.565        -0.073     0.134
partner_0[T.rewe]              0.0699      0.043      1.613      0.109        -0.016     0.156
partner_0[T.sportarena.de]     0.1087      0.063      1.736      0.085        -0.015     0.233
partner_0[T.tchibo]            0.0927      0.079      1.171      0.244        -0.064     0.249
partner_0[T.telekom]           0.0578      0.044      1.317      0.190        -0.029     0.145
partner_0[T.wmf]               0.1718      0.046      3.759      0.000         0.081     0.262
partner_0[T.yello]             0.0092      0.063      0.146      0.884        -0.115     0.133
partner_0[T.zalando]           0.0494      0.052      0.943      0.348        -0.054     0.153
==============================================================================
Omnibus:                      113.932   Durbin-Watson:                   2.083
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             2214.621
Skew:                           2.314   Prob(JB):                         0.00
Kurtosis:                      21.118   Cond. No.                         40.1
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [13]:
# Hier ist die Basis a.t.u. als Partner mit dem Durchschnitt von 0,1854
# Signifikant: dm als Partner in der Betreffzeile korreliert mit einem Offnungsrate von 0,1854 + 0,1072 = 0,2926 eine Steigerung von 
# 57.8209%
# Signifikant: galeria  als Partner in der Betreffzeile korreliert mit einem Offnungsrate von 0,1854 + 0,1556 = 0,3410 eine Steigerung von 
# 83.9266%
# Signifikant: wmf  als Partner in der Betreffzeile korreliert mit einem Offnungsrate von 0,1854 + 0,1718 = 0,3572 eine Steigerung von 
# 92.6645%

In [14]:
Kategorie = final[[u'OeffnungsrateClean',u'Kategorie']]

In [15]:
mod = smf.ols(formula='OeffnungsrateClean ~ Kategorie',data=Kategorie)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.384
Model:                            OLS   Adj. R-squared:                  0.189
Method:                 Least Squares   F-statistic:                     1.969
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           1.51e-05
Time:                        11:32:50   Log-Likelihood:                 527.98
No. Observations:                 371   AIC:                            -876.0
Df Residuals:                     281   BIC:                            -523.5
Df Model:                          89                                         
Covariance Type:            nonrobust                                         
=======================================================================================
                          coef    std err          t      P>|t|      [95.0% Conf. Int.]
---------------------------------------------------------------------------------------
Intercept               0.3063      0.039      7.918      0.000         0.230     0.382
Kategorie[T.AHH]       -0.0413      0.077     -0.534      0.594        -0.194     0.111
Kategorie[T.AHI]       -0.0829      0.061     -1.355      0.177        -0.203     0.038
Kategorie[T.AHP]        0.0316      0.077      0.409      0.683        -0.121     0.184
Kategorie[T.AHPHS]      0.2112      0.061      3.454      0.001         0.091     0.332
Kategorie[T.AHS]       -0.0255      0.061     -0.417      0.677        -0.146     0.095
Kategorie[T.AI]         0.0134      0.061      0.219      0.827        -0.107     0.134
Kategorie[T.AIP]        0.0256      0.077      0.332      0.740        -0.127     0.178
Kategorie[T.AIPS]       0.0139      0.077      0.179      0.858        -0.138     0.166
Kategorie[T.AIS]       -0.0147      0.077     -0.189      0.850        -0.167     0.138
Kategorie[T.AP]        -0.0582      0.077     -0.752      0.453        -0.210     0.094
Kategorie[T.APS]       -0.1333      0.077     -1.723      0.086        -0.286     0.019
Kategorie[T.AS]         0.0386      0.046      0.835      0.404        -0.052     0.130
Kategorie[T.H]         -0.0387      0.051     -0.756      0.450        -0.139     0.062
Kategorie[T.HA]        -0.1304      0.061     -2.132      0.034        -0.251    -0.010
Kategorie[T.HAS]        0.2552      0.061      4.173      0.000         0.135     0.376
Kategorie[T.HH]        -0.0481      0.051     -0.939      0.348        -0.149     0.053
Kategorie[T.HHH]       -0.0748      0.077     -0.967      0.335        -0.227     0.078
Kategorie[T.HHHS]      -0.0411      0.077     -0.532      0.595        -0.193     0.111
Kategorie[T.HHI]       -0.0898      0.077     -1.160      0.247        -0.242     0.063
Kategorie[T.HHIA]      -0.0064      0.077     -0.083      0.934        -0.159     0.146
Kategorie[T.HHS]       -0.0426      0.061     -0.696      0.487        -0.163     0.078
Kategorie[T.HI]        -0.0848      0.042     -2.002      0.046        -0.168    -0.001
Kategorie[T.HIA]       -0.1030      0.077     -1.332      0.184        -0.255     0.049
Kategorie[T.HIH]       -0.0799      0.044     -1.830      0.068        -0.166     0.006
Kategorie[T.HIHA]       0.0045      0.077      0.058      0.953        -0.148     0.157
Kategorie[T.HIHIS]     -0.0700      0.077     -0.905      0.366        -0.222     0.082
Kategorie[T.HIHPH]     -0.0116      0.077     -0.151      0.880        -0.164     0.141
Kategorie[T.HIHS]      -0.0409      0.061     -0.668      0.505        -0.161     0.080
Kategorie[T.HIP]       -0.0532      0.049     -1.087      0.278        -0.149     0.043
Kategorie[T.HIPA]       0.0390      0.077      0.504      0.615        -0.113     0.191
Kategorie[T.HIPH]      -0.1316      0.049     -2.689      0.008        -0.228    -0.035
Kategorie[T.HIPHPS]    -0.0710      0.077     -0.918      0.360        -0.223     0.081
Kategorie[T.HIPHS]     -0.0705      0.077     -0.912      0.363        -0.223     0.082
Kategorie[T.HIPS]      -0.0966      0.061     -1.580      0.115        -0.217     0.024
Kategorie[T.HIS]       -0.0546      0.047     -1.152      0.250        -0.148     0.039
Kategorie[T.HP]        -0.0156      0.047     -0.328      0.743        -0.109     0.078
Kategorie[T.HPA]        0.0153      0.077      0.198      0.843        -0.137     0.168
Kategorie[T.HPHS]      -0.0691      0.049     -1.411      0.159        -0.165     0.027
Kategorie[T.HPI]       -0.0196      0.051     -0.383      0.702        -0.120     0.081
Kategorie[T.HPIH]      -0.1112      0.077     -1.437      0.152        -0.263     0.041
Kategorie[T.HPPH]      -0.0282      0.077     -0.364      0.716        -0.180     0.124
Kategorie[T.HPS]       -0.0232      0.049     -0.475      0.635        -0.120     0.073
Kategorie[T.HS]        -0.0577      0.044     -1.308      0.192        -0.144     0.029
Kategorie[T.I]         -0.0684      0.040     -1.722      0.086        -0.147     0.010
Kategorie[T.IA]        -0.0435      0.049     -0.890      0.374        -0.140     0.053
Kategorie[T.IAS]        0.0005      0.055      0.010      0.992        -0.107     0.108
Kategorie[T.IH]        -0.0348      0.043     -0.811      0.418        -0.119     0.050
Kategorie[T.IHA]       -0.1062      0.077     -1.373      0.171        -0.258     0.046
Kategorie[T.IHH]       -0.0994      0.077     -1.284      0.200        -0.252     0.053
Kategorie[T.IHHH]      -0.0645      0.077     -0.834      0.405        -0.217     0.088
Kategorie[T.IHHHHS]    -0.0540      0.077     -0.698      0.486        -0.206     0.098
Kategorie[T.IHHS]      -0.1104      0.051     -2.158      0.032        -0.211    -0.010
Kategorie[T.IHI]       -0.0767      0.077     -0.991      0.323        -0.229     0.076
Kategorie[T.IHIH]      -0.0656      0.061     -1.073      0.284        -0.186     0.055
Kategorie[T.IHIS]      -0.0243      0.055     -0.445      0.657        -0.132     0.083
Kategorie[T.IHP]       -0.0171      0.047     -0.362      0.718        -0.110     0.076
Kategorie[T.IHPH]      -0.0036      0.077     -0.046      0.963        -0.156     0.149
Kategorie[T.IHPS]      -0.0335      0.055     -0.613      0.540        -0.141     0.074
Kategorie[T.IHS]       -0.0817      0.045     -1.802      0.073        -0.171     0.008
Kategorie[T.IIH]       -0.0696      0.077     -0.900      0.369        -0.222     0.083
Kategorie[T.IIHP]      -0.0398      0.077     -0.515      0.607        -0.192     0.112
Kategorie[T.IP]        -0.0522      0.040     -1.300      0.195        -0.131     0.027
Kategorie[T.IPA]       -0.0782      0.055     -1.429      0.154        -0.186     0.030
Kategorie[T.IPH]       -0.0439      0.047     -0.928      0.354        -0.137     0.049
Kategorie[T.IPHA]      -0.1453      0.077     -1.879      0.061        -0.298     0.007
Kategorie[T.IPHP]      -0.0667      0.077     -0.862      0.389        -0.219     0.086
Kategorie[T.IPHS]      -0.0714      0.061     -1.168      0.244        -0.192     0.049
Kategorie[T.IPI]        0.0562      0.061      0.919      0.359        -0.064     0.177
Kategorie[T.IPIH]      -0.0784      0.061     -1.282      0.201        -0.199     0.042
Kategorie[T.IPP]       -0.1220      0.077     -1.577      0.116        -0.274     0.030
Kategorie[T.IPPH]      -0.0738      0.061     -1.208      0.228        -0.194     0.047
Kategorie[T.IPS]       -0.0436      0.051     -0.851      0.395        -0.144     0.057
Kategorie[T.IS]        -0.0406      0.041     -0.995      0.321        -0.121     0.040
Kategorie[T.P]         -0.0658      0.051     -1.287      0.199        -0.167     0.035
Kategorie[T.PA]        -0.0711      0.077     -0.920      0.359        -0.223     0.081
Kategorie[T.PH]         0.0111      0.055      0.202      0.840        -0.097     0.119
Kategorie[T.PHAS]       0.2182      0.077      2.821      0.005         0.066     0.370
Kategorie[T.PHHH]      -0.0515      0.077     -0.666      0.506        -0.204     0.101
Kategorie[T.PHHIH]     -0.0448      0.077     -0.579      0.563        -0.197     0.107
Kategorie[T.PHHS]      -0.0436      0.077     -0.563      0.574        -0.196     0.109
Kategorie[T.PHI]       -0.0320      0.061     -0.523      0.601        -0.152     0.088
Kategorie[T.PHS]       -0.0351      0.077     -0.453      0.651        -0.187     0.117
Kategorie[T.PI]        -0.0368      0.047     -0.777      0.438        -0.130     0.056
Kategorie[T.PIH]       -0.1296      0.061     -2.120      0.035        -0.250    -0.009
Kategorie[T.PIHHS]     -0.1023      0.077     -1.322      0.187        -0.255     0.050
Kategorie[T.PIP]       -0.0376      0.077     -0.486      0.627        -0.190     0.115
Kategorie[T.PIS]       -0.1063      0.061     -1.738      0.083        -0.227     0.014
Kategorie[T.PS]        -0.0417      0.051     -0.814      0.416        -0.142     0.059
Kategorie[T.S]         -0.0112      0.044     -0.253      0.800        -0.098     0.076
==============================================================================
Omnibus:                       61.225   Durbin-Watson:                   2.059
Prob(Omnibus):                  0.000   Jarque-Bera (JB):              415.236
Skew:                           0.449   Prob(JB):                     6.80e-91
Kurtosis:                       8.104   Cond. No.                         109.
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [16]:
# Signifikant: 
# Basis ist Kategorie A
#HI von 0.3063 auf 0.3063-0.0848 = ,2251 # -26.50995755%
#HIHP von 0.3063 auf 0.3063-0.1316 = ,1747 # -42.96441397%
#IHHS von 0.3063 auf 0.3063-0.1104 = ,1959 # -36.043095%
#PHAS von 0.3063 auf 0.3063+0.2182 = ,5245 # 71.237349%
#PIH von 0.3063 auf 0.3063-0.1296 = = ,1767 # -42.31145935%

In [17]:
Highlight = final[[u'OeffnungsrateClean',u'highlight_0']]

In [18]:
mod = smf.ols(formula='OeffnungsrateClean ~ highlight_0',data=Highlight)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.202
Model:                            OLS   Adj. R-squared:                  0.122
Method:                 Least Squares   F-statistic:                     2.519
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           0.000608
Time:                        11:32:50   Log-Likelihood:                 262.16
No. Observations:                 220   AIC:                            -482.3
Df Residuals:                     199   BIC:                            -411.1
Df Model:                          20                                         
Covariance Type:            nonrobust                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
Intercept                            0.2177      0.023      9.343      0.000         0.172     0.264
highlight_0[T.bestpreisgarantie]     0.0450      0.081      0.557      0.578        -0.114     0.204
highlight_0[T.exklusiv]              0.1188      0.034      3.520      0.001         0.052     0.185
highlight_0[T.geschenk]              0.0366      0.031      1.174      0.242        -0.025     0.098
highlight_0[T.gewinn]                0.1461      0.032      4.616      0.000         0.084     0.209
highlight_0[T.gratis]                0.0396      0.059      0.667      0.506        -0.078     0.157
highlight_0[T.highlight]            -0.0161      0.050     -0.320      0.750        -0.115     0.083
highlight_0[T.jetzt]                 0.0376      0.025      1.503      0.134        -0.012     0.087
highlight_0[T.nur]                   0.0284      0.027      1.032      0.303        -0.026     0.083
highlight_0[T.u'pr\xe4mie']          0.0324      0.037      0.866      0.387        -0.041     0.106
highlight_0[T.punktestand]           0.0842      0.059      1.418      0.158        -0.033     0.201
highlight_0[T.rabatt]                0.0325      0.036      0.905      0.367        -0.038     0.103
highlight_0[T.reduziert]             0.0102      0.059      0.171      0.864        -0.107     0.127
highlight_0[T.sale]                  0.0379      0.042      0.909      0.364        -0.044     0.120
highlight_0[T.schnell]               0.0178      0.045      0.394      0.694        -0.071     0.107
highlight_0[T.sichern]               0.0113      0.028      0.403      0.687        -0.044     0.067
highlight_0[T.sparen]               -0.0069      0.042     -0.167      0.868        -0.089     0.075
highlight_0[T.wichtig]              -0.0218      0.045     -0.483      0.629        -0.111     0.067
highlight_0[T.wsv]                   0.0314      0.059      0.529      0.597        -0.086     0.149
highlight_0[T.wuensche]              0.0605      0.081      0.750      0.454        -0.099     0.220
highlight_0[T.u'w\xfcnsche']         0.0845      0.050      1.680      0.095        -0.015     0.184
==============================================================================
Omnibus:                       70.077   Durbin-Watson:                   2.197
Prob(Omnibus):                  0.000   Jarque-Bera (JB):              359.105
Skew:                           1.132   Prob(JB):                     1.05e-78
Kurtosis:                       8.835   Cond. No.                         24.0
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [19]:
# Hier ist die Basis "angebot"
#highlight_0[T.exklusiv]              0.1188      0.034      3.520      0.001         0.052     0.185
#highlight_0[T.gewinn]                0.1461      0.032      4.616      0.000         0.084     0.209
#signifikant: das highlight exklusiv korreliert mit einer Steigerung von 0,2177 auf 0,2177 + 0,1199 =  0,3376 #55.07579237%
#signifikant: das highlight gewinn korreliert mit einer Steigerung von 0,2177 auf 0,2177 + 0,1461 =  0,3638 #67.1107028%

In [20]:
Incentive = final[[u'OeffnungsrateClean',u'Incentive_0']]

In [21]:
mod = smf.ols(formula='OeffnungsrateClean ~ Incentive_0',data=Incentive)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.122
Model:                            OLS   Adj. R-squared:                  0.090
Method:                 Least Squares   F-statistic:                     3.780
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           8.74e-05
Time:                        11:32:51   Log-Likelihood:                 419.07
No. Observations:                 283   AIC:                            -816.1
Df Residuals:                     272   BIC:                            -776.0
Df Model:                          10                                         
Covariance Type:            nonrobust                                         
====================================================================================================================
                                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
--------------------------------------------------------------------------------------------------------------------
Intercept                                            0.2685      0.014     19.723      0.000         0.242     0.295
Incentive_0[T.u'200 \xb0p f\xfcr sie geschenkt']    -0.0100      0.058     -0.173      0.863        -0.124     0.104
Incentive_0[T.u'200 \xb0p geschenkt']               -0.0358      0.058     -0.620      0.535        -0.150     0.078
Incentive_0[T.doppelt punkten]                      -0.0714      0.035     -2.032      0.043        -0.141    -0.002
Incentive_0[T.doppelte punkte]                      -0.0268      0.031     -0.859      0.391        -0.088     0.035
Incentive_0[T.u'extra \xb0p']                       -0.0811      0.031     -2.601      0.010        -0.143    -0.020
Incentive_0[T.extra-punkte]                         -0.0158      0.017     -0.917      0.360        -0.050     0.018
Incentive_0[T.fach]                                 -0.0079      0.014     -0.547      0.585        -0.036     0.020
Incentive_0[T.punkte]                               -0.0308      0.021     -1.455      0.147        -0.072     0.011
Incentive_0[T.punkte-gutschein]                      0.1197      0.058      2.072      0.039         0.006     0.233
Incentive_0[T.u'\xb0p']                             -0.0463      0.015     -3.034      0.003        -0.076    -0.016
==============================================================================
Omnibus:                        4.313   Durbin-Watson:                   1.948
Prob(Omnibus):                  0.116   Jarque-Bera (JB):                4.934
Skew:                          -0.128   Prob(JB):                       0.0848
Kurtosis:                       3.594   Cond. No.                         22.4
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [22]:
#signifikant
# Basis "%"
# punkte-gutschein 0.2685 +0.1197 = ,3882# 44.58100558%
# ° 0.2685 -0.0463 # = ,2222 #-17.24394785%
# doppelt punkten 0.2685 -.0714 = ,1971 # -26.59217877% 
# extra ° 0.2685 -0.0811 = 1874 # -30.16759776%

In [23]:
final.columns


Out[23]:
Index([u'Betreff', u'OeffnungsrateClean', u'ObUeberMedian', u'Kategorie', u'Satzzeichen', u'Anrede', u'highlight_0', u'highlight_1', u'highlight_2', u'highlight_3', u'partner_0', u'partner_1', u'Incentive_0', u'Incentive_1', u'ifSatzzeichen', u'ifPartner', u'ifIncentive', u'ifHighlight', u'ifAnrede', u'Partner0_a.t.u', u'Partner0_aral', u'Partner0_asstel', u'Partner0_blume2000.de', u'Partner0_c&a', u'Partner0_dehner', u'Partner0_dm', u'Partner0_ebay', u'Partner0_expedia', u'Partner0_express', u'Partner0_galeria', u'Partner0_hvb', u'Partner0_itunes', u'Partner0_linda', u'Partner0_mexx', u'Partner0_mydays', u'Partner0_opel', u'Partner0_philips', u'Partner0_quelle', u'Partner0_real', u'Partner0_rewe', u'Partner0_sportarena.de', u'Partner0_tchibo', u'Partner0_telekom', u'Partner0_wmf', u'Partner0_yello', u'Partner0_zalando', u'Satzzeiche_!', u'Satzzeiche_.', u'Satzzeiche_?', u'Anrede_anrede', u'Anrede_title', u'Partner1_dm', u'Partner1_ebay', u'Partner1_philips', u'Partner1_wmf', u'Highlights0_angebot', u'Highlights0_bestpreisgarantie', u'Highlights0_exklusiv', u'Highlights0_geschenk', u'Highlights0_gewinn', u'Highlights0_gratis', u'Highlights0_highlight', u'Highlights0_jetzt', u'Highlights0_nur', u'Highlights0_prämie', u'Highlights0_punktestand', u'Highlights0_rabatt', u'Highlights0_reduziert', u'Highlights0_sale', u'Highlights0_schnell', u'Highlights0_sichern', u'Highlights0_sparen', u'Highlights0_wichtig', u'Highlights0_wsv', u'Highlights0_wuensche', u'Highlights0_wünsche', u'Highlights1_angebot', u'Highlights1_geschenk', u'Highlights1_gewinn', u'Highlights1_gratis', u'Highlights1_highlight', u'Highlights1_jetzt', u'Highlights1_nur', u'Highlights1_prämie', u'Highlights1_punktestand', u'Highlights1_reduziert', u'Highlights1_sale', u'Highlights1_schnell', u'Highlights1_sichern', u'Highlights1_sparen', u'Highlights1_special', u'Highlights2_gewinn', u'Highlights2_jetzt', u'Highlights2_nur', u'Highlights2_prämie', u'Highlights2_reduziert', u'Highlights2_sichern', u'Highlights2_sparen', u'Highlights2_special', u'Highlights3_gewinn', ...], dtype='object')

In [24]:
AllElements = final[[u'OeffnungsrateClean',u'ifSatzzeichen',u'ifHighlight', u'ifAnrede', u'ifPartner',u'ifIncentive']]

In [25]:
mod = smf.ols(formula='OeffnungsrateClean ~ ifSatzzeichen+ifHighlight+ifAnrede+ifPartner+ifIncentive',data=AllElements)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.103
Model:                            OLS   Adj. R-squared:                  0.091
Method:                 Least Squares   F-statistic:                     8.771
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           6.84e-08
Time:                        11:32:52   Log-Likelihood:                 481.94
No. Observations:                 389   AIC:                            -951.9
Df Residuals:                     383   BIC:                            -928.1
Df Model:                           5                                         
Covariance Type:            nonrobust                                         
=================================================================================
                    coef    std err          t      P>|t|      [95.0% Conf. Int.]
---------------------------------------------------------------------------------
Intercept         0.2491      0.010     24.627      0.000         0.229     0.269
ifSatzzeichen     0.0216      0.008      2.699      0.007         0.006     0.037
ifHighlight      -0.0009      0.007     -0.126      0.900        -0.015     0.014
ifAnrede          0.0513      0.011      4.611      0.000         0.029     0.073
ifPartner         0.0152      0.007      2.047      0.041         0.001     0.030
ifIncentive      -0.0159      0.009     -1.867      0.063        -0.033     0.001
==============================================================================
Omnibus:                      129.479   Durbin-Watson:                   2.182
Prob(Omnibus):                  0.000   Jarque-Bera (JB):              872.155
Skew:                           1.232   Prob(JB):                    4.11e-190
Kurtosis:                       9.909   Cond. No.                         5.83
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [26]:
# Coef muss als der Durchschnitt wenn keine Kategorie vorhanden ist interpretiert werden.
#Signifikant: das Vorhandensein eines Satzzeichens steigert die durchschnittliche Öffnungsrate von 0.2491 auf 0.0216 + 0.2491 = 0,2707
#eine 8.6712% Steigerung
#Signifikant: das Vorhandensein einer Anrede steigert die durchschnittliche Öffnungsrate von 0.2491 auf 0.0513 + 0.2491 = 0,3004
#eine 20.5941% Steigerung
#Signifikant: das Vorhandensein eines Partner steigert die durchschnittliche Öffnungsrate von 0.2491 auf 0.0152 + 0.2491 = 0,2643
#eine 6.1020% Steigerung

In [38]:
def Satzzeichen_Partner(data):
    return 'P' in str(data) and 'S' in str(data)
final['Satzzeichen_Partner']=map(Satzzeichen_Partner,final['Kategorie'])

In [41]:
mod = smf.ols(formula='OeffnungsrateClean ~ Satzzeichen_Partner',data=final)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.005
Model:                            OLS   Adj. R-squared:                  0.002
Method:                 Least Squares   F-statistic:                     1.901
Date:                Mon, 01 Jun 2015   Prob (F-statistic):              0.169
Time:                        15:41:10   Log-Likelihood:                 461.81
No. Observations:                 389   AIC:                            -919.6
Df Residuals:                     387   BIC:                            -911.7
Df Model:                           1                                         
Covariance Type:            nonrobust                                         
===============================================================================================
                                  coef    std err          t      P>|t|      [95.0% Conf. Int.]
-----------------------------------------------------------------------------------------------
Intercept                       0.2548      0.004     64.580      0.000         0.247     0.263
Satzzeichen_Partner[T.True]     0.0176      0.013      1.379      0.169        -0.008     0.043
==============================================================================
Omnibus:                      189.915   Durbin-Watson:                   2.195
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             1882.552
Skew:                           1.820   Prob(JB):                         0.00
Kurtosis:                      13.144   Cond. No.                         3.44
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [42]:
def Satzzeichen_Anrede(data):
    return 'A' in str(data) and 'S' in str(data)
final['Satzzeichen_Anrede']=map(Satzzeichen_Anrede,final['Kategorie'])

In [43]:
mod = smf.ols(formula='OeffnungsrateClean ~ Satzzeichen_Anrede',data=final)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.124
Model:                            OLS   Adj. R-squared:                  0.121
Method:                 Least Squares   F-statistic:                     54.54
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           9.44e-13
Time:                        15:44:03   Log-Likelihood:                 486.50
No. Observations:                 389   AIC:                            -969.0
Df Residuals:                     387   BIC:                            -961.1
Df Model:                           1                                         
Covariance Type:            nonrobust                                         
==============================================================================================
                                 coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------
Intercept                      0.2504      0.004     69.244      0.000         0.243     0.257
Satzzeichen_Anrede[T.True]     0.1178      0.016      7.385      0.000         0.086     0.149
==============================================================================
Omnibus:                      101.976   Durbin-Watson:                   2.134
Prob(Omnibus):                  0.000   Jarque-Bera (JB):              520.484
Skew:                           1.011   Prob(JB):                    9.51e-114
Kurtosis:                       8.294   Cond. No.                         4.54
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [44]:
def Satzzeichen_Anrede_Partner(data):
    return 'A' in str(data) and 'S' in str(data) and 'P' in str(data)
final['Satzzeichen_Anrede_Partner']=map(Satzzeichen_Anrede_Partner,final['Kategorie'])

In [45]:
mod = smf.ols(formula='OeffnungsrateClean ~ Satzzeichen_Anrede_Partner',data=final)
res = mod.fit()
print res.summary()


                            OLS Regression Results                            
==============================================================================
Dep. Variable:     OeffnungsrateClean   R-squared:                       0.056
Model:                            OLS   Adj. R-squared:                  0.054
Method:                 Least Squares   F-statistic:                     23.15
Date:                Mon, 01 Jun 2015   Prob (F-statistic):           2.16e-06
Time:                        15:47:19   Log-Likelihood:                 472.15
No. Observations:                 389   AIC:                            -940.3
Df Residuals:                     387   BIC:                            -932.4
Df Model:                           1                                         
Covariance Type:            nonrobust                                         
======================================================================================================
                                         coef    std err          t      P>|t|      [95.0% Conf. Int.]
------------------------------------------------------------------------------------------------------
Intercept                              0.2544      0.004     69.180      0.000         0.247     0.262
Satzzeichen_Anrede_Partner[T.True]     0.1561      0.032      4.811      0.000         0.092     0.220
==============================================================================
Omnibus:                      115.079   Durbin-Watson:                   2.147
Prob(Omnibus):                  0.000   Jarque-Bera (JB):              653.753
Skew:                           1.125   Prob(JB):                    1.09e-142
Kurtosis:                       8.939   Cond. No.                         8.88
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

In [54]:
valueCounts = DataFrame()
#final['Kategorie'].value_counts().to_excel('value_counts.xls')
valueCounts['Kategorie']=final['Kategorie'].value_counts()
valueCounts.to_excel('value_counts.xls')

In [ ]: