Description
leverage = sum over i,j of designRow[i]*inverseGram[i][j]*designRow[j].
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.
leverage = sum over i,j of designRow[i]*inverseGram[i][j]*designRow[j].
When to use this tool
Use Regression Design Row Leverage Term when checking one supplied design or covariance contribution.
How to use the tool and how it works
- Enter designRow, inverseGram. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read leverage. Use the output convention below.
Require inverseGram to be a square matrix matching designRow length. leverage = sum over i,j of designRow[i]*inverseGram[i][j]*designRow[j].1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| designRow | Design Row | Required. Array of finite number; maximum items 256. |
| inverseGram | Caller-supplied square matrix intended as inverse X-transpose-X; its identity and definiteness are not verified. | Required. Array of array of finite number; maximum items 128; maximum items 128. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| leverage | Leverage | Required. Finite number. |
{
"input": {
"designRow": [
1,
2
],
"inverseGram": [
[
0.2,
0
],
[
0,
0.05
]
]
},
"output": {
"leverage": 0.4
}
} Limitations and assumptions
- The matrix is supplied and not checked for symmetry, positive definiteness or being an actual inverse. Values are not constrained to [0,1]; no regression or diagnostic judgment is performed.
- 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.
- Panel Cluster Degrees Freedom Factor
factor = clusters/(clusters-1)*(observations-1)/(observations-parameters).