Pandas Multi-Index - Can't Convert Non-uniquely Indexed DataFrame To Panel
Given a time series data, I'm trying to use panel OLS with fixed effects in Python. I found this way to do it: Fixed effect in Pandas or Statsmodels My input data looks like this (
Solution 1:
Using the provided pickle file, I ran the regression and it worked fine.
-------------------------Summary of Regression Analysis-------------------------
Formula: Y ~ <x>
Number of Observations: 2763
Number of Degrees of Freedom: 4
R-squared: 0.0268
Adj R-squared: 0.0257
Rmse: 16.4732
F-stat (1, 2759): 25.3204, p-value: 0.0000
Degrees of Freedom: model 3, resid 2759
-----------------------Summary of Estimated Coefficients------------------------
Variable Coef Std Err t-stat p-value CI 2.5% CI 97.5%
--------------------------------------------------------------------------------
x 0.1666 0.0191 8.72 0.0000 0.1292 0.2041
---------------------------------End of Summary---------------------------------
I ran this in Jupyter Notebook
Post a Comment for "Pandas Multi-Index - Can't Convert Non-uniquely Indexed DataFrame To Panel"