Description
Return one weighted residual-score outer product for a sandwich covariance middle-matrix contribution.
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.
Return one weighted residual-score outer product for a sandwich covariance middle-matrix contribution.
When to use this tool
Use Heteroskedastic Sandwich One Outer Product when checking one supplied design or covariance contribution.
How to use the tool and how it works
- Enter regressors, residual, weight. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read meat. Use the output convention below.
Require one to 128 regressors and nonnegative weight. meat[i][j] = weight²*residual²*regressors[i]*regressors[j].1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| regressors | Regressors | Required. Array of finite number; maximum items 256. |
| residual | Residual | Required. Finite number. |
| weight | Weight | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| meat | Single weighted score outer-product matrix, not the full sandwich covariance. | Required. Array of array of finite number; maximum items 128; maximum items 128. |
{
"input": {
"regressors": [
1,
2
],
"residual": 3,
"weight": 1
},
"output": {
"meat": [
[
9,
18
],
[
18,
36
]
]
}
} Limitations and assumptions
- This is one weighted score outer-product contribution to a sandwich middle matrix. It omits aggregation, inverse-design bread matrices, finite-sample adjustment and a complete covariance estimate.
- 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
- Instrument First Stage Residual Share
residualShare = residualSumSquares/totalSumSquares; explainedShare = 1-residualShare.
- Hac One Lag Covariance Weight
bartlettWeight = 1-lag/(bandwidth+1) for lag <= bandwidth, otherwise zero; contribution = bartlettWeight*covariance.