linearmodels.panel.model.BetweenOLS.fit

BetweenOLS.fit(*, reweight=False, cov_type='unadjusted', debiased=True, **cov_config)[source]

Estimate model parameters

Parameters:
reweightbool

Flag indicating to reweight observations if the input data is unbalanced using a WLS estimator. If weights are provided, these are accounted for when reweighting. Has no effect on balanced data.

cov_typestr

Name of covariance estimator. See Notes.

debiasedbool

Flag indicating whether to debiased the covariance estimator using a degree of freedom adjustment.

**cov_config

Additional covariance-specific options. See Notes.

Returns:
PanelResults

Estimation results

Notes

Three covariance estimators are supported:

  • “unadjusted”, “homoskedastic” - Assume residual are homoskedastic

  • “robust”, “heteroskedastic” - Control for heteroskedasticity using White’s estimator

  • “clustered` - One- or two-way clustering. Configuration options are:

    • clusters - Input containing 1 or 2 variables. Clusters should be integer values, although other types will be coerced to integer values by treating as categorical variables

When using a clustered covariance estimator, all cluster ids must be identical within an entity.

Examples

>>> from linearmodels import BetweenOLS
>>> mod = BetweenOLS(y, x)
>>> res = mod.fit(cov_type='robust')
Return type:

PanelResults