R style statistical model description. Perfect for Python/pandas + Python/statsmodels.
Example:
#!python
from patsy import dmatrices
import statsmodels.api as sm
import pandas as pd
df = pd.read_csv('data.csv')
formula = 'np.log(count) ~ var1 + var2 + var3'
y, X = dmatrices(formula, data=df, return_type='dataframe')
mod = sm.GLM(y, X, family=sm.families.NegativeBinomial())
res = mod.fit()
print(res.summary())
Incoming Links #
Related Articles (Article 0) #
Suggested Pages #
- 0.050 Home
- 0.025 Scientific computing
- 0.025 Python/Test
- 0.025 PyPy
- 0.025 CPython
- 0.025 Python syntax and semantics
- 0.025 Data frame
- 0.025 Python3
- 0.025 programming language
- 0.025 Pipenv
- More suggestions...