Skip to content

Main content

Residual Score Moment Term Tool

Calculate residual score moment term from explicit caller-supplied inputs.

Loading tool…

Description

Summarize one weighted residual-score moment and its denominator-aware mean.

Instrumental-variable and moment calculations compare supplied regressors, instruments, residuals and first-stage quantities. A local moment or relevance statistic does not establish exclusion, exogeneity, identification or a complete estimator.

Summarize one weighted residual-score moment and its denominator-aware mean.

When to use this tool

Use Residual Score Moment Term when checking one supplied first-stage or moment contribution.

How to use the tool and how it works

  1. Enter residuals, scoreComponents, weights. 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 weightedMoment, totalWeight, meanMoment, defined. Inspect defined before interpreting the associated values.

Require equally long residuals, scoreComponents and nonnegative weights. weightedMoment = sum(residual*scoreComponent*weight); totalWeight is the weight sum; meanMoment is their ratio when positive, otherwise zero with defined = false.1

Input fieldMeaning and unitsAccepted input
residualsResidualsRequired. Array of finite number; maximum items 256.
scoreComponentsScore ComponentsRequired. Array of finite number; maximum items 256.
weightsPosition-aligned nonnegative weights under the specified model convention.Required. Array of finite number; minimum 0; maximum items 256.
Output fieldInterpretationReturned shape
weightedMomentWeighted MomentRequired. Finite number.
totalWeightTotal WeightRequired. Finite number.
meanMomentMean MomentRequired. Finite number.
definedWhether the stated denominator has positive support; read this before interpreting a zero placeholder.Required. Boolean.
json
{
  "input": {
    "residuals": [
      1,
      -1
    ],
    "scoreComponents": [
      2,
      3
    ],
    "weights": [
      1,
      2
    ]
  },
  "output": {
    "weightedMoment": -4,
    "totalWeight": 3,
    "meanMoment": -1.3333333333333333,
    "defined": true
  }
}

Limitations and assumptions

  • This returns one weighted sample moment, not an estimator, robust covariance or test of exogeneity. Empty or zero weights make the mean undefined.
  • 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

Fit an appropriate full model and examine identifying assumptions and diagnostics before interpreting an IV result.

References

  1. Calculation and input contract: econometrics/residual-score-moment-term — tool.io

Similar or alternative tools