Tutorials › Causal Inference › Binary Treatment Misclassification and Effect Correction

Missing Data and Measurement Error · Tutorial 917 of 972

Binary Treatment Misclassification and Effect Correction

Use a misclassification matrix to recover causal risks from a binary treatment recorded with known sensitivity and specificity, and assess when that correction identifies the target effect.

Advanced 10 min read

What You'll Learn

  • Define sensitivity and specificity for a binary treatment measurement.
  • Invert the misclassification matrix to recover treatment-specific outcome risks.
  • Identify why sensitivity plus specificity must differ from one.
  • Distinguish measurement correction from the assumptions needed for causal interpretation.
  • Correct risks within covariate strata and standardize them to a target population.
  • Recognize outcome-dependent misclassification that invalidates a marginal matrix correction.

Why Treatment Misclassification Changes a Causal Contrast

A causal risk contrast compares the outcome risk under one treatment level with the risk under another. If treatment is recorded incorrectly, the groups formed by the recorded treatment are mixtures of the true treatment groups. Their outcome risks generally do not equal the risks under either intervention. A known treatment-classification mechanism can sometimes undo this mixing, but the correction depends on assumptions about how treatment is misclassified and on separate assumptions that identify a causal effect.

Let \(A\in\{0,1\}\) denote the true binary treatment, \(A^*\in\{0,1\}\) its recorded value, and \(Y\in\{0,1\}\) a binary outcome. For a target population, define the causal risk under treatment level \(a\) as \(P(Y(a)=1)\), where \(Y(a)\) is the potential outcome under treatment \(a\). The causal risk difference is \(P(Y(1)=1)-P(Y(0)=1)\). The measurement correction developed here first recovers the joint distribution of \(A\) and \(Y\); causal assumptions are then needed to interpret the recovered risks as causal risks.

Definition: Treatment sensitivity is \(Se=P(A^*=1\mid A=1)\), and treatment specificity is \(Sp=P(A^*=0\mid A=0)\). A false negative is a treated unit recorded as untreated; a false positive is an untreated unit recorded as treated. In the basic matrix correction, \(Se\) and \(Sp\) are known and the classification error is independent of the outcome conditional on true treatment: \(P(A^*\mid A,Y)=P(A^*\mid A)\).

The Matrix Correction

For a fixed outcome value \(y\), collect the probabilities for the two recorded treatment values in \(r_y\), and the corresponding probabilities for the two true treatment values in \(q_y\). The entries are joint probabilities, not risks conditional on treatment:

$$ r_y= \begin{pmatrix} P(Y=y,A^*=0)\\ P(Y=y,A^*=1) \end{pmatrix}, \qquad q_y= \begin{pmatrix} P(Y=y,A=0)\\ P(Y=y,A=1) \end{pmatrix}. $$

Under the stated outcome-independent classification assumption, the probability of each recorded value depends on true treatment but not on \(Y\). Therefore the same matrix applies for each outcome value:

$$ r_y=Kq_y, \qquad K= \begin{pmatrix} Sp & 1-Se\\ 1-Sp & Se \end{pmatrix}. $$

Each column of \(K\) is the distribution of \(A^*\) given one value of \(A\). For example, when \(A=0\), the probability of \(A^*=0\) is \(Sp\), and the probability of \(A^*=1\) is \(1-Sp\).

The matrix can be inverted only if its determinant is nonzero:

$$ \det(K)=Sp\cdot Se-(1-Se)(1-Sp)=Se+Sp-1. $$

Write \(D=Se+Sp-1\). If \(D\ne0\), inversion gives the recovered joint probabilities:

$$ q_y=K^{-1}r_y =\frac{1}{D} \begin{pmatrix} Se & -(1-Se)\\ -(1-Sp) & Sp \end{pmatrix} r_y. $$

For example, the recovered probability of \(Y=1,A=0\) is \(\{SeP(Y=1,A^*=0)-(1-Se)P(Y=1,A^*=1)\}/D\). The corresponding probability of \(Y=1,A=1\) is \(\{-(1-Sp)P(Y=1,A^*=0)+SpP(Y=1,A^*=1)\}/D\). Apply the same formulas to \(Y=0\). Then add over outcome values to obtain \(P(A=a)\), and divide the recovered \(P(Y=1,A=a)\) by \(P(A=a)\) to obtain \(P(Y=1\mid A=a)\).

Theorem: If \(Se\) and \(Sp\) are known, \(Se+Sp\ne1\), and \(A^*\) is independent of \(Y\) conditional on \(A\), then the matrix equation identifies the joint distribution of \(A\) and \(Y\) from the joint distribution of \(A^*\) and \(Y\). This identifies the true-treatment risks \(P(Y=1\mid A=a)\), provided \(P(A=a)>0\). It does not, by itself, establish that those risks are causal.

