Tutorials › Propensity Score Matching and Instrumental Variables › Heaping And Measurement Error Near The Cutoff

Regression Discontinuity and Natural Experiments · Tutorial 594 of 699

Heaping And Measurement Error Near The Cutoff

Learn to distinguish a genuinely discrete running variable from a mismeasured one, diagnose heaping near the cutoff, and understand why its effect on regression-discontinuity estimates is not always simple attenuation.

Advanced 12 min read

What You'll Learn

  • Distinguish a running variable used for actual assignment from a rounded or mismeasured version used in analysis.
  • Calculate how rounding changes expected counts near a threshold.
  • Explain how assignment misclassification can alter a measured outcome jump.
  • Recognize why continuous-density sorting tests can be misleading with heaped data.
  • Use validation data and sensitivity checks to assess measurement problems.

Why the Recorded Score Near a Cutoff Matters

In regression discontinuity (RD), observations just below and above a cutoff are compared because, under the design’s assumptions, their potential outcomes would otherwise change smoothly through that point. The comparison is only meaningful if the running variable is measured and assigned as the analysis assumes. A score recorded as 100 might represent an exact value of 100, a rounded value somewhere from 95 to just below 105, or a value altered by an imperfect measurement process. Those possibilities are not equivalent near a threshold.

Heaping means that recorded values occur disproportionately at selected numbers, often multiples of 5 or 10. It can arise from rounding, digit preference, or a recording system that stores only coarse values. Measurement error is broader: the recorded value differs from the value relevant to the policy rule, whether or not the errors produce visible heaps. The central question is therefore not merely whether values look rounded, but which value determines assignment and which value is used in the analysis.

Definition: Let \(X\) denote the running variable relevant to the assignment rule, \(c\) the cutoff, and \(D\) the treatment indicator. In a sharp RD design, \(D=1\{X\geq c\}\). Let \(W\) denote a recorded or analyzed version of the running variable. Heaping is a concentration of \(W\) at particular values; measurement error occurs when \(W\) differs from the assignment-relevant \(X\). If the rule actually uses \(W\), then \(W\), rather than an unobserved \(X\), is the assignment variable.

The distinction determines the problem. If a policy assigns treatment using an exact, unrounded \(X\), but the analyst observes only rounded \(W\), some units can appear on the wrong side of the cutoff. If the policy itself assigns treatment using the rounded score \(W\), there is no assignment misclassification relative to that rule. There may still be a discrete running variable, however, so the usual interpretation based on arbitrarily close values on either side is not available in the same way.

How Rounding Changes the Data Near the Cutoff

Suppose a score is rounded to the nearest 10. Each interior recorded value represents a 10-point interval, while the first and last values in a bounded score range may represent shorter intervals. A pile-up at a recorded value is therefore not, by itself, evidence that people sorted around the cutoff. It may be exactly what the measurement process predicts.

Worked Example: Expected Counts Under Rounding

Assume, hypothetically, that 200 exact scores are uniformly distributed from 80 to 120 and are rounded to the nearest 10. What counts should be expected at the recorded values?

The score range has width \(120-80=40\), so the expected number of observations per score point is \(200/40=5\). The interior value 90 represents scores from 85 to just below 95, a width of 10. Its expected count is \(10\times5=50\). The same calculation gives 50 at 100 and 50 at 110.

At the lower endpoint, the recorded value 80 represents only the portion of its rounding interval within the score range: 80 to just below 85, a width of 5. Its expected count is \(5\times5=25\). The upper endpoint 120 similarly represents 115 to 120, also width 5, so its expected count is 25. The expected counts are therefore 25 at 80, 50 at 90, 50 at 100, 50 at 110, and 25 at 120; they sum to 200.

If the cutoff is 100 and actual assignment uses the exact score, the 50 observations recorded as 100 represent scores from 95 to just below 105. Under the uniform model, 25 have exact scores below 100 and 25 have exact scores at or above 100. Thus, treating every recorded 100 as if its exact score were 100 would conceal which side of the cutoff determines assignment.

This example also shows why a recorded value at the cutoff does not necessarily mean there are many exact observations at the cutoff. With continuous exact scores, the probability of an exact tie at 100 is zero; rounding creates a mass at 100 by combining a range of exact values. Conversely, if the assignment rule uses the rounded value, all units recorded as 100 may receive the treatment specified for \(W=100\). The analyst must establish the rule from the policy or administrative process rather than infer it from the heaped data alone.

Consequences for Assignment and the Estimated Jump

