linearmodels.panel.covariance.FamaMacBethCovariance

class linearmodels.panel.covariance.FamaMacBethCovariance(y: ndarray, x: ndarray, params: ndarray, all_params: DataFrame, *, debiased: bool = False, bandwidth: float | None = None, kernel: str | None = None)[source]

HAC estimator for Fama-MacBeth estimator

Parameters:
y: ndarray

(entity x time) by 1 stacked array of dependent

x: ndarray

(entity x time) by variables stacked array of exogenous

params: ndarray

(variables by 1) array of estimated model parameters

all_params: DataFrame

(nobs by variables) array of all estimated model parameters

debiased: bool = False

Flag indicating whether to debias the estimator.

bandwidth: float | None = None

Non-negative integer to use as bandwidth. Set to 0 to disable autocorrelation robustness. If not provided a rule-of- thumb value is used.

kernel: str | None = None

Name of one of the supported kernels. If None, uses the Newey-West kernel.

Notes

Covariance is a Kernel covariance of all estimated parameters.

Methods

deferred_cov()

Covariance calculation deferred until executed

Properties

ALLOWED_KWARGS

DEFAULT_KERNEL

all_params

The set of parameters estimated for each of the time periods

bandwidth

Estimator bandwidth

cov

Estimated covariance

eps

Model residuals

name

Covariance estimator name

s2

Error variance