Skip to main content

Questions tagged [statsmodels]

Filter by
Sorted by
Tagged with
0 votes
1 answer
13 views

Multivariate linear regression via scikit and statsmodels

want to preface this first with terminology: multivariate regression deals with the case where there are more than one dependent variables while multiple regression deals with the case where there is ...
Borla312's user avatar
0 votes
1 answer
44 views

Beta Regression Model in Python for Effect of Marketing Campaign B Membership on CTR

I am trying to build a model to estimate the ATE of Campaign B (B1) on CTR (Click-thru-Rate), with Campaign A as the baseline (B0), represented by column 'a_or_b'. Other exogenous variables are: '...
Jacob Perius's user avatar
1 vote
0 answers
11 views

Unexplainable noise in STL of clean, seasonal data

I am encountering unexplained noise in the residual component after STL decomposition. I use this dataset taken from NAB's benchmark. It is a periodic (daily) timeseries, with no noise or anomalies. ...
Tal's user avatar
  • 111
0 votes
0 answers
16 views

Supply weights/number of obs to instead of one obs per row when doing multinomial regression?

EDIT: The code below is using statsmodels but I have the same problem when using sklearn. I'm trying to do multinomial regression using the statsmodels MNLogit package. It says in the documentation ...
anders's user avatar
  • 101
0 votes
0 answers
10 views

What am I doing wrong with my code. The graph is not creating a well behaved log.likelihood graph

...
T15266489's user avatar
1 vote
0 answers
9 views

How to calcualte LR_statistic for the below data

I am trying to calculate LR_statistic for two models where my log-likelihood ratio values as follows. model1.llf = -2326.9 and model2.llf = -4649.1. When read ...
udaykumar gajavalli's user avatar
0 votes
1 answer
30 views

What statistical model suits for this problem?

I have a dataset with 6 target variables and the target variables are Boolean. The requirement is to use logistic regression to build the model. Which ML approach can be used in this situation? Will ...
Miuni Nihara's user avatar
0 votes
1 answer
167 views

Time series: Why does this data have seasonality on periods where observed values are zero

I'm a novice to time series and am using seasonal_decompose() to split a time series into three components: trend, seasonality, and residuals as below: As shown in ...
user9532692's user avatar
0 votes
2 answers
123 views

What model should I use to predict monthly sales by products?

I am trying to predict monthly sales by product based on a plethora of variables. There are 4 predictors. One is categorical (month) and the other three are numerical. One of the variables is just ...
Lauren's user avatar
  • 1
1 vote
0 answers
58 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: ...
HavingNoHead's user avatar
2 votes
1 answer
313 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....
Gloksinya's user avatar
  • 121
3 votes
5 answers
228 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 [tool here is ...
fred's user avatar
  • 31
0 votes
0 answers
93 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 ...
aljrub12's user avatar
0 votes
0 answers
1k 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 (...
Karima Touati's user avatar
2 votes
2 answers
1k views

Does t-test require Standard Deviation of sample for calculation

Might be a novice question, but the main difference between a t-test and z-test, I was able to understand, is that the z-test calculation requires the SD value of the population where as in a t-test, ...
Chris_007's user avatar
  • 193
1 vote
1 answer
283 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 ...&...
user96624's user avatar
  • 169
1 vote
1 answer
49 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?
Zexxxx's user avatar
  • 33
1 vote
0 answers
56 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 ...
Zexxxx's user avatar
  • 33
0 votes
1 answer
25 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.) ...
An old man in the sea.'s user avatar
1 vote
0 answers
49 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 ...
codeananda's user avatar
3 votes
1 answer
3k 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: ...
Sandhya Indurkar's user avatar
0 votes
0 answers
297 views

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

I'm trying to get time series prediction using the following code. ...
soham_dhole's user avatar
1 vote
2 answers
64 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 ...
Lili's user avatar
  • 11
2 votes
1 answer
4k views

Statsmodel logit with sample weights

Using sklearn I can consider sample weights in my model, like this: ...
giotto's user avatar
  • 123
0 votes
2 answers
753 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 ...
Maths12's user avatar
  • 526
2 votes
0 answers
672 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 (...
Vladimir Fadeev's user avatar
1 vote
2 answers
1k 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 ...
grumpyp's user avatar
  • 157
2 votes
0 answers
2k 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 ...
grumpyp's user avatar
  • 157
1 vote
0 answers
37 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 ...
NewbietoPython's user avatar
1 vote
1 answer
438 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 ...
Alexander Vocaet's user avatar
3 votes
0 answers
978 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. ...
Rylan Schaeffer's user avatar
0 votes
1 answer
18 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 (...
Murcielago's user avatar
1 vote
0 answers
223 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 ...
Michael Petro's user avatar
2 votes
0 answers
189 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. ...
Abdul Rehman's user avatar
1 vote
0 answers
22 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: ...
kms's user avatar
  • 310
2 votes
0 answers
243 views

Does statsmodels fully support MultiIndex?

The below code snippet shows how statsmodels seems to flatten MultiIndex tuples by joining them with an underscore "_". ...
OldSchool's user avatar
  • 261
1 vote
0 answers
31 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. ...
David Masip's user avatar
  • 6,111
2 votes
1 answer
2k 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....
yogesh agrawal's user avatar
2 votes
2 answers
268 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 ...
J.C Guzman's user avatar
8 votes
2 answers
5k 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 ...
Luckasino's user avatar
  • 183
1 vote
1 answer
101 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?
yathislax's user avatar
1 vote
1 answer
766 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 ...
rocksNwaves's user avatar
1 vote
0 answers
42 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 ...
rocksNwaves's user avatar
1 vote
1 answer
32 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 ...
Oussama Jabri's user avatar
1 vote
1 answer
1k 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 ...
shaifali Gupta's user avatar
2 votes
0 answers
4k 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 ...
Sim_Demo's user avatar
2 votes
0 answers
138 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 ...
Martien Lubberink's user avatar
3 votes
1 answer
2k views

Advice on imputing temperature data with StatsModels MICE

This may be a dumb question but I can't figure out how to actually get the values imputed using StatsModels MICE back into my data. I have a dataframe (dfLocal) with hourly temperature records for ...
plytheman's user avatar
1 vote
2 answers
2k 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 ...
pinky's user avatar
  • 151