Category "statsmodels"

ARIMA model not working properly in new statsmodels ARIMA for python

Earlier I used to use from statsmodels.tsa.arima_model import ARIMA model = ARIMA(log_air_passengers, order=(2, 1, 0)) results_AR = model.fit(disp=-1) plt.p

LU decomposition error using SARIMAX in statsmodels

I get a 'LU decomposition' error where using SARIMAX in the statsmodels python package. This is the code: from statsmodels.tsa.statespace.sarimax import SARIMAX

Stop statsmodels.tsa.x13.x13_arima_analysis from creating temporary files

Im using package statsmodels in python. To be precise I am using the function statsmodels.tsa.x13.x13_arima_analysis(). When I use it, it creates a lot if tempo

Uses of typ in anova_lm()

Sorry, I'm new to python and stats. And I was curious about the typ in the anova_lm() function. What does typ 1,2,3 mean and how do they differ? This is an exam

using statsmodels with a groupby

Consider this simple example import pandas as pd import statsmodels.formula.api as sm df = pd.DataFrame({'Y' : [1,2,3,4,5,6,7], 'X' : [2,3,4

Problem when importing statsmodels.regression.rolling (AttributeError: 'pandas._libs.properties.CachedProperty' object has no attribute 'func')

When I run the below code: from statsmodels.regression import rolling I get this error message: AttributeError Traceback (most recen

How to generate the actual results of an IRF() function in python?

I am unable to generate the actual underlying values of the IRFs. See code of a simple VAR model. import numpy as np import statsmodels.tsa as sm model = VAR(df

Using categorical variables in statsmodels OLS class

I want to use statsmodels OLS class to create a multiple regression model. Consider the following dataset: import statsmodels.api as sm import pandas as pd im

How to get the P Value in a Variable from OLSResults in Python?

The OLSResults of df2 = pd.read_csv("MultipleRegression.csv") X = df2[['Distance', 'CarrierNum', 'Day', 'DayOfBooking']] Y = df2['Price'] X = add_constant(X) f

In Seasonal Decompose Seasonal plot seems off

When I decompose my time-series Seasonal plot looks like this, what have I could do wrong? Here is code that i used for decomposition import statsmodels.api as

To which value in the statsmodels summary relates the error bar size in the plot?

With the following code, I get a plot how the regression was done for my data. In the plot also vertical (error?) bars are shown. To which number in the sum

Rolling OLS Regressions and Predictions by Group

I have a Pandas dataframe with some data on race car drivers. The relevant columns look like this: |Date |Name |Distance |avg_speed_calc |---- |-

Print 'std err' value from statsmodels OLS results

(Sorry to ask but http://statsmodels.sourceforge.net/ is currently down and I can't access the docs) I'm doing a linear regression using statsmodels, basically

Reading coef value from OLS regression results

I use pandas and statsmodels to do linear regression. However, i can't find any possible way to read the results. the results are displayed but i need to do som