Source-linked AI summary

Simple Local Polynomial Density Estimators

Matias D. Cattaneo, Michael Jansson, Xinwei Ma

arXiv:1811.11512v2econ.EMstat.ME

TL;DR

The paper tackles boundary-related shortcomings in nonparametric density estimation and introduces a local-polynomial estimator designed to operate automatically across interior and boundary points. It derives asymptotic and inferential tools, develops a discontinuity-in-density test, and illustrates the approach with Head Start data while providing Stata and R software.

  • Problem

    Nonparametric density estimation is complicated near support boundaries because standard kernels are invalid there and alternatives often require transformations, boundary knowledge, or extra tuning parameters.

  • Method

    The paper smooths the empirical distribution function with local polynomial techniques and develops asymptotic inference, standard-error, and bandwidth-selection procedures.

  • Results

    The resulting estimator is boundary adaptive and automatic, and its methods support a discontinuity-in-density test illustrated with canonical Head Start data.

  • Takeaways & Limitations

    The approach provides a general density-estimation method usable at interior and boundary points and a one-tuning-parameter procedure for discontinuity-in-density testing.

  • Takeaways & Limitations

    The technical results assume kernel functions with bounded support, although unbounded-support kernels could be handled with more cumbersome notation.

Abstract

from arXiv · show

This paper introduces an intuitive and easy-to-implement nonparametric density estimator based on local polynomial techniques. The estimator is fully boundary adaptive and automatic, but does not require pre-binning or any other transformation of the data. We study the main asymptotic properties of the estimator, and use these results to provide principled estimation, inference, and bandwidth selection methods. As a substantive application of our results, we develop a novel discontinuity in density testing procedure, an important problem in regression discontinuity designs and other program evaluation settings. An illustrative empirical application is given. Two companion Stata and R software packages are provided.

1 Introduction

The paper addresses boundary problems in nonparametric density estimation by introducing a local-polynomial estimator that is automatic, boundary adaptive, and avoids pre-binning. It develops inference and bandwidth-selection results and applies the estimator to discontinuity-in-density testing.

  • Motivation: Standard kernel density estimators are invalid at or near support boundaries, while alternatives often require boundary information, transformations, or extra tuning parameters.
  • Estimator: The estimator requires no pre-binning or data modification, automatically adapts to support boundaries, and uses only the local-polynomial bandwidth as a tuning parameter.
  • Estimator: The proposed estimator smooths the empirical distribution function using local polynomial techniques rather than smoothing a histogram-type density estimator.
  • Theory and inference: The paper provides asymptotic bias and variance expansions, Gaussian approximations, valid inference, consistent standard errors, and data-driven bandwidth selection.
  • Application: The new discontinuity-in-density test for regression discontinuity designs requires one tuning parameter, unlike the earlier implementation requiring pre-binning and two tuning parameters.
  • Application and software: The paper illustrates the method with the canonical Head Start data and provides general-purpose Stata and R software packages.

2 Boundary Adaptive Density Estimation

The paper constructs a local polynomial density estimator by smoothing the empirical distribution function and extracting its slope, allowing direct estimation at interior and boundary points. Unlike conventional kernel estimation, it automatically changes from symmetric to asymmetric or one-sided smoothing near boundaries.

  • Estimator construction: The estimator smooths the empirical distribution function with a local polynomial and uses the slope coefficient as the density estimate.The polynomial order, kernel, bandwidth, and localization determine the local fit.
  • Comparison with kernels: The conventional kernel density estimator is valid for interior points but inconsistent at boundary points, where it exhibits boundary bias.The proposed estimator is designed to remain valid without switching estimators across locations.
  • Boundary adaptation: The estimator applies directly across the support, including bounded or unbounded supports, without requiring boundary modifications.The paper emphasizes validity for all evaluation points and practical use in empirical applications.
  • Illustration: Figure 1 uses n = 500 observations, quadratic local fits, and point-specific bandwidths to visualize the estimator and its localization regions.Only observations inside each bandwidth-controlled region contribute to the local smoothing.
  • Boundary adaptation: At interior points, the local approximation uses symmetric smoothing, whereas near or at boundaries it uses asymmetric or one-sided smoothing.Figure 1 illustrates this behavior at a near-lower-boundary point, an interior point, and the upper boundary.

