Top "Statsmodels" questions

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

Forecasting with statsmodels

I have a .csv file containing a 5-year time series, with hourly resolution (commoditiy price). Based on the historical data, …

python forecasting statsmodels
add_constant() in statsmodels not working

I try to use the add_constant() function with an array of dataset. At index 59 it works (the column is …

python-3.x statsmodels
Changing fig size with statsmodel

I am trying to make QQ-plots using the statsmodel package. However, the resolution of the figure is so low that …

python matplotlib statsmodels
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
How to get R-squared for robust regression (RLM) in Statsmodels?

When it comes to measuring goodness of fit - R-Squared seems to be a commonly understood (and accepted) measure for "…

python regression linear-regression statsmodels
Access standardized residuals, cook's values, hatvalues (leverage) etc. easily in Python?

I am looking for influence statistics after fitting a linear regression. In R I can obtain them (e.g.) like …

python scikit-learn linear-regression statsmodels
How to extract the F statistic and the P value from results.f_test in statsmodels python

I run the OLS.fit() and use the fitted model to get the f value for a particular category like …

python statsmodels fstat
Random Forest Regressor using a custom objective/ loss function (Python/ Sklearn)

I want to build a Random Forest Regressor to model count data (Poisson distribution). The default 'mse' loss function is …

python-3.x scikit-learn random-forest statsmodels poisson