Questions tagged [statsmodels]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
21 views

Is there a python package that can replicate this model?

I'm trying to convert a short R data analysis script to python and can't find the right modules/packages to do so. This is the script in R: ...
user avatar
2 votes
1 answer
26 views

ARIMA predictions look shifted by one unit of time

I am using statsmodels ARIMA (1,2,1) to predict the monthly demand for a product. The predictions look like they are shifted to the right by one month. I wonder if the statsmodels.ARIMA.Residuals....
user avatar
  • 121
2 votes
2 answers
62 views

Predicting deterioration of equipment on a production line

Background There is a production line where there is a machine that interacts with some tools. The process goes as such. Machine makes a product Product is moved into the tool When the product is ...
user avatar
  • 123
0 votes
0 answers
39 views

Why coefficients from logistic regression are not proportional to bad rate?

I am building a logistic regression model in Python with statsmodels.api.Logit. The model contains 12 features that are encoded using ...
user avatar
0 votes
0 answers
292 views

NaN, inf or invalid value detected in endog, estimation infeasible error when training statsmodels GLM model

I am trying to build a GLM model (poisson family) using python statsmodels package on train data. The data I have contains categorical values as exogenous variables and numerical values for my target (...
user avatar
1 vote
1 answer
52 views

Persistence and stationarity together

I am trying to analyse a time series. I want to get only quantitative results (so, I'm excluding things like "looking at this plot we can note..." or "as you can see in the chart ...&...
user avatar
  • 169
1 vote
0 answers
67 views

Statsmodel manually set/restore coefficients of model

I was wondering if it is possible to manually restore the coefficients of a given model? That is, given a computed set of coefficients, to reinitialize another statsmodel with those parameter (...
user avatar
  • 11
0 votes
1 answer
27 views

Difference in statsmodel output vs direct linear algebra with input binary variable

I was wondering why there might be a difference when I run a simple multiple linear regression with statsmodels OLS, vs just doing it directly with numpy. The results are identical for both cases, so ...
user avatar
  • 11
1 vote
1 answer
21 views

When an Fourier Analysis should be used for timeseries data

When Fourier Analysis should be used for time-series data,except when doing decomposition?
user avatar
  • 33
1 vote
0 answers
35 views

Understanding plotted ACF on stationary time-series data

I made time-series data stationary and plotter ACF & PCF, while PCF looks fine, I do not know how to interpretate ACF, as it looks like this - I could not say it geometrical. For PACF - it is ...
user avatar
  • 33
0 votes
1 answer
15 views

PACF for Airline Passengers dataset: What's wrong?

The airline passengers dataset is available here, but it also comes with in R. I'm working with python, and I import the following (besides the usual like pandas and numpy.) ...
user avatar
1 vote
0 answers
23 views

Does this ARIMA model take seasonality into account?

I'm writing a tutorial on traditional time series forecasting models. One key issue with ARIMA models is that they cannot model seasonal data. So, I wanted to get some seasonal data and show that the ...
user avatar
2 votes
1 answer
1k views

How do I use number of hours as index in timeseries forecasting?

I have a dataset that has number of hours (consecutive value) and total sales in that 1 hour in my dataset. See below for head of the dataset: ...
user avatar
0 votes
0 answers
47 views

Mutiple binary classification for for best propensity to buy one of the product

Problem:- I have 5 products for sell and I can pitch only one product in a month to one customer.so I wants to know which product customer can buy. Proposed solution:- I build 5 binary logistic models ...
user avatar
0 votes
0 answers
42 views

Sarimax fit for prediction further into future

I want to fit sarimax model of statsmodels so that it is optimized for predicting into future not just the next sample. Let's say predicting 5 time steps ahead. I can do this by model.forecast(5) but ...
user avatar
0 votes
0 answers
75 views

Getting KeyError while executing forcast( ) in statsmodel's holtwinters function

I'm trying to get time series prediction using the following code. ...
user avatar
1 vote
2 answers
51 views

Which features are important in determining fluency of participants measured by weighted composite score?

I'm starting to learn about data science. I have sample data including different features run over several people, for each person n times. these features represent the fluency of the participants in ...
user avatar
  • 11
0 votes
1 answer
1k views

Statsmodel logit with sample weights

Using sklearn I can consider sample weights in my model, like this: ...
user avatar
  • 101
0 votes
2 answers
164 views

Selecting most important features for multilinear regression

I have a set of 25 features. I would like to choose the best features for my model. Originally, I was looking at the correlation of features with respect to response, and only taking those which are ...
user avatar
  • 466
1 vote
0 answers
269 views

statsmodels.tsa.holtwinters.ExponentialSmoothing: what do “additive”/“multiplicative” trend and seasonality actually mean?

There are additional concepts of additivity and multiplicativity for trend (trend{“add”, “mul”, “additive”, “multiplicative”, None}) and seasonality (...
user avatar
1 vote
1 answer
568 views

How to interpret my logistic regression result with statsmodels

so I'am doing a logistic regression with statsmodels and sklearn. My result confuses me a bit. I used a ...
user avatar
  • 157
2 votes
0 answers
817 views

How to interpret my logistic regression result?

I'm having a hard time to interpret my result of the logistic regression. I have a few question. Firstly, how can I check if a feature is more important to the others, like that there is a real ...
user avatar
  • 157
1 vote
0 answers
28 views

analyze the effect of some new changes to business rules on customers retention and sales

I am trying to analyze the effect of a particular business rule on customer behavior. Background: I have two call centers operating in my company. One is an in-house call center and the other one is a ...
user avatar
1 vote
1 answer
118 views

Does statsmodels compute R2 and other metrics on a validation-/test- set?

Does statsmodels compute R2 and other metrics on a validation set? I am using the OLS from the statsmodels.api when printing summary, an r2 and r2_asjusted are ...
user avatar
2 votes
0 answers
502 views

How to retrieve results summary from statsmodels GLM with regularization?

I'm trying to fit a GLM to predict continuous variables between 0 and 1 with statsmodels. Because I have more features than data, I need to regularize. ...
user avatar
0 votes
0 answers
16 views

Ideas on handling large quantities of "waste" data

Hello and thank you for taking time out of your day to help me. I am currently working on developing a machine vision application for production monitoring. The application handles images, about 20,...
user avatar
0 votes
1 answer
15 views

multi items forecasting: issue with storing results

disclaimer: I am not 100% sure that this is the appropriate place to ask this question. Here is a little bit of context about the problem. I have a dataset containing about 1000 products timeseries (...
user avatar
1 vote
0 answers
105 views

How to implement large-scale Poisson Regression in Python

I am trying to implement a Poisson Regression in Python to predict rates. I am dealing with a ton of data (too much to store in a DataFrame), which means that using the standard statsmodels.api GLM ...
user avatar
2 votes
0 answers
141 views

Classification and clustering of Time series data of temperature

I have a time series recorded data of temperature. This is what my data looks like: The change in data represents specific event or a class which I would like to detect when new incoming data. ...
user avatar
1 vote
0 answers
19 views

Solve a regression equation algebraically in python

I fit a regression model using python statsmodels.formula.api package and obtain the coefficients/results. Here's the model: ...
user avatar
  • 302
2 votes
0 answers
145 views

Does statsmodels fully support MultiIndex?

The below code snippet shows how statsmodels seems to flatten MultiIndex tuples by joining them with an underscore "_". ...
user avatar
  • 231
1 vote
0 answers
25 views

Stasmodels unexpected behaviour

I am using statsmodels in python to perform quantile regression. I am running quantile 99 and quantile 1 to see the extremes quantile of my distribution. ...
user avatar
  • 5,674
1 vote
1 answer
682 views

Can we do multivariate time series analysis using holt-winter ( Exponential smoothing) method?

Just like we have a method like ARIMAX and SARIMAX where we can provide exog and endog variable for perfroming multivariate analysis. I was hoping is there a way, we can achieve same using ETS as well....
user avatar
2 votes
2 answers
126 views

High error Arima model - Python

I have a time series data. It has daily frequency. I want to forecast the data for the next week or month with an ARIMA model. This is a chart of my time series data: First I use the method ...
user avatar
7 votes
1 answer
2k views

Why Scikit and statsmodel provide different Coefficient of determination?

First of all, I know there is a similar question, however, I didn't find it so much helpful. My issue is concerning simple Linear regression and the outcome of R-Squared. I founded that results can ...
user avatar
1 vote
1 answer
71 views

what is the difference between Bias and overfilling and under fitting? [closed]

I am confused about Bias and overfitting as I see it sounds similar but not able to explain differene?
user avatar
1 vote
1 answer
89 views

Question on ANOVA and Correlation/Association

I've been working on examining statistical relationships between variable: Pearsons, Spearman's for continuous variables Kendall's Tau, Cramer's V for ordinal/nominal variables. I know there's many ...
user avatar
1 vote
0 answers
23 views

Using Residual Plots to combat Simpson's Paradox and Other Misleading phenomenon

I've read that univariate analysis is a huge part of EDA, pretty much everywhere. What I understand of univariate analysis basically comes down to using Seaborn pairplot and correlation matrices and ...
user avatar
1 vote
1 answer
28 views

How to do backward features elimination when considering interactions between them

I have a multi linear regression problem, $Y$ is my target and $X_1, X_2, X_3$ are my features. In my regression, I consider the interaction between $X_1, X_2, X_3$ and I add a bias. So my problem ...
user avatar
1 vote
1 answer
846 views

Timeseries VAR vs VARMA model: issue in time to fit model

I want to use VARMA model on a data of about 80000 samples with 10 features. I tried using VARMA model from statsmodels with p=50 and q=10 but it is taking too much time to build the model. I tested ...
user avatar
2 votes
0 answers
2k views

Some of the p-values are NaN - logistic regression

I am trying to do logisitc regression, but have this issue - some of the p values are NaN ...
user avatar
2 votes
0 answers
84 views

Using an unmerged branch from StatsModels for Anaconda

I am interested in using a statistical test from StatsModels, one that is not available in the default Anaconda StatsModels folder on my drive. See this blog, which as some point mentions, almost ...
user avatar
1 vote
2 answers
447 views

Can I conduct independent t-test when data is infested with outliers ? and how to interpret the t-statistics?

I am working on 2 sample independent t-test. I have conducted analysis on test group vs control group and I have to write a report but I have few questions. Do we have to take out the outliers and ...
user avatar
  • 151