Description
bartlettWeight = 1-lag/(bandwidth+1) for lag <= bandwidth, otherwise zero; contribution = bartlettWeight*covariance.
Regression diagnostics and robust covariance calculations combine design information, residual terms and estimator-specific normalization. One leverage quadratic form, outer product or correction factor is only part of the full procedure.
bartlettWeight = 1-lag/(bandwidth+1) for lag <= bandwidth, otherwise zero; contribution = bartlettWeight*covariance.
When to use this tool
Use Hac One Lag Covariance Weight when checking one supplied design or covariance contribution.
How to use the tool and how it works
- Enter lag, bandwidth, covariance. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read bartlettWeight, contribution. Use the output convention below.
Require nonnegative whole lag and bandwidth. bartlettWeight = 1-lag/(bandwidth+1) for lag <= bandwidth, otherwise zero; contribution = bartlettWeight*covariance.1
HAC covariance estimation can use Bartlett lag weights. A weighted lag contribution alone is not the complete covariance estimator.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| lag | Lag | Required. Safe integer; minimum 0. |
| bandwidth | Bandwidth | Required. Safe integer; minimum 0. |
| covariance | Covariance | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| bartlettWeight | Bartlett Weight | Required. Finite number. |
| contribution | This operation’s local contribution, to be combined only under the same larger-model convention. | Required. Finite number. |
{
"input": {
"lag": 2,
"bandwidth": 3,
"covariance": 8
},
"output": {
"bartlettWeight": 0.5,
"contribution": 4
}
} Limitations and assumptions
- This is one supplied lag covariance term. A complete HAC estimator needs appropriate covariance normalization, both lag directions and an estimator-specific specification.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a complete estimator with matching weighting, clustering, degrees-of-freedom and normalization conventions for inference.
References
Similar or alternative tools
- Heteroskedastic Sandwich One Outer Product
Return one weighted residual-score outer product for a sandwich covariance middle-matrix contribution.
- Instrument First Stage Residual Share
residualShare = residualSumSquares/totalSumSquares; explainedShare = 1-residualShare.