statsmodels Questions
3
Solved
I cannot manage to import statsmodels.api correctly when i do that I have this error:
File "/home/mlv/.local/lib/python3.5/site-packages/statsmodels/tsa/statespace/tools.py", line 59, in set_mod...
Unmoved asked 17/5, 2018 at 12:47
2
Logistic regression model using statesmodels:
log_reg = st.logit(formula = 'label ~ pregnant + glucose + bp + insulin + bmi + pedigree + age', data=pima).fit()
is there any short way of writing ...
Feodor asked 20/2, 2016 at 2:38
2
Solved
I am looking for influence statistics after fitting a linear regression. In R I can obtain them (e.g.) like this:
hatvalues(fitted_model) #hatvalues (leverage)
cooks.distance(fitted_model) #Cook's...
Ministrant asked 19/9, 2017 at 15:37
2
Solved
I am trying calculate a regression output using python library but I am unable to get the intercept value when I use the library:
import statsmodels.api as sm
It prints all the regression analysis...
Chane asked 8/8, 2016 at 18:49
1
Solved
Taken from here (my website). I wonder how to plot interaction plot from statsmodels.formula.api objects.
Consumption = [51, 52, 53, 54, 56, 57, 55, 56, 58, 59, 62, 63]
Gender = ["Male", ...
Camara asked 13/4, 2019 at 8:23
2
I'm trying to run a multiple OLS regression using statsmodels and a pandas dataframe. There are missing values in different columns for different rows, and I keep getting the error message:
ValueEr...
Incommunicative asked 6/3, 2014 at 19:55
1
Solved
I have a dataframe which is of length 177 and I want to calculate and plot the partial auto-correlation function (PACF).
I have the data imported etc and I do:
from statsmodels.tsa.stattools imp...
Semidome asked 20/3, 2019 at 2:1
0
I'm trying, similar to R's ugarch
# standard GARCH model with optional ARMA part
spec <- ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(r,s)),
mean.model = list(armaOrder ...
Xerxes asked 19/3, 2019 at 13:10
2
I am using statsmodels (open to other python options) to run some linear regression. My problem is that I need the regression to have no intercept and constraint the coefficients in the range (0,1)...
Taxexempt asked 26/2, 2019 at 23:39
1
Solved
I am trying to implement a time series model and getting some strange exceptions that tells nothing to me. I wonder if I am making a mistake or if it is totally expected. Here comes details...
Whe...
Selfheal asked 11/3, 2019 at 20:30
2
I use ARIMA from statsmodels package in order to predict values from a series:
plt.plot(ind, final_results.predict(start=0 ,end=26))
plt.plot(ind, forecast.values)
plt.show()
I thought that I woul...
Ebullient asked 9/8, 2017 at 16:50
3
Solved
I'd like to choose the best algorithm for future. I found some solutions, but I didn't understand which R-Squared value is correct.
For this, I divided my data into two as test and training, and I...
Greater asked 10/2, 2019 at 7:4
1
There was a post a few years ago on this but only a quick fix was included. Specifying a Constant in Statsmodels Linear Regression?
Quick fix was to run first and subtract interception equation An...
Syrupy asked 18/1, 2019 at 15:43
1
ARIMA from statsmodels is giving me inaccurate answers for my output. I was wondering whether someone could help me understand what's wrong with my code.
This is a sample:
import pandas as pd
imp...
Tract asked 29/7, 2015 at 2:12
2
Solved
I am having an issue with my statsmodels OLS estimation. The model runs without any issues, but when I try to call for a summary so that I can see the actual results I get the TypeError of the axis...
Marauding asked 22/4, 2015 at 13:31
1
I have a dataframe with 3 columns ['X', 'Y', 'Z'] and I would like to study how the X and Y influence the distribution of Z. For that, I wanted to use the nonparametric regressor of nadaraya watson...
Ose asked 17/3, 2018 at 21:13
13
I just installed pandas and statsmodels package on my python 2.7
When I tried "import pandas as pd", this error message comes out.
Can anyone help? Thanks!!!
numpy.dtype has the wrong size, try re...
Tungstic asked 17/7, 2013 at 20:30
2
Solved
I have a set of data. I have use pandas to convert them in a dummy and categorical variables respectively. So, now I want to know, how to run a multiple linear regression (I am using statsmodels) i...
Appalling asked 7/6, 2018 at 4:34
1
Solved
How can I calculate the weighted coefficient of variation (CV) over a NumPy array in Python? It's okay to use any popular third-party Python package for this purpose.
I can calculate the CV using ...
Rattlepate asked 12/12, 2018 at 17:41
2
Solved
I am running OLS regression using pandas.stats.api.ols using a groupby with the following code:
from pandas.stats.api import ols
df=pd.read_csv(r'F:\file.csv')
result=df.groupby(['FID']).apply(la...
Maxentia asked 1/4, 2016 at 16:7
1
Solved
I've been experimenting with Seaborn's lmplot() and Statsmodels .ols() functions for simple linear regression plots and their associated p-values, r-squared, etc.
I've noticed that when I specify...
Aniseikonia asked 17/10, 2018 at 18:30
2
Solved
I followed the statsmodel tutorial on VAR models and have a question about the results I obtain (my entire code can be found at the end of this post).
The original data (stored in mdata)is clearly...
Volpe asked 9/3, 2016 at 14:13
2
Solved
I'm trying to test ARMA models, and working through the examples provided here:
http://www.statsmodels.org/dev/examples/notebooks/generated/tsa_arma_0.html
I can't tell if there is a straightforw...
Petaliferous asked 17/5, 2017 at 17:14
1
Solved
I want to calculate Cooks_d and DFFITS in Python using statsmodel.
Here is my code in Python:
X = your_str_cleaned[param]
y = your_str_cleaned['Visitor']
X = sm.add_constant(X)
model = sm.OLS(y, ...
Dressel asked 17/7, 2018 at 21:6
1
Solved
After fitting a local level model using UnobservedComponents from statsmodels , we are trying to find ways to simulate new time series with the results. Something like:
import numpy as np
import s...
Bidding asked 16/8, 2018 at 16:0
© 2022 - 2024 — McMap. All rights reserved.