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/Debugging
- 0.025 Data frame
- 0.025 Python syntax and semantics
- 0.025 Information visualization
- 0.025 Pivot table
- 0.025 ggplot
- 0.025 Python vs. R
- 0.025 Vim
- More suggestions...