linearmodels.panel.data.PanelData.general_demean

PanelData.general_demean(groups, weights=None)[source]

Multi-way demeaning using only groupby

Parameters
groupsPanelData

Arrays with the same size containing group identifiers

weightsPanelData

Weights to use in the weighted demeaning

Returns
PanelData

Weighted, demeaned data according to groups

Notes

Iterates until convergence

Return type

PanelData