Why Choose a Bandwidth From the Data?
A regression-discontinuity (RD) estimate uses observations close to a cutoff to compare outcomes on its two sides. The bandwidth \(h\) determines how close is “close”: with cutoff \(c\), a common symmetric window includes observations satisfying \(|X_i-c|\leq h\). A narrow window focuses on observations near the cutoff, where a local approximation is most plausible, but uses fewer observations. A wider window usually improves precision while increasing the risk that the local approximation misses curvature in the outcome relationship.
A data-driven selector uses observed data to choose a bandwidth according to a stated criterion. Two broad approaches are plug-in selection, which estimates the ingredients of an approximate error formula, and cross-validation (CV), which evaluates held-out prediction errors. They need not choose the same \(h\), because they can target different quantities. In particular, a bandwidth that predicts outcomes well over a validation range need not minimize the mean squared error (MSE) of the estimated RD discontinuity.
Plug-In Selection for the RD Effect
Consider a sharp RD design and a local linear fit on each side of the cutoff. At a chosen \(h\), the estimated discontinuity is the difference between the two fitted intercepts at \(c\), with each local fit using observations within its bandwidth and kernel weights. The same basic bandwidth tradeoff applies in other RD settings, but the criterion must match the estimator and target being used.
Under standard local smoothness conditions on the conditional mean outcome on each side of the cutoff, positive running-variable density near the cutoff, and finite outcome variance, the leading MSE of a local linear RD estimate has the form
where \(A>0\) summarizes the leading squared-bias contribution, \(B>0\) summarizes the variance contribution, and \(n\) is the sample size. The constants depend on features such as curvature of the outcome relationships, outcome variability, running-variable density, and the kernel. This expression describes leading terms as the bandwidth is small and the sample is sufficiently informative near the cutoff; it is not an exact finite-sample MSE formula.
A plug-in selector estimates \(A\) and \(B\) from the data and substitutes them into the minimizer of this approximation. The calculation below shows why the formula balances the two sources of error.
Setting the derivative to zero gives \(4Ah^5=B/n\), so \(h^5=B/(4An)\). Since the second derivative is \(12Ah^2+2B/(nh^3)>0\) for \(h>0\), this stationary point minimizes the stated criterion. Replacing the unknown constants by estimates gives the plug-in rule
Worked Example: Calculating a Plug-In Bandwidth
Suppose a hypothetical RD sample has \(n=1{,}000\), and preliminary estimates for the leading-MSE constants are \(\hat A=0.0800\) and \(\hat B=9.00\). The running variable is measured in score points. Applying the plug-in rule gives
The selected common window is therefore about 0.490 score points on either side of the cutoff. This value is the minimizer of the estimated leading-MSE approximation, not a guarantee that the actual finite-sample MSE is minimized exactly there. Its usefulness also depends on how reliably \(\hat A\) and \(\hat B\) were estimated.
The formula makes two directional predictions, holding the other quantities fixed. A larger estimated \(A\), indicating more bias growth from curvature, reduces the selected bandwidth. A larger \(B\), indicating a larger variance contribution, increases it. Increasing \(n\) reduces the selected bandwidth at rate \(n^{-1/5}\) in this approximation. This rate is slow: multiplying the sample size by 32 halves the bandwidth, since \(32^{-1/5}=1/2\).
Cross-Validation and Its Target
Cross-validation assesses prediction on observations not used to train the model that predicts them. For a local regression, a basic leave-one-out CV score can be written as
where \(\mathcal V\) is a fixed set of \(M\) validation observations and \(\hat m_{-i,h}(X_i)\) is the prediction at \(X_i\) from a model fitted without observation \(i\), using bandwidth \(h\). In RD, predictions should be formed from the appropriate side of the cutoff, rather than by smoothing across the discontinuity. A CV selector chooses the candidate bandwidth with the smallest average squared prediction error on the validation set.
For a fair comparison across candidate bandwidths, the same validation observations should contribute to each candidate’s score. The training procedure and the validation range also need to be specified. The CV criterion targets predictive performance for the observations and locations represented in that validation set. Unless it is constructed specifically to estimate the risk of the discontinuity estimator, it does not directly target the MSE of \(\hat{\tau}(h)\). For example, validation points spread farther from the cutoff can give substantial weight to prediction away from the boundary.
Worked Example: Comparing CV Scores
In a hypothetical study, four validation outcomes are measured in outcome-score units. For candidate bandwidth \(h=4\) score points, the held-out outcomes are \(10, 8, 6,\) and \(15\), and the corresponding predictions from fits that omit each validation observation are \(9, 55/7, 53/7,\) and \(38/3\). The residuals, defined as observed minus predicted, are therefore \(1, 1/7, -11/7,\) and \(7/3\). The CV score is
For the same four validation observations, suppose \(h=6\) gives held-out residuals \(0.5,-0.5,1,\) and \(-1\) outcome-score units. Then
Among these two candidates, CV selects \(h=6\), because \(0.625<2.234\). The conclusion is about prediction on these validation observations under the stated fitting procedure. It does not establish that \(h=6\) minimizes the MSE of the RD jump estimate.
Why Selected Windows Vary Across Data Settings
Data-driven selection is responsive to the data features that enter its criterion. The next hypothetical calculations use the plug-in formula to isolate three such changes. In each case, the constants are treated as known estimates for illustration; actual plug-in procedures estimate them, so their uncertainty can also affect the result.
Worked Example: How Curvature, Sample Size, and Noise Change the Window
Start with \(n=1{,}000\), \(\hat A=0.0800\), and \(\hat B=9.00\), giving \(\hat h_{\mathrm{MSE}}\approx0.490\) score points. First, suppose the fitted relationship is less curved, so \(\hat A=0.0400\), with \(n\) and \(\hat B\) unchanged:
The wider window reflects the smaller estimated bias cost of using observations farther from the cutoff. Next, keep \(\hat A=0.0800\) and \(\hat B=9.00\), but double the sample size to \(n=2{,}000\):
The larger sample supports a narrower window while retaining adequate precision. Finally, return to \(n=1{,}000\) and \(\hat A=0.0800\), but let \(\hat B=16.0\), representing a larger variance contribution, perhaps because outcomes are noisier or there is less running-variable density near the cutoff:
The larger variance contribution favors a wider window. These calculations show how the selected bandwidth can differ across settings even when the estimation method is unchanged. They do not imply that the widest or narrowest window is always preferable; each value follows from a particular estimated criterion.
Using a Selector Responsibly
Bandwidth selection is a choice of estimation neighborhood, not a substitute for the RD design’s identifying assumptions. Changing \(h\) changes the observations and distances that contribute to the estimate; it cannot establish continuity at the cutoff or otherwise make an invalid design valid. The bandwidth should be reported together with its units, the estimator, the kernel and fitting procedure, and the criterion used to select it.
A selector’s target matters in interpretation. A plug-in bandwidth based on the leading MSE of the RD estimate aims at a particular point-estimation tradeoff. A prediction-based CV bandwidth aims at predictive loss under its validation scheme. Neither target automatically answers every inferential question. In particular, selecting a bandwidth to minimize point-estimation MSE does not by itself ensure that standard errors or confidence intervals have appropriate coverage; the inference method must be matched to the estimator and its bias.
It is often informative to show how estimates behave at nearby bandwidths as a sensitivity analysis, while distinguishing that check from the primary selection rule. In a fuzzy RD, the estimand involves a ratio of discontinuities, so the choice of criterion should reflect the estimator and target rather than mechanically treating the sharp-RD outcome jump as the whole objective. These considerations help make a data-driven choice transparent without treating it as uniquely correct.
Common Mistakes
- Calling every selected bandwidth “optimal.” A bandwidth is optimal only relative to a specified criterion and assumptions. State whether the target is estimated RD MSE or prediction error.
- Assuming CV directly minimizes RD-effect error. Held-out outcome prediction and error in the estimated discontinuity are different losses. Describe what was held out and what the score measures.
- Interpreting a larger sample as requiring a wider window. In the leading-MSE formula, with other quantities fixed, the selected bandwidth decreases as \(n^{-1/5}\).
- Reporting a bandwidth without units or method. A value such as \(0.49\) is not interpretable without the running-variable units and the selection procedure.
- Treating selection as proof of identification. A data-driven window does not verify the assumptions that give the RD contrast a causal interpretation.
Check Your Understanding
Answer each question using the stated target and context.
- In the leading-MSE expression \(Ah^4+B/(nh)\), what does a larger \(A\) imply for the plug-in bandwidth when other quantities are fixed?
- Why can the bandwidth with the lowest held-out prediction error fail to minimize the MSE of the estimated RD discontinuity?
- If \(n\) increases while \(\hat A\) and \(\hat B\) stay fixed, how does the plug-in bandwidth change?
- What information should accompany a reported bandwidth so readers can interpret it?
- Does choosing a bandwidth by a data-driven rule establish the assumptions needed for a causal RD interpretation? Explain briefly.