I have a dataframe shown below on which I would like to calculate the first difference estimator between different columns. I found this package, but an unsure of how to implement it...also, are co-variates allowed? I am new to both python and statistics so any help would be appreciated!
Package I found: https://bashtage.github.io/linearmodels/doc/panel/models.html#linearmodels.panel.model.FirstDifferenceOLS
How to format data: https://bashtage.github.io/linearmodels/doc/panel/examples/data-formats.html
My Data (now multiindexed):
vix eff bloom
time VIX_close FEDFUNDS time time
2017-06-16 10.380000 3.020000 1993-01-01 1993-01-01
2017-06-15 10.640000 3.025000 1993-02-01 1993-01-02
My attempt:
mod = FirstDifferenceOLS(master.FEDFUNDS, master.Kincaid)
res = mod.fit(cov_type='robust')
Which results in:
ValueError: Series can only be used with a 2-level MultiIndex