3 Main Technical Results

The paper establishes asymptotic distributional results for the estimator and develops automatic, boundary-adaptive variance and bandwidth procedures. These results support pointwise inference without prior knowledge of the support’s shape, under stated smoothness and kernel conditions.

  • Inference: The variance estimator is consistent and does not require knowing the evaluation point’s relative position to the support boundaries.It is therefore data-driven and fully automatic.
  • Bandwidth selection: The proposed procedures apply without prior knowledge of the shape of the support, and an approximate MSE-optimal bandwidth can be implemented using preliminary consistent estimators.The paper also develops the selector’s consistency and optimality properties.
  • Asymptotic theory: The main theory characterizes the estimator’s asymptotic bias and variance and provides a valid distributional approximation.The theorem gives precise leading bias and variance characterizations under regularity conditions.
  • Boundary adaptation: The estimator’s asymptotic results remain boundary adaptive because the integration region captures whether the kernel is truncated near the support boundary.Interior points yield symmetric local approximations, while boundary points yield asymmetric or one-sided approximations.
  • Implementation and scope: The recommended implementation uses p = 2 because higher-order local polynomials can behave erratically near boundaries and produce counter-intuitive weights.Automatic polynomial-order selection methods are also applicable.

4 Application to Manipulation Testing

The paper uses the boundary-adaptive estimator to test whether a density is continuous at a cutoff, treating the two sides as separate boundary estimation problems. The procedure avoids pre-binning, uses one tuning parameter, and supports automatic bandwidth selection and robust bias-corrected inference.

  • Procedure: The method requires only one tuning parameter and avoids pre-binning, while allowing standard weighting schemes such as uniform or triangular kernels.This removes the need to choose bin lengths and positions or use more complicated boundary kernels.
  • Inference and bandwidth: The test is fully data-driven and includes formally developed bandwidth selection, valid inference, and robust bias correction.The implementation uses a data-driven bandwidth for the density difference and a bias-corrected statistic for inference.
  • Testing setup: The manipulation test estimates the density separately below and above the cutoff and tests whether the two boundary values are continuous.The cutoff creates a nonparametric boundary point because two densities must be estimated.
  • Theory: Under the stated regularity conditions and bandwidth restrictions, the finite-sample statistic admits a standard-normal approximation supporting an asymptotically valid and consistent α-level test.The rejection rule compares the absolute statistic with Φ1−α/2.
  • Implementation: The recommended implementation is T3(h2), which selects bandwidths for a local quadratic fit and conducts inference using a cubic approximation.The same framework permits either common or distinct bandwidths on the two sides.

5 Empirical Illustration

The empirical illustration applies the manipulation test to Head Start eligibility data and finds no evidence of density manipulation at the cutoff. The finding is robust across bandwidth and polynomial-order specifications, while the paper reports power-related advantages over pre-binned testing.

  • Application setting: The application studies the Head Start poverty-index cutoff that determined eligibility for grant-writing assistance to the 300 poorest counties.The cutoff is x̄ = 59.1984, based on the poverty index used for program eligibility.
  • Empirical design: The analysis plots histograms, local polynomial density estimates, and robust bias-corrected confidence intervals near the cutoff.The illustration uses p = 2 and an MSE-optimal data-driven bandwidth.
  • Findings: The empirical results show no evidence of manipulation at the Head Start cutoff.This finding is consistent with the institutional history of the poverty index, which was constructed federally from 1960 Census information.
  • Robustness: The no-manipulation finding is robust to different bandwidth and local polynomial-order specifications.The paper reports this robustness across the empirical implementations considered.
  • Comparison: The original McCrary test has a much smaller effective sample size because it pre-bins the data, which can substantially reduce test power.The proposed method’s avoidance of pre-binning is connected directly to this power comparison.

