I'm trying to use Panel OLS from linearmodels, but get a message saying that the endogenous and exogenous variables aren't the same length. According to the code in the PanelOLS function, y.shape[0] != x.shape[0], but when I print both shapes it's the same length.

Both x and y are multiindex df using this format:

mi_data = data.set_index(['fcode', 'year'])

Is there something I'm missing that's particular to Panel OLS?

y variable is UPT, x is treatUberX or treatGTNotStd

Data snapshot---there's also city and state, both strings, that were not able to be captured in the shot:

dataframe screenshot

0

There are 0 best solutions below