linearmodels.panel.data.PanelData.dummies

PanelData.dummies(group: str = 'entity', drop_first: bool = False) → DataFrame[source]

Generate entity or time dummies.

Parameters:
group: str = 'entity'

Type of dummies to generate. The default is “entity”. The names are not case sensitive.

drop_first: bool = False

Flag indicating that the dummy column corresponding to the first entity or time period should be dropped. The default is False.

Returns:

Dummy variables.

Return type:

pandas.DataFrame

Raises:

ValueError – If group is not one of the supported values, or if the level of the index that is used has a missing label.