statsmodels Questions

2

According to this question How to get constant term in AR Model with statsmodels and Python?. I'm now trying to use the ARMA model to fit the data but again I couldn't find a way to interpret the m...
Roselba asked 20/6, 2014 at 16:34

1

I have a model set up in Python using the statsmodel glm function but now I want to add a sum to zero constraint to the model. The model is defined as follows: import statsmodels.formula.api as s...
Highkey asked 25/3, 2015 at 16:18

1

Solved

I'm trying to run this code: (credit goes to Greg) import pandas as pd from sklearn.model_selection import train_test_split import statsmodels.api as sm quality = pd.read_csv("https://courses...
Maurine asked 23/3, 2015 at 22:46

1

Solved

I have a model which is defined as follows: import statsmodels.formula.api as smf model = smf.glm(formula="A ~ B + C + D", data=data, family=sm.families.Poisson()).fit() The model has coefficien...
Fingerbreadth asked 20/3, 2015 at 11:35

1

I'm using Pandas on Python 2.7. I have data with the following columns: State, Year, UnempRate, Wage I'm teaching a course on how to use Python for research. As the culmination of our project, I w...
Turnpike asked 15/3, 2015 at 19:21

2

Solved

I've got some regressions results from running statsmodels.formula.api.ols. Here's a toy example: import pandas as pd import numpy as np import statsmodels.formula.api as smf example_df = pd.Data...
Saito asked 12/3, 2015 at 20:58

1

I want to use the Pandas dataframe to breakdown the variance in one variable. For example, if I have a column called 'Degrees', and I have this indexed for various dates, cities, and night vs. day...
Watts asked 27/8, 2014 at 21:41

1

Solved

Using a small R sample dataset and the ANOVA example from statsmodels, the degrees of freedom for one of the variables are reported differently, & the F-values results are also slightly differe...
Bellybutton asked 27/2, 2015 at 0:45

1

Solved

Seaborn is a great package for doing some high-level plotting with pretty outputs. However, I'm struggling a little with using Seaborn to overlay both data and model predictions from an externally-...
Inkerman asked 30/1, 2015 at 15:36

1

Solved

Still in the process of understanding the ARIMA source code to forecast some data. (I use two time series (indexed_df and external_df with 365 data points each.) I want to compare the forecast acc...
Alidus asked 11/1, 2015 at 18:26

1

Solved

I am plotting autocorrelation with python. I used three ways to do it: 1. pandas, 2. matplotlib, 3. statsmodels. I found the graph I got from matplotlib is not consistent with the other two. The co...
Visit asked 18/12, 2014 at 7:29

0

I'm trying to run a logistic regression in statsmodels on a large design matrix (~200 columns). The features include a number of interactions, categorical features and semi-sparse (70%) integer fea...

1

I want to use the statsmodels.regression.linear_model.OLS package to do a prediction, but with a specified constant. Currently, I can specify the presence of a constant with an argument: (from ...
Refinery asked 23/10, 2014 at 18:26

1

Solved

I'm trying to get the HP-filter working using statsmodels (sm). The documentation here implies that the module sm.tsa already exists for 0.6.1, but I get the following error: >>> import...
Lockout asked 5/12, 2014 at 22:29

1

Solved

Does statsmodels.api.tsa.ARIMA(mylist, (p,d,q)).fit().predict(start, end) only work for d=0?... myList is a list of 72 decimals all >0, p=2, d=1, q=1, start=72, end=12 and the majority of the fore...
Algol asked 2/12, 2014 at 20:35

2

I did a simple experiment of a GLM in statsmodels, and was perplexed to find why GLM Results did not contain any R^2 attributes? I feel like there is something very simple here about why GLM does...
Hurd asked 24/10, 2014 at 5:16

1

Solved

I've been trying to get a prediction for future values in a model I've created. I have tried both OLS in pandas and statsmodels. Here is what I have in statsmodels: import statsmodels.api as sm en...
Figone asked 26/8, 2014 at 19:58

1

Solved

I am using scipy.stats.expon.fit(data) to fit an exponential distribution to my data. This appears to return two values where I would expect one. The documentation online doesn't seem to say what f...
Tanagra asked 1/8, 2014 at 16:58

2

Solved

I found this example, which explains how to perform a 2-way ANOVA. I was wondering how to do the same for a repeated-measures design. I did see this question, but I cannot assume independence of m...
Bounder asked 3/4, 2013 at 14:51

1

Solved

The anderson function asks only for one parameter and that should be 1-d array. So I am wondering how to pass two different arrays to be compared in it? Thanks
Veratridine asked 16/7, 2014 at 14:52

1

Solved

I can't find a reason why calculating the correlation between two series A and B using numpy.correlate gives me different results than the ones I obtain using statsmodels.tsa.stattools.ccf Here's ...
Wellesz asked 7/7, 2014 at 17:48

2

Solved

I'm using statsmodels for logistic regression analysis in Python. For example: import statsmodels.api as sm import numpy as np x = arange(0,1,0.01) y = np.random.rand(100) y[y<=x] = 1 y[y!=1] =...
Italianism asked 28/4, 2014 at 11:3

1

Solved

I am trying to fit a Poisson distribution to my data using statsmodels but I am confused by the results that I am getting and how to use the library. My real data will be a series of numbers that ...
Ant asked 27/6, 2014 at 13:6

1

Solved

I'm trying to model my time series data using the AR model. This is the code that I'm using. # Compute AR-model (data is a python list of number) model = AR(data) result = model.fit() plt.pl...
Cusco asked 11/6, 2014 at 20:57

2

Solved

I am running OLS on products by month. While this works fine for a single product, my dataframe contains many products. If I create a groupby object OLS gives an error. linear_regression_df: prod...
Amargo asked 6/6, 2014 at 18:28

© 2022 - 2024 — McMap. All rights reserved.