liveBook · Manning

Kernel function

As explained in Causal Inference for Data Science

A kernel is a weighting function that assigns observation weights according to distance from a target point.

A kernel is a weighting function that gives observations near a target point t0 more influence than observations farther away. In regression discontinuity designs, it weights residuals during minimization so nearby points drive the local estimate. section 11.2.5

Two standard kernel choices are:

  • Uniform: assigns weight 1 when |t − t0| < h and 0 otherwise. section 11.2.5
  • Triangular: assigns weight 1 − |t − t0|/h within the window and 0 outside it. section 11.2.5

The bandwidth h centers and rescales the kernel. It determines which observations enter the regression: points farther than h from t0 receive zero weight. Cross-validation can compare bandwidths, while rdplot and rdrobust provide default selection methods. section 11.2.5

Local effect near a cutoff

To estimate an effect at time t0, give observations immediately before and after t0 greater influence, then fit the local regression using the selected bandwidth. section 11.2.5

figure

Compare the supplied uniform and triangular kernel figures to see how distance and bandwidth shape observation weights. section 11.2.5

How Causal Inference for Data Science covers it

How deep it goes
Defines two kernels, shows bandwidth transformation, and defers elaborate bandwidth selection to package documentation.
Examples
Uses uniform and triangular functions, kernel figures, and local estimation around a time cutoff.
What it assumes
Assumes a regression discontinuity setting with a target point, time distances, residual minimization, and local regression.
What you can do after
Evaluate how kernel choice and bandwidth control which observations influence a local regression estimate.
How it connects
Connects kernels to regression discontinuity, local polynomial regression, residuals, bandwidth, and treatment-effect estimation.

Also explained in

Compare how 4 books explain kernel function →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.