# linearmodels.panel.model.FamaMacBeth¶

class FamaMacBeth(dependent, exog, *, weights=None)[source]

Pooled coefficient estimator for panel data

Parameters
dependentarray_like

Dependent (left-hand-side) variable (time by entity)

exogarray_like

Exogenous or right-hand-side variables (variable by time by entity).

weightsarray_like, optional

Weights to use in estimation. Assumes residual variance is proportional to inverse of weight to that the residual time the weight should be homoskedastic.

Notes

The model is given by

$y_{it}=\beta^{\prime}x_{it}+\epsilon_{it}$

The Fama-MacBeth estimator is computed by performing T regressions, one for each time period using all available entity observations. Denote the estimate of the model parameters as $$\hat{\beta}_t$$. The reported estimator is then

$\hat{\beta} = T^{-1}\sum_{t=1}^T \hat{\beta}_t$

While the model does not explicitly include time-effects, the implementation based on regressing all observation in a single time period is “as-if” time effects are included.

Parameter inference is made using the set of T parameter estimates with either the standard covariance estimator or a kernel-based covariance, depending on cov_type.

Methods

 fit(self, cov_type, debiased, bandwidth, …) Estimate model parameters from_formula(formula, data, numpy.ndarray, …) Create a model from a formula predict(self, params, …) Predict values for additional data reformat_clusters(self, clusters, …) Reformat cluster variables

Properties

 formula Formula used to construct the model has_constant Flag indicating the model a constant or implicit constant not_null Locations of non-missing observations