I'm running a PanelOLS
from the linearmodels package.
As must very often be the case, some observations are missing. When I run the equivalent command in R
(I think the equivalent command is plm
) I get the following:
Unbalanced Panel: n=11, T=17-61, N=531
So the panel is unbalanced: some of the individuals only have complete data for 17 time periods and others for many more. But the regression runs nevertheless.
The equivalent python command is:
import linearmodels.panel as pnl
model = pnl.PanelOLS.from_formula(formula, data=src)
Which gets me a warning:
Inputs contain missing values. Dropping rows with missing observations.
and also an error:
MyPythonInstallation\lib\site-packages\linearmodels\panel\model.py in _validate_data(self)
207
208 if matrix_rank(x) < x.shape[1]:
--> 209 raise ValueError('exog does not have full column rank.')
210 self._constant, self._constant_index = has_constant(x)
211
ValueError: exog does not have full column rank.
How can I proceed with my regression?