When \(Se+Sp=1\), the two columns of \(K\) are identical: recorded treatment carries no information distinguishing \(A=0\) from \(A=1\). If \(Se+Sp\) is close to one, inversion is possible algebraically but can greatly amplify sampling error. In finite samples, inversion can also yield negative estimated cell probabilities. Such estimates signal incompatibility between the observed data and the assumed classification parameters, possibly due to sampling variation or model failure; they should not be silently truncated and treated as a successful correction.

Worked Correction in a Randomized Setting

Worked Example: Recovering Risks From Misclassified Treatment

Consider a hypothetical randomized study of 1,000 people. Suppose treatment classification has known sensitivity \(Se=0.90\) and specificity \(Sp=0.95\), with classification error independent of outcome given true treatment. The observed counts are:

Recorded treatment\(Y=1\)\(Y=0\)Total
\(A^*=0\)110415525
\(A^*=1\)140335475

Here \(D=0.90+0.95-1=0.85\). For the outcome-positive cells, use the observed proportions \(r_1=(0.110,0.140)^\mathsf{T}\). The recovered joint probabilities are:

$$ P(Y=1,A=0)=\frac{0.90(0.110)-0.10(0.140)}{0.85} =\frac{0.085}{0.85}=0.100, $$
$$ P(Y=1,A=1)=\frac{-0.05(0.110)+0.95(0.140)}{0.85} =\frac{0.1275}{0.85}=0.150. $$

For the outcome-negative cells, \(r_0=(0.415,0.335)^\mathsf{T}\). Thus:

$$ P(Y=0,A=0)=\frac{0.90(0.415)-0.10(0.335)}{0.85} =\frac{0.340}{0.85}=0.400, $$ $$ P(Y=0,A=1)=\frac{-0.05(0.415)+0.95(0.335)}{0.85} =\frac{0.2975}{0.85}=0.350. $$

The recovered treatment prevalences are \(P(A=0)=0.100+0.400=0.500\) and \(P(A=1)=0.150+0.350=0.500\). The corrected risks are \(0.100/0.500=0.200\) under \(A=0\) and \(0.150/0.500=0.300\) under \(A=1\). The corrected risk difference is \(0.300-0.200=0.100\), or 10 percentage points. Because treatment was randomized, and assuming consistency and no interference, these corrected risks estimate the risks under assignment to each true treatment level. The result is a 10-percentage-point higher outcome risk under treatment in this hypothetical study; it is not the contrast between the two recorded-treatment groups.

From Corrected Risks to Causal Risks

Recovering the true-treatment association is a measurement problem; identifying \(P(Y(a)=1)\) from that association is a causal inference problem. In a randomized study of the true treatment, randomization, consistency, and no interference justify interpreting the true-treatment risks as intervention risks. In an observational study, measured covariates may be needed. Let \(X\) denote the covariates used for adjustment. A standard identification condition is conditional exchangeability, \(Y(a)\perp A\mid X\), together with consistency and positivity: within every covariate stratum in the target population, both treatment levels must have positive probability.

If the classification parameters are known within each \(X=x\) stratum and \(A^*\) is independent of \(Y\) conditional on \(A,X\), apply the matrix correction separately within each stratum. This recovers \(P(Y=1\mid A=a,X=x)\). Under the causal conditions just stated, standardize those risks to the target covariate distribution:

$$ P(Y(a)=1)=\sum_x P(Y=1\mid A=a,X=x)P(X=x). $$

For continuous covariates, the sum is replaced by an expectation over the target distribution of \(X\). The misclassification correction does not remove confounding: it recovers information about the true treatment distribution within strata, while exchangeability and standardization address causal interpretation.

Worked Example: Correcting Within Covariate Strata

Suppose a hypothetical observational study has two covariate strata, low and high baseline risk, with 400 people in each. In each stratum, \(Se=0.80\), \(Sp=0.90\), and classification error is independent of outcome given true treatment and stratum. The observed counts are:

Stratum\(A^*\)\(Y=1\)\(Y=0\)
Low026194
Low134146
High092128
High18892

Here \(D=0.80+0.90-1=0.70\). In the low stratum, the corrected counts with \(Y=1\) are:

$$ A=0:\quad \frac{0.80(26)-0.20(34)}{0.70}=20, \qquad A=1:\quad \frac{-0.10(26)+0.90(34)}{0.70}=40. $$

For \(Y=0\), the corrected counts are \(\{0.80(194)-0.20(146)\}/0.70=180\) for \(A=0\) and \(\{-0.10(194)+0.90(146)\}/0.70=160\) for \(A=1\). Therefore the corrected low-stratum risks are \(20/(20+180)=0.10\) and \(40/(40+160)=0.20\).