Let \(Y(1)\) and \(Y(0)\) be the potential outcomes under treatment and control, with observed outcome \(Y=DY(1)+(1-D)Y(0)\). Under sharp assignment based on \(X\), the cutoff effect is identified by the difference between the right- and left-hand limits of the conditional mean of \(Y\), provided the relevant potential-outcome means are continuous at \(c\). When only \(W\) is observed, that reasoning can fail if \(W\) puts observations on the wrong side or blends values from both sides.

A useful way to see the issue is to define an analyst’s recorded-side indicator \(A=1\{W\geq c\}\). For either side \(a\in\{0,1\}\), the observed mean can be decomposed as

$$ E[Y\mid A=a] = P(D=1\mid A=a)E[Y(1)\mid D=1,A=a] + P(D=0\mid A=a)E[Y(0)\mid D=0,A=a]. $$

If the recorded side does not agree with the actual assignment side, each mean can mix treated and untreated outcomes. The difference between these mixtures is not generally the RD effect at the cutoff. The direction and size of the distortion depend on how errors occur, how outcomes vary with \(X\), and whether the treatment effect varies across units. Attenuation is possible, but it is not a universal result.

Worked Example: A Misclassified Side Can Attenuate a Jump

Consider a hypothetical two-side illustration, not a complete continuous RD analysis. There are 100 units truly assigned to treatment and 100 truly assigned to control. In the absence of treatment, every unit has outcome 50; treatment adds 10 outcome units for every treated unit. Suppose the recorded-side classification is correct for 80% of units on each true side.

Among the 100 units classified as recorded-side treated, 80 are truly treated and have mean outcome 60, while 20 are truly controls and have mean 50. The recorded-side treated mean is \( (80\times60+20\times50)/100=5{,}800/100=58 \).

Among the 100 units classified as recorded-side control, 20 are truly treated and have mean 60, while 80 are truly controls and have mean 50. The recorded-side control mean is \( (20\times60+80\times50)/100=5{,}200/100=52 \). The recorded-side difference is \(58-52=6\) outcome units, rather than the true treatment effect of 10.

Here the error attenuates the difference because the assumptions deliberately make the two sides balanced and the treatment effect constant. In an RD application, outcome trends, unequal error rates, or sorting can make the distortion larger, smaller, or even reverse its direction. This calculation is a warning against assuming a fixed correction factor.

The assignment details matter even if the analyst has a treatment indicator \(D\) in the data. If \(D\) was assigned using exact \(X\), then \(D\) may not equal \(1\{W\geq c\}\). If the analyst treats \(W\) as exact, apparent treatment-control discrepancies around \(c\) may reflect measurement rather than noncompliance. If \(D\) was assigned using recorded \(W\), the rule may still be sharp, but the support may consist of separated mass points. In either case, applying the usual continuous-running-variable interpretation without checking the assignment mechanism is not justified.

Heaping and Sorting Diagnostics

A density-based sorting diagnostic asks whether the distribution of the running variable changes abruptly at the cutoff in a way consistent with precise sorting. Such a diagnostic is designed for a running variable with a sufficiently continuous distribution. If recorded values are rounded, the data instead contain mass points and empty intervals between them. A density estimate may then respond to the rounding process, the chosen binning, or the cutoff’s position within a rounding interval. A rejection need not indicate manipulation, and a non-rejection does not rule it out.

Worked Example: A Heap Is Not Automatically Sorting

Return to the hypothetical uniform scores from 80 to 120, with 200 scores rounded to the nearest 10 and a cutoff at 100. The expected recorded counts are 25 at 80, 50 at 90, 50 at 100, 50 at 110, and 25 at 120. A recorded count of 50 at 100 is therefore expected under the stated rounding mechanism, even though the exact scores were uniform and no one sorted.

A researcher who sees a large stack at 100 and calls it evidence of precise manipulation has not accounted for the rounding intervals. The appropriate diagnostic begins by documenting the measurement rule and comparing observed values with the pattern that rule predicts. The calculation does not prove that sorting is absent: it shows only that the heap itself is explained by rounding under this hypothetical model. Other evidence and assumptions are needed to assess manipulation.

Useful checks include examining the raw score’s last digits, plotting counts at the individual recorded values near \(c\), and confirming how the data system rounds, truncates, or caps scores. When possible, compare the analyzed variable with a more precise source or with a validation sample in which both \(X\) and \(W\) are observed. Check whether the cutoff lies inside a rounding interval, exactly at a recorded value, or between supported values. Also compare treatment status with the assignment rule: disagreements can reveal whether the observed variable reproduces the actual rule.

