statsmodels Questions

3

am trying to run logit regression for german credit data (www4.stat.ncsu.edu/~boos/var.select/german.credit.html). To test the code, I have used only numerical variables and tried regressing it wit...
Daphie asked 20/12, 2013 at 12:32

7

Solved

I do this linear regression with StatsModels: import numpy as np import statsmodels.api as sm from statsmodels.sandbox.regression.predstd import wls_prediction_std n = 100 x = np.linspace(0, 10,...
Solidus asked 9/7, 2013 at 22:32

3

I have the following R Code, wondering what is the equivalent code in Python power.t.test(n=20,delta=40,sd=50,sig.level=0.05,type= "one.sample",alternative="one.sided") The ex...
Bufordbug asked 7/1, 2019 at 1:54

3

when using the .summary() function using pandas statsmodels, the OLS Regression Results include the following fields. coef std err t P>|t| [0.025 0.975] How can I get the standardised coeffic...
Asbestosis asked 13/6, 2018 at 16:47

3

I'm new to Granger Causality and would appreciate any advice on understanding/interpreting the results of the python statsmodels output. I've constructed two data sets (sine functions shifted in ti...
Thurber asked 9/8, 2018 at 17:4

7

Solved

numpy.average() has a weights option, but numpy.std() does not. Does anyone have suggestions for a workaround?
Belgravia asked 9/3, 2010 at 23:53

3

How to generate "lower" and "upper" predictions, not just "yhat"? import statsmodels from statsmodels.tsa.arima.model import ARIMA assert statsmodels.__version__ == '...
Scream asked 9/10, 2020 at 10:5

4

In scipy there is no support for fitting a negative binomial distribution using data (maybe due to the fact that the negative binomial in scipy is only discrete). For a normal distribution I would...
Serriform asked 22/5, 2014 at 20:31

5

Solved

(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: import statsmodels.api as sm model...
Shoshone asked 20/7, 2015 at 18:38

2

Solved

I am using Statsmodels to implement seasonal ARIMA prediction for time series. Here is my code : import statsmodels.api as sm from statsmodels.tsa.x13 import x13_arima_select_order, _find_x12 impo...
Transom asked 17/8, 2015 at 15:5

9

Solved

I am doing multiple linear regression with statsmodels.formula.api (ver 0.9.0) on Windows 10. After fitting the model and getting the summary with following lines i get summary in summary object fo...
Saturninasaturnine asked 7/8, 2018 at 19:33

7

I am getting above error when I am running an iteration using FOR loop to build multiple models. First two models having similar data sets build fine. While building third model I am getting this e...
Procathedral asked 10/5, 2016 at 17:12

1

Solved

I have a df that is 700 rows x 2 columns, below a code to reproduce a smaller version of it (with 7 rows). df = pd.DataFrame(columns=['Private','Elite']) df[''] = ['Abilene Christian University', '...
Anzio asked 16/8, 2022 at 11:16

3

Solved

When running a logistic regression, the coefficients I get using statsmodels are correct (verified them with some course material). However, I am unable to get the same coefficients with sklearn. I...
Starling asked 19/5, 2018 at 19:37

2

scipy.stats.linregress returns a p-value corresponding to the slope, but no p-value for the intercept. Consider the following example from the docs: >>> from scipy import stats >>&gt...
Yuk asked 26/2, 2015 at 21:54

5

Solved

result = sm.OLS(gold_lookback, silver_lookback ).fit() After I get the result, how can I get the coefficient and the constant? In other words, if y = ax + c how to get the values a and c?
Totem asked 20/11, 2017 at 9:1

1

Solved

When we talk about PCA we say that we use it to reduce the dimensionality of the data. I have 2-d data, and using PCA reduced the dimensionality to 1-d. Now, The first component will be in such a w...
Selfaddressed asked 15/6, 2022 at 11:50

4

While using ARMA to fit a model: from statsmodels.tsa.arima_model import ARMA I am getting a warning in my console: C:\Users\lfc\anaconda3\lib\site-packages\statsmodels\tsa\arima_model.py:472: Fut...
Orenorenburg asked 19/5, 2021 at 10:9

1

Solved

I am currently trying to import MSTL from statsmodels.tsa.seasonal the module of MSTL (https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html) but it returns an ImportError....

2

Solved

I am trying to predict a seasonal time series using SARIMAX. The time series consits of daily maximum values for PV-feed-in, which leads to the assumption of a 365 day periodicity. Here is my code...
Unhandled asked 9/3, 2017 at 17:41

4

Solved

I have a time series that appears to have a significant lag when observing the partial autocorrelation (PACF) plot, i.e. PACF value is greater than the blue confidence interval. I wanted to verify ...
Spotter asked 17/5, 2020 at 16:49

1

Solved

I'm exploring ridge regression. While comparing statsmodels and sklearn, I found that the two libraries result in different output for ridge regression. Below is an simple example of the difference...
Soane asked 16/5, 2022 at 14:25

6

Solved

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 darwin >>> import statsmodels.api as sm >&gt...
Eurypterid asked 20/12, 2013 at 10:27

3

Solved

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 import numpy as np dict = {'industry': ...
Diallage asked 18/4, 2019 at 1:45

3

The OLSResults of df2 = pd.read_csv("MultipleRegression.csv") X = df2[['Distance', 'CarrierNum', 'Day', 'DayOfBooking']] Y = df2['Price'] X = add_constant(X) fit = sm.OLS(Y, X).fit() print(fit.sum...
Concessionaire asked 10/12, 2016 at 11:38

© 2022 - 2024 — McMap. All rights reserved.