Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

name: op-attr-reg-influence
description: Per-row Cook's distance or DFFITS from an unpenalized OLS refit or a bound fit's design — influence diagnostic.
kind: operator
category: ATTR
operator: ATTR_REG_INFLUENCE
type: reference
applies_to: process, compose, predict
examples_tags: [regression, ols, outlier-detection, buffered-pipeline]

Use when

Adds to every row how much it moves a straight-line fit: how far the fitted values would shift if that one row were left out.

Questions it answers:

  • Which rows would change the model’s answer if they were dropped?
  • Is the fitted trend carried by a handful of unusual accounts?

Use something else:

  • ATTR_REG_LEVERAGE when you want how unusual each row’s predictor values are, whatever its target.

Params

Refit keys are top-level, not params; field unread.

NameTypeDefaultDescription
targetfield(required)Dependent field; absent with fit.
predictorslist(required)Independent fields; absent with fit.
fitstring—params.fit: a bound fit’s figure.
measureenumcookscooks (R cooks.distance) or dffits (R dffits).
carryoverbooltrueCarry adstock (regression-order).
orderobject—{field, partition?}; needed to carry.
weightslot weightinheritednull opts out; frequency only.

Inputs

target / predictors: see ## Contract (decimal128 as its float64 echo, packed_bool 0/1).

  • label — default <TYPE>_<target>, with fit <TYPE>_<fit>

Output

One float64 per record; h leverage, p′ = p + 1, r / t standardized / studentized residual:

  • cooks — r²·h / (p′·(1 − h)), ≥ 0.
  • dffits — t·√(h / (1 − h)).

With fit dffits is signed by g′(μ): negative for a positive residual under a gamma inverse link. Null (never 0) on a null / NaN / ±Inf input, a row the weighted refit excludes, or undefined (df ≤ 1, h ≥ 1).

Reading the output

  • value: How much the row moves the fitted line. With measure cooks (the default): Cook’s distance, the shift of every fitted value when the row is left out, scaled by p times the model’s residual variance, where p counts the coefficients including the intercept; it is never negative and grows with both the row’s residual and its leverage. With measure dffits: the shift of the row’s own fitted value when it is left out, in standard errors of that fit, signed like the residual.

Contract

  • Types (target, predictor): date, datetime, decimal128, f32, f64, packed_bool, u16, u32, u4, u64, u8; any other scalar type is PULSE_FIELD_TYPE_UNSUPPORTED.
  • Weight: weighted under frequency weights only; a probability weight is PULSE_WEIGHT_UNSUPPORTED (an influence measure or studentized residual is one observation’s figure (a frequency weight is w identical observations), and a sampling weight defines no observation to delete).
  • Streaming: streamable.

Gotchas

  • Refit: unpenalized OLS (penalty, a bad measure: PROCESSING_CONFIG); two-pass.
  • fit: qualifying fits, refusals: regression-influence.
  • Frequency weight (refit or fit): one copy’s figure, df = Σw − p′; probability refused.
  • Pearson-based, as R. Screens D > 1, 4/n, |DFFITS| > 2√(p′/n).

See