Predetermined covariate continuity checks can provide additional context, but they do not repair a mismeasured running variable. A lack of visible covariate changes does not establish that \(W\) correctly identifies the assignment side. Likewise, detecting heaping does not establish that the outcome discontinuity is biased; it identifies a measurement feature that must be reconciled with the design.

A Practical Diagnostic Sequence

1
Establish the assignment variable.
Find out whether the rule uses an exact score, a rounded score, or another recorded quantity. Confirm the cutoff convention, including how equality is handled.
2
Describe the measurement process.
Identify rounding precision, truncation, digit preference, caps, and any changes in recording procedures. Distinguish these mechanisms rather than treating every heap as the same phenomenon.
3
Inspect support at the cutoff.
Tabulate values and counts near \(c\). Determine whether observed values represent exact points or intervals, and whether units can be classified reliably as above or below the true cutoff.
4
Reassess diagnostics and interpretation.
Use sorting checks that respect the support and measurement mechanism. Report uncertainty about classification and avoid interpreting a recorded-variable jump as the intended cutoff effect unless the assignment and continuity assumptions support it.

Approaches, Limitations, and a Common Mistake

The first choice is to use a validated, more precise assignment-relevant score if one exists. This preserves the original rule most directly, though the better measure may be unavailable for some units or may itself contain error. If only a rounded variable is available, the analysis should respect its support rather than pretend that it provides exact, arbitrarily close observations to the cutoff. Where the rounding mechanism is known, expected interval widths and implied counts can help distinguish mechanical heaps from unexpected concentrations. A validation sample can estimate how often recorded values place units on the wrong side, but correcting estimates requires assumptions about how that error relates to outcomes and assignment.

These alternatives answer different questions. A plot of the recorded values diagnoses the support; it does not recover exact scores. A density-based sorting test addresses distributional changes under its assumptions; it does not validate the measurement process. A correction based on a validation sample can address misclassification only to the extent that the sample and error model apply to the analysis population. No single diagnostic converts an invalid recorded running variable into a valid one automatically.

Common mistake: “There is a pile of observations at the cutoff, so people must have manipulated their scores; the density test confirms it.” The reasoning fails because rounding can create a mass at the cutoff even when exact scores are smooth and nobody sorts. The correction is to establish the assignment and recording rules first, predict what heaping those rules imply, and interpret sorting evidence only after accounting for discrete or rounded support.

The limitation is fundamental: if the precise running variable is unavailable and the recorded value does not reliably determine which side of the true cutoff a unit occupies, the usual local comparison may not identify the intended cutoff effect. The right response is not to claim that measurement error always attenuates or to rely on a single test. State which variable governs assignment, show the observed support, describe the measurement uncertainty, and qualify the causal interpretation accordingly.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Scores are uniform from 80 to 120, \(n=400\), and rounded to the nearest 10. What are the expected counts at 80, 90, 100, 110, and 120?
  2. Why can a large recorded count at the cutoff fail to show sorting?
  3. In a two-side example, 100 units are truly treated and 100 are controls. Classification is 90% correct on each side, the control outcome is 30, and treatment adds 8. What is the recorded-side mean difference?
  4. What must be established before treating \(W\) as the assignment variable in a sharp RD analysis?
  5. Name two checks that can help distinguish heaping from manipulation, and state one limitation of each.

Solutions. (1) The score density is \(400/40=10\) observations per score point. Each interior bin has width 10 and expected count 100; each endpoint has width 5 and expected count 50. Thus the counts are 50, 100, 100, 100, and 50, totaling 400. (2) Rounding combines a range of exact values into one recorded value. If the range’s width and score distribution predict the pile-up, the count can arise without sorting. (3) The recorded treated group contains 90 treated units with outcome 38 and 10 controls with outcome 30, so its mean is \((90\times38+10\times30)/100=37.2\). The recorded control group contains 10 treated units and 90 controls, so its mean is \((10\times38+90\times30)/100=30.8\). The difference is \(37.2-30.8=6.4\) outcome units, below the true effect of 8 in this balanced illustration. (4) Establish that the policy or administrative rule actually assigns treatment using \(W\), including its rounding and equality conventions; similarity between \(W\) and another score is not enough. (5) Inspect digit patterns and counts at individual values, while recognizing that these do not alone identify the assignment rule or prove the absence of sorting. Compare against a more precise source or validation sample, while recognizing that it may not cover all units or represent the same measurement process.)

Clinical Biostats