linearmodels.panel.model.BetweenOLS.reformat_clusters

BetweenOLS.reformat_clusters(self, clusters: Union[linearmodels.panel.data.PanelData, numpy.ndarray, xarray.core.dataarray.DataArray, pandas.core.frame.DataFrame, pandas.core.series.Series]) → linearmodels.panel.data.PanelData

Reformat cluster variables

Parameters
clustersarray_like

Values to use for variance clustering

Returns
PanelData

Original data with matching axis and observation dropped where missing in the model data.

Notes

This is exposed for testing and is not normally needed for estimation

Return type

PanelData