Why Track a Treatment-Effect Contrast?
A subject can have a noticeable effect on a selection-model fit without materially changing the treatment comparison of interest. Conversely, a modest change in the whole parameter vector can matter greatly if it moves a particular treatment-effect contrast. For interpretation, the relevant question is therefore not only whether the fitted model is sensitive, but whether the specified scientific contrast changes under a perturbation.
For example, a longitudinal trial model may estimate an average treatment difference at each visit. A prespecified target might be the difference at the final visit, or the change in treatment difference from an earlier to a later visit. The influence calculation in this tutorial follows that target as the likelihood contribution of one or more subjects is perturbed. It describes local sensitivity within the chosen model; it does not establish that treatment caused an outcome difference.
Weighted Subject Contributions and the Contrast Derivative
Suppose there are \(n\) independent subjects, each with an observed record that includes the observed outcomes and the missingness pattern. Under a specified selection model, write the observed-data log-likelihood as \(\ell(\theta)=\sum_{i=1}^{n}\ell_i(\theta)\), where \(\ell_i(\theta)\) is subject \(i\)'s contribution. This setup presumes that the model is differentiable near the fitted parameter, the maximum is an interior point, and the information matrix is nonsingular. The selection model and its assumptions remain in force throughout: a perturbation diagnoses sensitivity within that model, rather than resolving uncertainty about the missing-data assumptions.
A weighted perturbation replaces the log-likelihood by \(\ell(\theta;t)=\sum_i\omega_i(t)\ell_i(\theta)\), where \(\omega_i(0)=1\). For a direction \(a=(a_1,\ldots,a_n)\), set \(\omega_i(t)=1+t a_i\). A positive \(a_i\) locally increases subject \(i\)'s contribution; a negative one decreases it. The perturbation must be considered only for values of \(t\) for which the weights are admissible, and for which the perturbed fit exists.
Define the subject score \(u_i(\theta)=\partial\ell_i(\theta)/\partial\theta\), the total score \(U(\theta,t)=\partial\ell(\theta;t)/\partial\theta\), and the observed information at the unperturbed estimate \(\hat{\theta}=\hat{\theta}(0)\) by \(I=-\partial U(\theta,0)/\partial\theta^\mathsf{T}\), evaluated at \(\hat{\theta}\). The fitted score equation is \(U\{\hat{\theta}(t),t\}=0\). Differentiating this equation at \(t=0\) gives the local parameter movement. For the chosen direction, let \(b=\sum_i a_i u_i(\hat{\theta})\).
This is a local result: it uses the score and information at the unperturbed fit. For a differentiable contrast, the chain rule then gives
For a linear contrast \(q(\theta)=c^\mathsf{T}\theta\), this becomes \(c^\mathsf{T}I^{-1}b\). Thus the contrast’s influence is a projection of the full parameter movement onto the target contrast. A large parameter movement need not imply a large contrast change, and the reverse can also occur. If the contrast is nonlinear, its gradient is evaluated at the fitted parameter; the derivative still gives only the first-order change.
Worked Contrast Calculations
Worked Example: One Subject and a Final-Visit Treatment Effect
Hypothetical data and setup. Consider a longitudinal trial fit with a two-parameter submodel: an intercept and the final-visit treatment effect \(\tau\), measured in symptom-score points. Assume the observed selection-model likelihood is differentiable, the fit has converged to an interior maximum, and its information matrix is positive definite. At this fit, suppose
We perturb this subject's likelihood contribution with \(\omega_i(t)=1+t\), leaving other weights at one. For this direction \(b=u_i(\hat{\theta})\). The determinant of \(I\) is \(4(3)-1(1)=11>0\), and its leading diagonal entry is positive, so this symmetric matrix is positive definite. Its inverse is
The target is the second parameter, so \(c=(0,1)^\mathsf{T}\). The local derivative of the estimated final-visit treatment effect is therefore \(c^\mathsf{T}I^{-1}b=-9/11=-0.8182\) symptom-score points per unit increase in this subject's weight. Locally, increasing the subject's weight moves the fitted treatment effect downward. This is not a prediction that a full unit increase will produce exactly that change: the derivative is evaluated at \(t=0\), and a large perturbation may leave the local regime.
Worked Example: A Change in Treatment Effect Across Visits
Hypothetical data and setup. Suppose a longitudinal model has parameters \(\theta=(\mu,\delta_4,\delta_{12})^\mathsf{T}\), where \(\delta_4\) and \(\delta_{12}\) are treatment differences in symptom-score points at weeks 4 and 12. The target is the change in treatment difference from week 4 to week 12: \(q(\theta)=\delta_{12}-\delta_4\). Assume a converged interior fit and a nonsingular information matrix. For one subject's weight increase, suppose the fitted information and subject score are
The information matrix is positive definite because its diagonal entries are positive. The local parameter movement is
The contrast vector is \(c=(0,-1,1)^\mathsf{T}\). Consequently,
The estimated week-12-minus-week-4 treatment difference locally decreases by 1.750 symptom-score points per unit increase in this subject's weight. The intercept movement does not enter this contrast because its coefficient in \(c\) is zero. The result concerns the change between visits, not either visit-specific treatment effect by itself.
Checking the Local Approximation With Refits
A derivative is useful for identifying local sensitivity, but it is not a substitute for examining how a fitted contrast behaves at meaningful perturbation sizes. Exact refits recompute the maximum-likelihood estimate at each selected \(t\); they can reveal curvature, instability, or failure to converge that a derivative at zero cannot show. The model, data, and estimation method should be held fixed so the differences can be attributed to the perturbation.
Worked Example: A Subject-Weight Path in a Trial
Hypothetical data and setup. In a trial with repeated symptom scores, let \(q\) be the estimated treatment difference at week 12, in score points. A converged selection-model fit gives \(\hat{q}(0)=0.600\). Increase one subject's weight by \(t\), leaving all other weights unchanged. Suppose refitting the same model yields the following values; assume each reported fit converged to the same relevant solution.
| \(t\) | Subject's weight \(1+t\) | Refitted \(\hat{q}(t)\), score points |
|---|---|---|
| -0.10 | 0.90 | 0.660 |
| 0 | 1.00 | 0.600 |
| 0.10 | 1.10 | 0.550 |
| 0.40 | 1.40 | 0.400 |
A centered finite-difference estimate of the derivative at zero, using \(h=0.10\), is
The one-sided slopes are also informative: from zero to \(0.10\), the slope is \((0.550-0.600)/0.10=-0.500\); from \(-0.10\) to zero, it is \((0.600-0.660)/0.10=-0.600\). Their difference suggests some local nonlinearity, though not necessarily a serious problem. At \(t=0.40\), the exact change is \(0.400-0.600=-0.200\) score points. Extending the centered estimate linearly would predict a change of \((-0.550)(0.40)=-0.220\) points, which is close here but remains only an approximation. The check is meaningful because all weights shown are positive and the fits are reported to converge; it would not be meaningful to interpret a failed fit as a valid contrast estimate.
Diagnostics, Alternatives, and Limitations
A useful influence calculation depends on both a well-behaved fit and a clearly defined target. Check the following before interpreting a large or small contrast derivative:
- Convergence and curvature. Confirm that the unperturbed fit satisfies the score equations to numerical tolerance and that the information matrix is nonsingular and appropriately conditioned. Near-singularity can make \(I^{-1}b\) unstable, so small numerical errors may produce large apparent influence.
- Derivative agreement. Compare the analytic derivative with centered finite differences from small positive and negative perturbations. Large disagreement may indicate a coding error, an insufficiently small step, non-smooth behavior, or a fit that is not tracking the same solution.
- Refit behavior. At selected perturbation values, check convergence, parameter estimates, and the target contrast. A jump to a different likelihood maximum, nonconvergence, or strong asymmetry warns that the local derivative does not summarize the path well.
- Target definition. Verify the sign and units of the contrast. For example, week-12 treatment minus control differs in sign from control minus treatment, and a contrast between visits is not the same as a treatment effect at one visit.
- Model dependence. Subject influence is conditional on the fitted selection model and its missingness assumptions. It does not establish that the model is correct or that missingness is ignorable.
This target-specific derivative differs from several useful alternatives. A full-vector parameter influence reports movement in all coordinates but does not by itself identify whether the scientific contrast changes. Exact case deletion refits after removing a subject and is a finite, potentially substantial perturbation; it is a useful benchmark, but it is not the same as the local derivative at weight one. Likelihood displacement summarizes movement in the fitted model more broadly, whereas the contrast derivative projects movement onto the selected treatment comparison. A direct refit path is more informative for sizable changes but costs more computation and can expose multiple solutions rather than a single smooth path.
No one measure settles influence in every setting. A small derivative at zero does not rule out a large change for a substantial perturbation, and a large derivative does not imply that the subject is erroneous or should be excluded. The direction \(a\), scale of \(t\), selected contrast, and assumed selection model all affect the result. Report these choices alongside the estimate and its units. A sensitivity diagnostic is a prompt to investigate data, model fit, and robustness—not a license to remove a subject or to make a causal claim.
A Short Derivation and Common Pitfall
The key derivative follows directly from the perturbed score equation. At the unperturbed maximum, \(U(\hat{\theta},0)=0\). For \(\omega_i(t)=1+t a_i\), the derivative of the score with respect to \(t\), holding \(\theta\) fixed, is \(\sum_i a_i u_i(\hat{\theta})=b\). The derivative of the score with respect to \(\theta\) is \(-I\). Applying the chain rule to \(U\{\hat{\theta}(t),t\}=0\) gives
When \(I\) is invertible, rearrangement yields the parameter derivative, and applying the chain rule to \(q\) yields the contrast derivative above. This argument requires a differentiable score and a locally identifiable solution; it does not guarantee that the likelihood has only one maximum or that a distant perturbed fit remains on the same solution path.
Common mistake: “The subject has a large score, so the treatment-effect contrast must be highly influential.” A large score only describes the subject’s direct score contribution. The information matrix and the contrast direction also matter: the actual first-order target movement is \(\nabla q(\hat{\theta})^\mathsf{T}I^{-1}b\). The correction is to calculate that projection for the prespecified contrast and then check it against refits. Another mistake is to read the derivative as the exact effect of deleting the subject. Deletion is a finite change in weight, not an infinitesimal change; compare an exact deletion refit if that finite change is the question.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- If \(I^{-1}b=(0.2,-0.4)^\mathsf{T}\) and the target is the second parameter, what is the local contrast derivative?
- For a target \(q=\delta_{12}-\delta_4\), the local parameter movement is \((0.1,0.3,-0.2)^\mathsf{T}\) in the order \((\mu,\delta_4,\delta_{12})\). Find the derivative of the target.
- Why does a large subject score alone not determine influence on a specified treatment contrast?
- A finite-difference derivative and the analytic derivative differ greatly, and one perturbed fit did not converge. Should the contrast sensitivity be reported as settled? Explain.
Solutions. (1) The target selects the second coordinate, so the derivative is \(-0.4\) units of that parameter per unit \(t\). (2) The target movement is \(-0.3+(-0.2)=-0.5\) contrast units per unit \(t\); the intercept does not enter. (3) The parameter movement is \(I^{-1}b\), and the target movement further projects it through the contrast gradient. Information and target direction therefore affect the result. (4) No. The disagreement and failed fit are diagnostics of numerical or path instability. Check the score and information calculations, vary the finite-difference step, and investigate convergence before interpreting the local sensitivity.