statsmodels Questions

2

Solved

I got good use out of pandas' MovingOLS class (source here) within the deprecated stats/ols module. Unfortunately, it was gutted completely with pandas 0.20. The question of how to run rolling OLS...
Toilette asked 6/6, 2017 at 1:31

0

I encountered a problem when working with statsmodels' get_margeff command for a logit model with interaction terms. While in a main effects models the effects are correctly calculated and correspo...
Georgenegeorges asked 10/4, 2020 at 20:34

2

Solved

I have a dataframe that has about 370 columns. I'm testing a series of hypothesis that require me to use subsets of the model to fit a cubic regression model. I'm planning on using statsmodels to m...
Presidentelect asked 22/1, 2016 at 18:59

4

I am looking for a way I can use the fit object (result) obtained from python statsmodel to feed into cross_val_score of scikit-learn cross_validation method? The attached link suggests that it may...
Censor asked 8/12, 2016 at 17:51

4

Solved

New to python here. Using the following: Anaconda - v1.3.1 Spyder - v3.1.4 Python - v3.5 I am trying to import the following libraries: import numpy as np import matplotlib.pyplot as plt import ...
Elgin asked 1/6, 2017 at 16:35

3

Solved

Econometric Backgroud Fama Macbeth regression refers to a procedure to run regression for panel data (where there are N different individuals and each individual corresponds to multiple periods T,...
Torey asked 6/6, 2014 at 5:1

3

Solved

I am struggling to understand the concept of p-value and the various other results of adfuller test. The code I am using: (I found this code in Stack Overflow) import numpy as np import os im...
Achieve asked 17/11, 2017 at 11:15

3

Solved

I am running an ols model and I need to know all the coefficients so I can use them in my analysis. How can I display/save the coefficients in a different format than scientific notation? model = ...
Medicinal asked 18/4, 2017 at 15:51

1

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 example code of the typ=2 used. aov_table...
Thiouracil asked 15/3, 2019 at 3:50

1

Solved

I want to get the marginal effects of a logistic regression from a sklearn model I know you can get these for a statsmodel logistic regression using '.get_margeff()'. Is there nothing for sklearn?...

4

I want to know which line or method caused the Future Warning! predictors = weekly.columns[1:7] # the lags and volume X = sm.add_constant(weekly[predictors]) # sm: statsmodels y = np.array([1 if e...
Ptero asked 26/5, 2019 at 5:29

2

Solved

I tried forecasting with holt-winters model as shown below but I keep getting a prediction that is not consistent with what I expect. I also showed a visualization of the plot Train = Airline[:130...
Gibber asked 10/6, 2018 at 15:54

1

Solved

can someone show me how to display plot_acf and plot_pacf side by side? I'm struggling with the show=False arguments and matplotlib crazy object model...
Foreclosure asked 11/11, 2019 at 8:11

1

I'm working with statsmodels using R-style formulas with the Patsy package and receiving an error I can't make heads or tails of, any tips or tricks would be greatly appreciated. PatsyError: Nu...
Lovash asked 7/11, 2019 at 0:29

4

Solved

In the Python library Statsmodels, you can print out the regression results with print(results.summary()), how can I print out the summary of more than one regressions in one table, for better comp...
Sauerbraten asked 28/1, 2016 at 2:10

2

Solved

I am trying to run grangercausalitytests on two time series: import numpy as np import pandas as pd from statsmodels.tsa.stattools import grangercausalitytests n = 1000 ls = np.linspace(0, 2*np....
Sarver asked 1/6, 2017 at 10:45

2

Solved

I'm trying to recreate a plot from An Introduction to Statistical Learning and I'm having trouble figuring out how to calculate the confidence interval for a probability prediction. Specifically, I...

2

Solved

Consider the following example: import pandas as pd from pandas import DataFrame import statsmodels.formula.api as smf df = DataFrame({'a': [1,2,3], 'b': [2,3,4]}) df2 = DataFrame({'177sdays': [1,...
Impeachable asked 23/11, 2016 at 1:25

3

Solved

Short version: I was using the scikit LinearRegression on some data, but I'm used to p-values so put the data into the statsmodels OLS, and although the R^2 is about the same the variable coe...
Persephone asked 26/2, 2014 at 22:34

1

Solved

I am trying to run a simple logistic regression function. I have 4 columns named x1, x2, x3, and x4. x4 has a column that has only zeros and ones. So, I am using this as my dependent variable. To p...
Parkin asked 6/8, 2019 at 5:49

1

Solved

I did some experiments with the ARIMA model on 2 datasets Airline passengers data USD vs Indian rupee data I am getting a normal zig-zag prediction on Airline passengers data ARIMA order=(2,1,2) ...
Thus asked 17/7, 2019 at 16:1

1

Using the same example as from this previous question (code pasted below), we can get the 95% CI with the summary_table function from statsmodels outliers_influence. But now, how would it be possib...
Cruzeiro asked 29/5, 2018 at 13:39

1

Solved

I'm having problems with PyInstaller and statsmodels. When I run the executable I got the error ImportError: No module named 'statsmodels.__init__.tools', when I run the code directly with Python e...
Caution asked 28/6, 2019 at 16:59

4

Solved

I am using 32 bit cmd, 64 bit windows, python 2.7 when I type the command pip install statsmodels I get the following error for some module of scipy... Failed building wheel for Scipy Failed cle...
Unbent asked 5/8, 2016 at 14:46

2

Solved

I am currently doing proof of concept for one of our business process that requires logistic regression. I have been using statsmodels glm to perform classification against our data set (as per bel...
Front asked 12/12, 2017 at 10:17

© 2022 - 2024 — McMap. All rights reserved.