Skip to content

Main content

Regression Design Row Leverage Term Tool

Compute supplied xᵀ(XᵀX)⁻¹x; the caller supplies a valid inverse Gram matrix and model row.

Loading tool…

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

  1. Enter designRow, inverseGram. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
designRowDesign RowRequired. Array of finite number; maximum items 256.
inverseGramCaller-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 fieldInterpretationReturned shape
leverageLeverageRequired. Finite number.
json
{
  "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

  1. Calculation and input contract: econometrics/regression-design-row-leverage-term — tool.io

Similar or alternative tools