6 Conclusion

The paper introduces a boundary-adaptive local polynomial density estimator requiring one tuning parameter and no boundary-specific data transformations. It develops its asymptotic theory and applies it to discontinuity-in-density testing.

  • The estimator uses local polynomial methods, requires one tuning parameter, and avoids boundary-specific transformations such as pre-binning.
  • The paper studies the estimator’s main asymptotic properties.
  • The results support a new manipulation test based on discontinuity in density testing.
  • Extensions and generalizations of the results remain ongoing work.
  • Two general-purpose software packages are available in Stata and R.

Supplemental Appendix

The Supplemental Appendix presents general theoretical results and proofs that encompass the main paper’s results, adds methodological and technical material, and reports simulation evidence.

  • The paper is authored by Matias D. Cattaneo, Michael Jansson, and Xinwei Ma.
  • The appendix contains general theoretical results and proofs encompassing those discussed in the main paper.
  • It also discusses additional methodological and technical results.
  • Simulation evidence is reported in the appendix.

1 Setup

The setup defines the empirical and local-polynomial distribution estimators, their notation, and the boundary framework used for subsequent analysis. The section also previews distinct asymptotic behavior for distribution and derivative estimates.

  • Setup and notation: The sample is drawn from a distribution F supported on X = [xL, xU], with finite endpoints assumed for boundary analysis.
  • Setup and notation: The empirical distribution function is defined and denoted by ˜F in the Supplemental Appendix.
  • Local polynomial estimator: The local polynomial distribution estimator uses a polynomial expansion, kernel function, and bandwidth sequence h.
  • Local polynomial estimator: The estimator targets scaled derivatives of the distribution function, including the density f = F (1).
  • Asymptotic preview: For v = 0, the estimator is a smoothed EDF for F(x), whose properties differ from estimated derivatives.
  • Asymptotic preview: Near boundary points, the CDF estimator can be super-consistent because its variance vanishes as F(x) approaches 0 or 1.

2 Large Sample Properties

The paper derives large-sample bias, variance, and normality results for local polynomial density and derivative estimators, explicitly accommodating interior and boundary evaluation points. It also provides automatic boundary-adaptive variance estimation.

  • Bias and variance: The smoothing bias has a leading term and, with additional smoothness, a second-order term of order h^(p+2) used for bandwidth selection.
  • Bias and variance: The influence-function component determines asymptotic variance when the second-order U-statistic component is negligible and is asymptotically normal with correct scaling.
  • Boundary behavior: At boundary points, the CDF estimator is super-consistent, causing its leading 1/√n variance to vanish and higher-order residual noise to dominate.
  • Boundary behavior: The second-order U-statistic variance has order O(n^-2) in the boundary region.
  • Main asymptotic results: Under regularity conditions, the estimator has an MSE expansion and is asymptotically normal with suitable scaling.
  • Inference: The proposed variance estimator is consistent and requires no knowledge of the boundary location.

3 Bandwidth Selection

The paper develops MSE-optimal bandwidth selection for local polynomial density estimators and their derivatives, accounting for bias, variance, boundaries, and interior higher-order cancellations. CDF bandwidth selection requires special treatment because its variance structure can eliminate the usual bias–variance trade-off.

  • Scope: Bandwidth selection targets density functions or derivatives, with CDF bandwidth choice treated separately because the CDF is estimated at the parametric rate.The section focuses on v ≥ 1 and notes that CDF bandwidth selection presents additional difficulty.
  • Bandwidth consistency: The proposed estimated bandwidth is rate-consistent under stated regularity conditions, and it is ratio-consistent when the relevant derivative estimates and variance conditions hold.The theorem distinguishes boundary or odd-order cases from interior even-order cases, which require different derivative conditions.
  • Bias: At boundary evaluation points, the leading bias never vanishes, whereas at interior points it can vanish when p − v is even.The interior cancellation motivates higher-order bias characterization and different bandwidth conditions.
  • CDF estimation: For CDF estimation at interior points, a higher-order quadratic variance term creates the bias–variance trade-off needed for a well-defined MSE-optimal bandwidth.At boundary points, the MSE-optimal bandwidth is not well-defined; empirical MSE minimization remains feasible but depends on the preliminary bandwidth.
  • CDF estimation: The boundary CDF bandwidth obtained by empirical MSE minimization is useful in practice but is not consistent for a well-defined target and depends on the preliminary bandwidth.The paper explains that the preliminary bandwidth determines how quickly the estimated variance vanishes at the boundary.

