Top "Patsy" questions

A Python library for describing statistical models and building design matrices, aimed at bringing the convenience of R “formulas” to Python.

Python: How to evaluate the residuals in StatsModels?

I want to evaluate the residuals: (y-hat y). I know how to do that: df = pd.read_csv('myFile', delim_…

python pandas statsmodels patsy
using ols from statsmodels.formula.api - how to remove constant term?

I'm following this first example in statsmodels tutorial: http://statsmodels.sourceforge.net/devel/ How do I specify not to use …

python numpy regression statsmodels patsy
Creating dummy variable using pandas or statsmodel for interaction of two columns

I have a data frame like this: Index ID Industry years_spend asset 6646 892 4 4 144.977037 2347 315 10 8 137.749138 7342 985 1 5 104.310217 137 18 5 5 156.593396 2840 381 11 2 229.538828 6579 883 11 1 171.380125 1776 235 4 7 217.734377 2691 361 1 2 148.865341 815 110 15 4 233.309491 2932 393 17 5 187.281724 I want to create dummy variables for …

python pandas statsmodels patsy