In the high stratum, the corrected \(Y=1\) counts are \(\{0.80(92)-0.20(88)\}/0.70=80\) for \(A=0\) and \(\{-0.10(92)+0.90(88)\}/0.70=100\) for \(A=1\). For \(Y=0\), they are \(\{0.80(128)-0.20(92)\}/0.70=120\) and \(\{-0.10(128)+0.90(92)\}/0.70=100\), respectively. The corrected high-stratum risks are \(80/(80+120)=0.40\) and \(100/(100+100)=0.50\).

Suppose the target population is 60% low-risk and 40% high-risk, and assume consistency, conditional exchangeability given stratum, positivity, and no interference. The standardized causal risks are:

$$ P(Y(0)=1)=0.60(0.10)+0.40(0.40)=0.22, \qquad P(Y(1)=1)=0.60(0.20)+0.40(0.50)=0.32. $$

The standardized risk difference is \(0.32-0.22=0.10\), or 10 percentage points. These are causal interpretations only under the stated conditions; matrix inversion alone would yield corrected stratum-specific associations, not a causal effect.

When the Matrix Does Not Identify the Desired Risks

A matrix correction requires more than known marginal sensitivity and specificity. The same \(K\) must describe classification for both outcome values (and, when adjusting, within each covariate stratum). If classification depends on the outcome after conditioning on true treatment, then the probability of \(A^*\) given \(A\) differs between \(Y=0\) and \(Y=1\). Applying a single matrix to both outcome-specific distributions is then unjustified. Likewise, unknown sensitivity or specificity generally leaves the system underidentified from the observed treatment and outcome table alone; additional information, such as a suitable validation sample, is needed to determine the classification mechanism.

Worked Example: Outcome-Dependent Error Breaks the Correction

Consider hypothetical true counts of 20 outcome-positive and 80 outcome-negative people with \(A=0\), and 40 outcome-positive and 60 outcome-negative people with \(A=1\). Suppose the measurement has sensitivity 0.50 among outcome-positive treated people but 1.00 among outcome-negative treated people. Among untreated people, specificity is 0.50 for outcome-positive people and 1.00 for outcome-negative people. The marginal sensitivity is \((20+60(1.00))/100=0.80\), and the marginal specificity is \((20(0.50)+80(1.00))/100=0.90\).

The resulting observed counts are 30 with \(Y=1,A^*=0\), 80 with \(Y=0,A^*=0\), 30 with \(Y=1,A^*=1\), and 60 with \(Y=0,A^*=1\). Although the marginal values are \(Se=0.80\) and \(Sp=0.90\), the outcome-specific error rates differ. If one incorrectly applies the single-matrix correction, \(D=0.70\) and the recovered \(Y=1\) counts are:

$$ A=0:\quad \frac{0.80(30)-0.20(30)}{0.70}=25.71, \qquad A=1:\quad \frac{-0.10(30)+0.90(30)}{0.70}=34.29. $$

The corrected treatment totals are 100 in each group, so the incorrectly corrected risks are \(25.71/100=0.2571\) and \(34.29/100=0.3429\). Their difference is 0.0857, whereas the true risks from the stated data are \(20/100=0.20\) and \(40/100=0.40\), a difference of 0.20. The discrepancy arises because marginal \(Se\) and \(Sp\) do not supply the outcome-specific classification probabilities required by the matrix equation.

Common Mistakes and Practical Checks

  • Treating a corrected association as automatically causal. Matrix inversion addresses treatment measurement error. Exchangeability (or randomization), consistency, positivity, and no interference are still needed for a causal interpretation.
  • Using a single matrix when error depends on outcome or covariates. The classification probabilities must be appropriate for each outcome and adjustment stratum; marginal values alone may not suffice.
  • Confusing joint probabilities with conditional risks. Inversion first recovers \(P(Y=y,A=a)\). Divide by the recovered \(P(A=a)\) to obtain \(P(Y=1\mid A=a)\).
  • Ignoring a weak determinant. When \(Se+Sp\) is near one, small changes in observed proportions or classification parameters can produce large changes in corrected estimates.

A useful identification check is to state the target causal risks, the known classification parameters and their conditioning variables, the nonzero determinant condition, and the causal assumptions separately. This makes clear which part of the analysis corrects measurement and which part supports causal interpretation.

Check Your Understanding

Answer each question by identifying the relevant assumption or calculation.

  1. What does \(Se+Sp=1\) imply about the two columns of the treatment misclassification matrix?
  2. Why does the matrix correction first recover joint probabilities rather than treatment-specific risks?
  3. For a causal interpretation in an observational study, what assumptions are needed in addition to known sensitivity and specificity?
  4. Why can marginal sensitivity and specificity be insufficient when treatment misclassification depends on the outcome?
  5. If classification parameters differ across covariate strata, how should the correction and subsequent standardization be carried out?
Clinical Biostats