4 Application to Manipulation Testing

The paper applies local polynomial density estimation to testing for a discontinuity at a known cutoff. It derives asymptotic results for joint and separate estimation, including a manipulation test based on the difference between the two one-sided densities.

  • Setup: The manipulation-testing problem permits different smoothness behavior across the cutoff, so densities and derivatives are estimated separately on the two support partitions.The paper also introduces a joint estimation framework as an alternative implementation.
  • Estimation: The unrestricted model uses a polynomial basis that allows the density and its derivatives to differ across the cutoff.Separate estimation instead applies the local polynomial estimator to the empirical distributions from observations below and above the cutoff.
  • Asymptotic results: The asymptotic variance of the density difference has an additive form because the two one-sided density estimates use distinct, asymptotically independent subsamples.This structure supports variance estimation for the discontinuity statistic.
  • Testing: Under the stated regularity and bandwidth conditions, the manipulation test is derived for the null of continuity against the alternative f(x̄+) ≠ f(x̄−).The result uses local polynomial estimates and their associated variance matrices at the cutoff.
  • Restricted models: Restricted models impose continuity of higher derivatives while allowing a discontinuity in the density, and the framework can be modified through the polynomial basis.The paper also discusses improving test power under additional smoothness assumptions on the CDF.

5 Other Standard Error Estimators

The paper presents alternative standard-error estimators for the local polynomial density estimator, including plug-in, jackknife-based, and U-statistic-motivated constructions. The main standard error is automatic and adapts to both interior and boundary regions.

  • Automatic standard error: The primary standard error estimator is fully automatic and adapts to both interior and boundary evaluation regions.The paper then considers two alternative constructions with different motivations.
  • Plug-in estimator: Plug-in standard errors estimate the asymptotic variance by substituting a consistent estimator of the density into the variance expression.The matrices involved depend on the kernel, evaluation point, and bandwidth rather than the data-generating process, so they can be computed analytically or numerically.
  • Jackknife estimator: The jackknife-based standard error uses leave-one-out estimators for the first-order component of the underlying U-statistic.Under the same conditions as the main variance result, its standard-error consistency is established.
  • U-statistic estimator: A further standard error follows from the Hoeffding decomposition, retaining the leading linear component while treating the higher-order remainder as negligible.The local polynomial estimator is represented as a second-order U-statistic, whose linear term determines the leading variance.

6 Simulation Study

The simulation study evaluates density estimation across distributions, evaluation points, polynomial orders, kernels, bandwidths, and sample sizes. It measures bias, dispersion, root-MSE, standard-error calibration, and normal-approximation accuracy, including boundary settings.

  • Interpretation: The study emphasizes that both estimator variance and bias depend on the evaluation point, with bias magnitude additionally depending on higher-order distributional derivatives.This motivates comparing boundary, near-boundary, and interior points with different curvature.
  • Design: The experiments compare polynomial orders p ∈ {2, 3}, with p = 2 recommended as the default density-estimation choice.The recommendation is linked to its correspondence with local linear regression and the preferred odd value of p − s.
  • Evaluation: Bandwidth experiments range from 0.1hMSE to 2hMSE and also include an estimated bandwidth, with hMSE minimizing asymptotic mean squared error under the true distribution.The reported measures include empirical bias, standard deviation, root-MSE, average estimated standard error, and rejection rate.
  • Evaluation: The simulation reports 5% nominal-level rejection rates for centered t-statistics as a measure of the accuracy of the normal approximation.The t-statistic is centered at the estimator’s expectation in the reported size calculations.
Loading 1811.11512v2…