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 want to run a regression of UnempRate on Wage controlling for State and Year fixed effects.
I can do this with creation of dummies for states and year and then:
ols(y=df['UnempRate'],x=df[FullDummyList])
Is there an easier way to do this? I was trying to use the PanelOLS method mentioned here: Fixed effect in Pandas or Statsmodels
But I can't seem to get the syntax right, or find more documentation on it.
Thanks!