Compute covariance matrices for an estimated regression model.
Parameters
Name
Type
Description
Default
vcov
Union[str, dict[str, str]]
A string or dictionary specifying the type of variance-covariance matrix to use for inference. If a string, it can be one of “iid”, “hetero”, “HC1”, “HC2”, “HC3”, “NW”, “DK”. If a dictionary, it should have the format {“CRV1”: “clustervar”} for CRV1 inference or {“CRV3”: “clustervar”} for CRV3 inference. Note that CRV3 inference is currently not supported for IV estimation.
required
vcov_kwargs
Optional[dict[str, any]]
Additional keyword arguments for the variance-covariance matrix.
None
data
DataFrameType | None
The data used for estimation. If None, tries to fetch the data from the model object. Defaults to None.
None
Returns
Name
Type
Description
Feols
An instance of class Feols with updated inference.
Examples
Updates the variance estimator of a fitted model without refitting it. The model is modified in place and returned.