linearmodels.panel.model.BetweenOLS.fit¶
-
BetweenOLS.fit(*, reweight: bool =
False
, cov_type: str ='unadjusted'
, debiased: bool =True
, **cov_config: bool | float | str | ndarray[Any, dtype[int64]] | DataFrame | PanelData) PanelResults [source]¶ Estimate model parameters
- Parameters:¶
- reweight: bool =
False
¶ 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_type: str =
'unadjusted'
¶ Name of covariance estimator. See Notes.
- debiased: bool =
True
¶ Flag indicating whether to debiased the covariance estimator using a degree of freedom adjustment.
- **cov_config: bool | float | str | ndarray[Any, dtype[int64]] | DataFrame | PanelData¶
Additional covariance-specific options. See Notes.
- reweight: bool =
- Returns:¶
Estimation results
- Return type:¶
Examples
>>> from linearmodels import BetweenOLS >>> mod = BetweenOLS(y, x) >>> res = mod.fit(cov_type='robust')
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.