Ich habe Daten als x-und y-Variablen in Python als Liste gespeichert. Wie kann ich das in Python importieren, um durch statsmodels zu laufen.Öffnen und modellieren Daten in Statsmodels als GLM
from __future__ import print_function
import statsmodels.api as sm
import statsmodels.formula.api as smf
import pandas as pd
x = [1,1,2,3]
y=[1,0,0,0]
data = pd.DataFrame(x,y) #to merge the two side by side
star98 = sm.datasets.star98.load_pandas().data
formula = 'x ~ y'
pd.options.mode.chained_assignment = None # default='warn'
mod1 = smf.glm(formula=formula, data=data, family=sm.families.Binomial()).fit()
x = mod1.summary()
Valueerror: Die erste Vermutung über die Devianz Funktion zurück eine nan. Dies könnte ein Grenzproblem sein und sollte gemeldet werden
beste Antwort aller Zeiten –