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
- Enter residuals, scoreComponents, weights. 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 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 field | Meaning and units | Accepted input |
|---|---|---|
| residuals | Residuals | Required. Array of finite number; maximum items 256. |
| scoreComponents | Score Components | Required. Array of finite number; maximum items 256. |
| weights | Position-aligned nonnegative weights under the specified model convention. | Required. Array of finite number; minimum 0; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| weightedMoment | Weighted Moment | Required. Finite number. |
| totalWeight | Total Weight | Required. Finite number. |
| meanMoment | Mean Moment | Required. Finite number. |
| defined | Whether the stated denominator has positive support; read this before interpreting a zero placeholder. | Required. Boolean. |
{
"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
Similar or alternative tools
- Instrument Moment Centering Residual
uncenteredMoment = instrument*residual; centeredMoment = (instrument-instrumentMean)*residual.
- OLS One Observation Score Term
score = weight*regressor*residual; squaredResidualContribution = weight*residual².