2,867 questions
4
votes
2
answers
55
views
Residual Analysis for simple linear regression model
I'm trying to conduct the residual analysis for simple linear regression. I need to prove that the residuals follow an approximate Normal Distribution.
The csv file I'm using has values for Percentage ...
1
vote
1
answer
67
views
saving statsmodel to adls blob storage
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 ...
1
vote
1
answer
50
views
Exporting regression tables from statsmodels into Word
I am making a lot of regression models in Python. I want to report the results in tables in a word-file. Is there any way I can export the results into nicely formatted tables in word, e.g., into a ....
1
vote
0
answers
33
views
How to replicate statmodels' ARIMA fittedvalues for a MA(1)? (Python package)
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 ...
0
votes
0
answers
39
views
Implementing survey weights in statsmodels OrderedModel ordinal logistic regression
I am trying to run an ordinal logistic regression on survey data and implementing existing survey weights (stored in a column in the dataframe) in the model. I am using statsmodels.miscmodels....
0
votes
0
answers
27
views
How can I extract absolute beta coefficients for all levels of multiple categorical variables in statsmodels?
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 “...
1
vote
0
answers
32
views
how to specify that the error term is an AR(1) process using IV2SLS regression of Python statsmodel?
I am trying to replicate an eviews code in Python. I need to fit a regression with a constant, some endogeneous variables that I instrumentalize and some exogeneous variables. The dependant variable ...
0
votes
1
answer
25
views
How to get static ARIMA forecasts with statsmodels
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 ...
0
votes
0
answers
23
views
How does Statsmodels ARIMA compute the first few fitted values?
Suppose I have an ARIMA(p,d,q), d>0 that I estimate using statsmodels. (See ARIMA class here.) For in-sample forecasts for t >= d, I get exactly what I expect, namely the Y(t) uses exactly the ...
0
votes
1
answer
19
views
AttributeError: 'SVARResults' object has no attribute 'k_exog_user'
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,
...
2
votes
1
answer
86
views
Trying to understand differences in weighted logistic regression outputs between Statsmodels and R's survey & srvyr packages
I have a fictional weighted survey dataset that contains information about respondents' car colors and their response to the question "I enjoy driving fast." I would like to perform a ...
1
vote
0
answers
39
views
SVAR from statsmodel.tsa: if len(A_guess) != n_masked_a: TypeError: object of type 'int' has no len()
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 ...
2
votes
0
answers
36
views
What null hypothesis is rejected by the value of statsmodels RLM
I am using statsmodels to perform a robust linear regression on some data I have. I wanted to understand whether the slope of my regression is significantly different from 0. In scipy I due this by ...
1
vote
0
answers
50
views
Can statsmodels be used to obtain clustered standard errors in a fixed effects regression model? (Python)
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 ...
0
votes
0
answers
18
views
FFN ffn.core.PerformanceStats setting risk free rate as Series instead of float number
Using FFN, I set the risk free rate as a Series but the Sharpe Ratio is considerably different from the one calculated just with a float number, even if the Series of risk free rates is equal to the ...