import pyfixest as pf
fit = pf.feols("Y ~ X1 | f1", pf.get_data(), vcov={"CRV1": "f1+f2"})
fit.variance_covariance.specVcovSpec(vcov_type='CRV', vcov_type_detail='CRV1', clustervar=('f1', 'f2'), lag=None, time_id=None, panel_id=None)
The requested covariance estimator, parsed from the vcov argument.
| Name | Type | Description | Default |
|---|---|---|---|
| vcov_type | str | Estimator family: "iid", "hetero", "HAC", "CRV", or "nid". |
required |
| vcov_type_detail | str | Requested estimator, for example "HC1", "NW", or "CRV1". |
required |
| clustervar | tuple[str, …] | Cluster variables; empty unless clustered. | () |
| lag | int or None | Newey-West or Driscoll-Kraay lag; None unless HAC. |
None |
| time_id | str or None | Time variable of HAC inference; None unless HAC. |
None |
| panel_id | str or None | Panel variable of HAC inference; None unless HAC. |
None |
| Name | Description |
|---|---|
| VcovSpec.is_clustered | Whether the estimator clusters on at least one variable. |
| Name | Description |
|---|---|
| VcovSpec.from_user_input | Parse and validate the vcov and vcov_kwargs arguments. |
Parse and validate the vcov and vcov_kwargs arguments.
The check is syntactic, so the estimation functions run it before fitting and vcov() runs it on each call. Whether a fitted model supports the parsed estimator is checked by the model.
Raises TypeError for input of the wrong type and ValueError for unknown or incomplete values. vcov_kwargs is only accepted with vcov="NW" or vcov="DK"; other estimators reject it.