statsmodels Questions

1

I am trying to separate seasonality, trend and residual from timeseries 'XYZ.csv' (sales data collected over 2 years of time). [XYZ.csv contains 2 columns - date and sales. Date has been set as a...
Bounden asked 18/4, 2018 at 18:15

7

Solved

I downloaded the StatsModels source from this location. Then untarred to /usr/local/lib/python2.7/dist-packages and per this documentation, did this sudo python setup.py install It installed but ...
Westberg asked 3/8, 2012 at 3:35

2

Solved

So I have a CSV file with two columns: date and price, but when I tried to use ARIMA on that time series I encountered this error: ValueWarning: A date index has been provided, but it has no assoc...
Impotence asked 22/10, 2019 at 18:52

1

I've been reading about time-series decomposition, and have a fairly good idea of how it works on simple examples, but am having trouble extending the concepts. For example, some simple synthetic d...
Cohberg asked 5/2, 2021 at 17:2

2

I was trying out seasonal_decompose to decompose my time series. The data is perfect time series with frequency of '2T' i.e. 2 Minutes. From file tsatools.py (site-pkgs\statsmodels\tsa\tsatools.py)...
Mendive asked 18/3, 2016 at 12:1

3

Solved

I've been using Python for regression analysis. After getting the regression results, I need to summarize all the results into one single table and convert them to LaTex (for publication). Is there...
Eximious asked 10/5, 2014 at 1:49

3

While using statsmodels, I am getting this weird error: ValueError: endog must be in the unit interval. Can someone give me more information on this error? Google is not helping. Code that produc...
Kirakiran asked 9/7, 2015 at 15:47

3

Solved

In OLS form StatsModels, results.summary shows the summary of regression results (such as AIC, BIC, R-squared, ...) Is there any way to have this summary table in sklearn.linear_model.ridge? I woul...
Trude asked 16/10, 2016 at 16:54

2

Solved

I calculated a model using OLS (multiple linear regression). I divided my data to train and test (half each), and then I would like to predict values for the 2nd half of the labels. model = OLS(la...
Gumm asked 4/11, 2012 at 12:21

1

There is a very useful function in R called findfrequency on the forecast package that returns the period of the dominant frequency of a time series. More info on the function from the author can b...
Aristophanes asked 27/4, 2020 at 17:31

1

Solved

I am using statsmodels.api.tsa.seasonal_decompose to do some seasonal analysis of a time series. I set it up using decomp_viz = sm.tsa.seasonal_decompose(df_ts['NetConsumption'], period=48*180) an...
Assuasive asked 16/12, 2021 at 10:23

9

Solved

I'm trying to calculate the variance inflation factor (VIF) for each column in a simple dataset in python: a b c d 1 2 4 4 1 2 6 3 2 3 7 4 3 2 8 5 4 1 9 4 I have already done this in R using th...
Portly asked 7/3, 2017 at 21:9

1

Solved

I am performing linear regression using Sklearn and statsmodels. I know that Sklearn and statsmodels produce the same result. As shown below, Sklearn and statsmodels made the same result, but the r...
Dynamiter asked 1/12, 2021 at 4:57

3

Solved

I have the following list of lists: [[1, 1, 1, 1, 3, 0, 0, 1], [1, 1, 1, 1, 3, 0, 0, 1], [1, 1, 1, 1, 2, 0, 0, 1], [1, 1, 0, 2, 3, 1, 0, 1]] Where I want to calculate an inter-rater reliabili...
On asked 6/6, 2019 at 15:59

2

Solved

I am having some trouble with the ccf() method in the (Python) statsmodels library. The equivalent operation works fine in R. ccf produces a cross-correlation function between two variables, A and ...
Copperplate asked 19/8, 2020 at 17:20

6

I am trying to use Ordinary Least Squares for multivariable regression. But it says that there is no attribute 'OLS' from statsmodels. formula. api library. I am following the code from a lecture o...
Adamok asked 4/6, 2019 at 18:57

3

When it comes to measuring goodness of fit - R-Squared seems to be a commonly understood (and accepted) measure for "simple" linear models. But in case of statsmodels (as well as other statistical ...
Nought asked 27/7, 2015 at 14:0

3

File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\mingw dry_run, force) File "C:\ProgramData\Anaconda3\lib\distutils\cygwinccompiler.py", line if self.ld_version &gt...
Sago asked 13/2, 2018 at 10:31

2

Given the some randomly generated data with 2 columns, 50 rows and integer range between 0-100 With R, the poisson glm and diagnostics plot can be achieved as such: > col=2 > row=50 ...
Amata asked 7/12, 2017 at 1:35

3

Solved

I'm wondering how can I get odds ratio from a fitted logistic regression models in python statsmodels. >>> import statsmodels.api as sm >>> import numpy as np >>> X = np...
Multiplex asked 5/6, 2016 at 22:26

2

Hi I'm learning Statsmodel and can't figure out the difference between : and * (interaction terms) for formulas in StatsModels OLS regression. Could you please give me a hint to figure this out? T...
Grundy asked 10/10, 2015 at 3:58

2

Solved

I am looking for a way to save the results to save the results of the Tukeyhsd into a pandas dataframe. see below: import matplotlib.pyplot as plt import statsmodels.formula.api as smf import stat...
Outfitter asked 9/11, 2016 at 22:6

1

Solved

I have the following panel stored in df: state district year y constant x1 x2 time 0 01 01001 2009 12 1 0.956007 639673 1 1 01 01001 2010 20 1 0.972175 639673 2 2 01 01001 2011 22 1 0....
Quadrature asked 20/9, 2021 at 20:37

4

Solved

I can't find any reference on funcionality to perform Johansen cointegration test in any Python module dealing with statistics and time series analysis (pandas and statsmodel). Does anybody know if...
Shope asked 29/8, 2012 at 21:47

2

Solved

I am using OLS from statsmodel, the link is https://www.statsmodels.org/stable/examples/notebooks/generated/ols.html #USD X = sm.add_constant(USD) model = sm.OLS(y, X) results = model.fit() print(...
Despair asked 23/10, 2018 at 6:49

© 2022 - 2024 — McMap. All rights reserved.