Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
0 answers
21 views

I generated a random dataset that has 1 categorical column and 30 numeric columns. The categorical variable has 3 classes X, Y and Z. See data generation code below I need help with Steps 2,3 and 4: ...
nasa313's user avatar
  • 318
2 votes
1 answer
257 views

Whenever I try to build a multinomial regression using the R-style formula approach in statsmodels in Python, I get ValueError: endog has evaluated to an array with multiple columns... Here's a ...
Brian Bull's user avatar
3 votes
2 answers
124 views

So to execute a z-test in python, I have seen people doing: from statsmodels.stats.weightstats import ztest as ztest # IQ levels of 20 patients post medication data = [88, 92, 94, 94, 96, 97, 97, 97, ...
Rushank Savant's user avatar
0 votes
0 answers
30 views

Using statsmodels.api to produce a qqplot leads to doubling the expected plot, with a strange positioning of the titles, and 2 different plot sizes... The following small code is an example I made to ...
Andrew's user avatar
  • 1,226
1 vote
0 answers
14 views

I'm currently exploring a couple of statistical forecasting methods. My problem rose when using VARMA(2,1) fixed window rolling forecast. The example code that I'm using is the following: Here I only ...
Silvio Klenk's user avatar
0 votes
1 answer
44 views

I am trying to run a super simple python script where I pull data from a sql query and then extract the appropriate variables to run a probit on. nl and the variable names listed in cols are all long ...
Aaron Fehl's user avatar
1 vote
1 answer
85 views

i currently have a model fit using statsmodel OLS formula and I am trying to save this model to ADLS blob storage. '/mnt/outputs/' is a mount point I have created and I am able to read and write other ...
J. Doe's user avatar
  • 311
1 vote
0 answers
60 views

Let's simulate a MA(1) process using numpy import numpy as np # Simulation parameters n = 20 # Number of observations theta_1 = 0.7 # MA(1) coefficient sigma = 1.0 # Standard deviation of white ...
Nicolas Tanzi's user avatar
0 votes
0 answers
37 views

I’m performing linear regression in Python with statsmodels. I have two categorical predictors: sample: a factor with 8 levels distractor: a factor with 2 levels My goal is to determine the “...
Blade's user avatar
  • 1,130
1 vote
1 answer
50 views

I'm trying to replicate a Stata ARIMA analysis in statsmodels. This analysis used static predictions from its ARIMA (1,0,4) model with four exogenous regressors. I've replicated the model – both Stata ...
AustinC's user avatar
  • 846
0 votes
1 answer
43 views

I am using the following code to conduct a SVAR estimation: data_q = pd.DataFrame({'GDP': GDP, 'CPI': CPI_q, 'Interest_rate': Interest_rate_q, ...
Oriol's user avatar
  • 11
1 vote
0 answers
43 views

I am using the following code to conduct a SVAR estimation but it keeps crashing, always the same kind of error: len(A_guess) != n_masked_a: TypeError: object of type 'int' has no len(). CAN ANYONE ...
Oriol's user avatar
  • 11
1 vote
0 answers
73 views

I have a cross-sectional dataset and am doing some simple econometric exercises with it using the statsmodels package in Python. At a certain point I tried to run a fixed effects regression model ...
Filipe P.'s user avatar
0 votes
0 answers
51 views

I'm trying to get the same results from my Exponential Smoothing function and the built-in one. Here is my implementation. def exponential_smoothing(series, alpha): smoothed = [series[0]] ...
Чорны Бусел's user avatar
0 votes
0 answers
27 views

I am working with a SARIMAX model trained on a given dataset. I am trying to get an in-sample forecast but using different values for exog variables. This is to test how the forecast changes with ...
Tejas's user avatar
  • 131
0 votes
1 answer
354 views

I am new to using statsmodel in python (and a lot of more generalized statistics in general), but I have a question regarding the difference between how sm.GLM and smf.glm calculate their results. ...
tinfangwarble's user avatar
-1 votes
1 answer
63 views

I am trying to use Python to calculate mean absolute error (MAE) while doing zero-inflated Poisson regression and zero-inflated negative binomial regression. I separated data into training data and ...
Student coding's user avatar
1 vote
0 answers
97 views

I'm working on a statistical analysis to calculate odds ratios and their 95% confidence intervals for several variables over specific time points. While the odds ratios are being calculated correctly, ...
Vicky's user avatar
  • 11
0 votes
1 answer
62 views

Construct a graph of the value of the Russian ruble against the Egyptian pound based on data at the end of trading. Select the best ARIMA model, predict further exchange rate values ​​based on it, ...
Faded Deer's user avatar
1 vote
1 answer
113 views

I have trained a glm as follows: fitGlm = smf.glm( listOfInModelFeatures, family=sm.families.Binomial(),data=train, freq_weights = train['sampleWeight']).fit() The results looks good: ...
Giampaolo Levorato's user avatar
0 votes
1 answer
970 views

I am struggling to compile and use X-13ARIMA-SEAT on a Mac with an m3 chip, and called it using sm.tsa.x13_arima_analysis(s, x12path='/usr/local/bin/x13as') in statsmodels. Finally, I succeeded and ...
ah bon's user avatar
  • 10.1k
1 vote
0 answers
31 views

I'm trying to create a Tweedie Regression in statsmodels. The regression basically has three categorical predictors which have four levels each. To ilustrate, here is an example: import pandas as pd ...
Felippe Trigueiro 's user avatar
0 votes
1 answer
128 views

I am trying to produce the predicted probabilities of a conditional logistic regression model that is built with a case-control dataset using statsmodels package (0.12.2) in Python. The package ...
Ali Fahmi's user avatar
1 vote
0 answers
237 views

At the base level I am trying to determine if two stocks are cointegrated. To that end I take the adjusted close data of two stocks and call coint on this data. However I am unsure if the coint test ...
AAM's user avatar
  • 97
0 votes
0 answers
148 views

Outline: I am using a vector autoregression (VAR) model from the statsmodel package https://www.statsmodels.org/stable/vector_ar.html#var. My two time-series, let us call them time-series 1) ts1 and 2)...
Philipp's user avatar
  • 415

1
2 3 4 5
58