Top "Statsmodels" questions

Statsmodels is a Python module that allows users to explore data, estimate statistical models, and perform statistical tests.

Weighted standard deviation in NumPy

numpy.average() has a weights option, but numpy.std() does not. Does anyone have suggestions for a workaround?

python numpy statsmodels standard-deviation weighted
Where can I find mad (mean absolute deviation) in scipy?

It seems scipy once provided a function mad to calculate the mean absolute deviation for a set of numbers: http://…

python scipy statsmodels
Why do I get only one parameter from a statsmodels OLS fit

Here is what I am doing: $ python Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on …

python pandas linear-regression statsmodels
Decomposing trend, seasonal and residual time series elements

I have a DataFrame with a few time series: divida movav12 var varmovav12 Date 2004-01 0 NaN NaN NaN 2004-02 0 NaN …

python pandas machine-learning time-series statsmodels
How to extract the regression coefficient from statsmodels.api?

result = sm.OLS(gold_lookback, silver_lookback ).fit() After I get the result, how can I get the coefficient and …

python pandas linear-regression statsmodels
Predicting values using an OLS model with statsmodels

I calculated a model using OLS (multiple linear regression). I divided my data to train and test (half each), and …

python pandas linear-regression statsmodels
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
Add trend line to pandas

I have time-series data, as followed: emplvl date 2003-01-01 10955.000000 2003-04-01 11090.333333 2003-07-01 11157.000000 2003-10-01 11335.666667 2004-01-01 11045.000000 2004-04-01 11175.666667 2004…

python pandas matplotlib machine-learning statsmodels
How to plot statsmodels linear regression (OLS) cleanly

Problem Statement: I have some nice data in a pandas dataframe. I'd like to run simple linear regression on it: …

pandas matplotlib statsmodels
What's the difference between pandas ACF and statsmodel ACF?

I'm calculating the Autocorrelation Function for a stock's returns. To do so I tested two functions, the autocorr function built …

python pandas statsmodels