statsmodels Questions
1
Solved
I have some numbers stored in a variable called "constant"
When I try to test the mean-reversion by using
cadf = ts.adfuller(constant)
I received ValueError: too many values to unpack.
How c...
Defeatism asked 19/11, 2017 at 11:27
3
I want to build a Random Forest Regressor to model count data (Poisson distribution). The default 'mse' loss function is not suited to this problem. Is there a way to define a custom loss function ...
Strobilaceous asked 26/3, 2018 at 14:0
1
Solved
I'm using statsmodels.api to inspect the statistical parameters from different combinations of variables. You can use print(results.summary()) to get
OLS Regression Results
=====================...
Valona asked 29/7, 2018 at 22:23
5
Solved
I'm doing logistic regression using pandas 0.11.0(data handling) and statsmodels 0.4.3 to do the actual regression, on Mac OSX Lion.
I'm going to be running ~2,900 different logistic regression mo...
Sudd asked 23/5, 2013 at 4:19
0
I'm using ARIMA model to forecast no of sales of a product. Data is inside a csv file from 01-01-2015 to 24-11-2016 with 1 week interval. I'm trying to forecast for 9 steps ahead i.e. for 9 weeks i...
Rude asked 30/5, 2018 at 11:6
1
I try to fit Autoregression by sm.tsa.statespace.SARIMAX. But I meet a warning, then I want to set frequency information for this model.
Who used to meet it, can you help me ?
fit1 = sm.tsa.states...
Dedededen asked 29/3, 2018 at 2:49
2
Solved
I know there are many questions on this topic, but none of them helped me to solve this problem. I'm really stuck on this.
With a simple series:
0
2016-01-31 266
2016-02-29 235
2016-03-31 347
201...
Magi asked 21/2, 2017 at 10:34
1
Solved
The question:
How can I add a dummy / factor variable to a model using sm.OLS()?
The details:
Data sample structure:
Date A B weekday
2013-05-04 25.03 88.51 Saturday
2013-05-05 52.98 67.99 Sund...
Juvenal asked 3/5, 2018 at 13:11
1
Solved
I want to test a hypothesis that "intercept = 0, beta = 1" so I should do wald test and used module 'statsmodel.formula.api'.
But I'm not sure which code is correct when doing wald test.
from sta...
Janes asked 1/5, 2018 at 13:14
2
Solved
I'm using statsmodels to fit a ARMA model.
import statsmodels.api as sm
arma = sm.tsa.ARMA(data, order =(4,4));
results = arma.fit( full_output=False, disp=0);
Where data is a one-dimensional a...
Costa asked 4/9, 2013 at 14:29
3
I am using statsmodels.tsa.statespace.sarimax to make prediction.
Here is my code
pprint(list(rolmean_df.index)[0])
>> datetime.date(2015, 5, 19)
mod = sm.tsa.statespace.SARIMAX(rolmean_df...
Dicephalous asked 17/5, 2017 at 18:21
0
I found the statsmodels implementation of the anova testing for linear models to be very useful (http://www.statsmodels.org/dev/generated/statsmodels.stats.anova.anova_lm.html#statsmodels.stats.ano...
Silica asked 13/4, 2018 at 14:38
2
Solved
I want to check the stationary of a time series data saved in TS.csv.
However, R's tseries::adf.test() and Python's statsmodels.tsa.stattools.adfuller()
give completely different results.
adf.tes...
Salerno asked 27/3, 2018 at 6:28
2
I'm trying to do multiple regression with time series data, but when I add the time series column to my model, it ends up treating each unique value as a separate variable, like so (my 'date' colum...
Hide asked 2/3, 2015 at 3:3
1
Accidentally I have noticed, that OLS models implemented by sklearn and statsmodels yield different values of R^2 when not fitting intercept. Otherwise they seems to work fine. The following code y...
Signpost asked 16/2, 2018 at 18:35
1
Solved
I'm new to using statsmodels to do statistical analyses. I'm getting expected answers most of the time but there are some things I don't quite understand about the way that statsmodels defines endo...
Dun asked 18/1, 2018 at 2:37
1
import statsmodels.api as sm
xdat = rets['EUROSTOXX']
xdat = sm.add_constant(xdat)
ydat = rets['VSTOXX']
model = sm.OLS(y=ydat,x=xdat).fit()
I don't understand why there is an error popping up as...
Contredanse asked 26/12, 2017 at 12:26
1
I have some dataset: titanic
Doing this in R
glm(Survived ~ Sex, titanic, family = "binomial")
I get
(Intercept) SexMale
1.124321 -2.477825
R takes survived as positive outcome.
But when I'...
Sparid asked 29/11, 2017 at 11:18
1
Solved
I have a CSV file that contains the average temperature over almost 5 years. After decomposition using seasonal_decompose function from statsmodels.tsa.seasonal, I got the following results. Indeed...
Continuator asked 2/12, 2017 at 15:39
2
Solved
I want to compare two nested linear models, call them m01, and m02 where m01 is the reduced model and m02 is the full model. I want to do a simple F-test to see if the full model adds significant u...
Platitude asked 21/7, 2017 at 17:48
1
I'm fairly new to python and pandas (from using SAS as my workhorse analytical platform), so I apologize in advance if this has already been asked / answered. (I've searched through the documentati...
Gynaeco asked 17/7, 2013 at 0:19
1
Solved
in the statsmodels summary, what does the P>|t| and t mean in relation to the variables when it says something like:
coef std err t P>|t| [95.0% Conf. Int.]
Intercept 7.0326 0.458 15.360 0.000...
Ragi asked 13/11, 2017 at 21:25
2
Solved
I'd like to find the standard deviation and confidence intervals for an out-of-sample prediction from an OLS model.
This question is similar to Confidence intervals for model prediction, but with...
Ollieollis asked 15/9, 2015 at 18:54
2
Solved
I am following along with a statsmodels tutorial
An OLS model is fitted with
formula = 'S ~ C(E) + C(M) + X'
lm = ols(formula, salary_table).fit()
print lm.summary()
Predicted values are provided...
Acerate asked 27/4, 2013 at 3:25
1
I am performing an OLS on two sets of data Y and X. I use statsmodel.api.OLS. However I found some very different results whether I add a constant to X before or not. Here is the code:
import sta...
Carob asked 17/5, 2015 at 10:54
© 2022 - 2024 — McMap. All rights reserved.