linearmodels.panel.data.PanelData.mean

PanelData.mean(group='entity', weights=None)[source]

Compute data mean by either entity or time group

Parameters
group{“entity”, “time”}

Group to use in demeaning

weightsPanelData

Weights to implement weighted averaging

Returns
DataFrame

Data mean according to type. Either (entity by var) or (time by var)

Return type

DataFrame