Why Test for Heterogeneity Across Transitions?
In a multi-state regression model, the same covariate may have a different log-hazard coefficient for different transitions. A formal test asks whether the observed differences are larger than would be expected from estimation uncertainty. This matters when deciding whether a common-effect model is a reasonable simplification or whether the data support transition-specific effects.
The question is about a particular covariate and a specified set of transitions. It is not a test that the covariate has no effect on any transition: equal coefficients could all be nonzero. Nor does a test result establish that the covariate causes a change in transition intensity. The conclusion concerns the fitted model and its assumptions.
Model and Contrast Formulation
For example, in a transition-specific proportional-hazards model, write the intensity for transition \(r\) as
Here \(\lambda_{0r}(t)\) is the baseline intensity for transition \(r\), and the coefficient is defined using the same covariate coding and units on every transition. The baseline intensities may differ freely. The test concerns the coefficients, not equality of baseline hazards. In applications, coefficients are estimated jointly or with a covariance estimator that accounts for any dependence among transition-specific estimates from the same individuals.
Collect the estimated coefficients in \(\hat{\boldsymbol\beta}=(\hat\beta_1,\ldots,\hat\beta_K)^\mathsf{T}\), and let \(\widehat V\) be their estimated covariance matrix. Equality can be expressed as a set of \(K-1\) contrasts against a reference transition:
Thus, the first row tests \(\beta_2-\beta_1=0\), the next tests \(\beta_3-\beta_1=0\), and so on. These contrasts jointly imply equality of all \(K\) coefficients. The specific reference is a matter of representation: another full-rank set of contrasts gives the same joint equality test.
Under the null hypothesis and standard large-sample conditions, the Wald statistic is
The covariance in this expression is essential. A contrast such as \(\hat\beta_2-\hat\beta_1\) has variance \(\widehat{\mathrm{Var}}(\hat\beta_2)+\widehat{\mathrm{Var}}(\hat\beta_1)-2\widehat{\mathrm{Cov}}(\hat\beta_1,\hat\beta_2)\). Treating estimates as independent without justification can therefore give the wrong standard error and test result.
Why the Wald Reference Distribution Applies
The justification follows from the large-sample distribution of the coefficient estimator. If \(\hat{\boldsymbol\beta}\) is approximately multivariate normal with mean \(\boldsymbol\beta\) and covariance \(V\), then applying the linear map \(C\) gives an approximately normal contrast vector:
Under \(H_0\), its mean is the zero vector. Standardizing a zero-mean multivariate normal vector by its covariance matrix produces a quadratic form with a chi-square distribution whose degrees of freedom equal the rank of the contrast matrix. For the \(K-1\) independent equality contrasts above, that rank is \(K-1\). Replacing the unknown covariance by its consistent estimate yields the stated large-sample Wald test.
Name the covariate and transitions included in the equality claim. Keep the covariate definition and scale consistent across those transitions.
Form \(C\boldsymbol\beta=\boldsymbol 0\), using independent rows that express the desired equalities.
Calculate \(C\hat{\boldsymbol\beta}\) and \(C\widehat V C^\mathsf{T}\), retaining covariance terms between estimates.
Compare the Wald statistic with a chi-square distribution having degrees of freedom equal to the contrast rank, and interpret the result for the specified transitions.
Worked Tests
Worked Example: A Two-Transition Wald Test
Suppose a hypothetical fitted model gives the covariate coefficient estimates \(\hat\beta_1=0.20\) and \(\hat\beta_2=0.70\) for two transitions. From the joint covariance estimate, suppose the estimated variance of the contrast \(\hat\beta_2-\hat\beta_1\) is \(0.030\). Test equality at \(\alpha=0.05\).
The contrast estimate is \(0.70-0.20=0.50\). With \(C=(-1,1)\), the one-degree-of-freedom Wald statistic is
Equivalently, the standard error is \(\sqrt{0.030}=0.1732\), giving \(z=0.50/\sqrt{0.030}=2.887\) and \(W=z^2\). The chi-square tail probability with one degree of freedom is approximately \(0.0039\). Since \(0.0039<0.05\), reject equality for these two transition coefficients. The data provide evidence that the covariate's log-hazard coefficient differs across the specified transitions, under the model and covariance assumptions. The coefficient difference is \(0.50\) per one-unit increase in \(x\).
Worked Example: A Small Difference With Substantial Uncertainty
In another hypothetical analysis, the estimated difference between two transition coefficients is \(0.10\), and the estimated variance of that contrast is \(0.0150\). Test equality using a two-sided Wald test.
The standard error and standardized statistic, calculated from the unrounded variance, are
The Wald statistic is \(W=z^2=0.6667\), with one degree of freedom. Its two-sided normal p-value is approximately \(0.4142\) (equivalently, the chi-square tail probability is approximately \(0.4142\)). At the 0.05 level, do not reject equality. This does not demonstrate that the effects are equal: the estimated difference is small relative to its uncertainty, so these data do not provide strong evidence of a difference.
Worked Example: A Joint Test Across Three Transitions
Consider three hypothetical coefficient estimates \(\hat{\boldsymbol\beta}=(0.20,0.60,0.70)^\mathsf{T}\), with estimated covariance matrix
Use the two contrasts against transition 1. Their estimates are \(0.60-0.20=0.40\) and \(0.70-0.20=0.50\). The contrast covariance is
The determinant is \(0.070(0.120)-(0.035)^2=0.007175\). For a two-by-two covariance matrix, using its inverse in the quadratic form gives
There are two independent contrasts, so the reference distribution is \(\chi^2_2\). The p-value is approximately \(0.2056\). At \(\alpha=0.05\), do not reject the joint equality hypothesis. The estimates are not identical, but their differences are not sufficiently large relative to their joint uncertainty to provide evidence against equality.
Diagnostics, Alternatives, and Limitations
Before interpreting the test, check whether the fitted model and its covariance estimate are credible for the transitions at issue. Sparse events on one transition can produce unstable coefficients and large or unreliable standard errors. A nearly singular contrast covariance matrix can make the inverse in the Wald statistic unstable; this may reflect weak information, redundant contrasts, or an estimation problem. Verify that the contrast rows are independent and that all selected coefficients are estimable.
The covariance structure also deserves attention when individuals can contribute information to multiple transitions. A covariance estimate that ignores within-individual dependence can distort the uncertainty of coefficient differences. Conversely, a robust covariance estimate may itself be imprecise when the number of independent individuals or events is small. Strong deviations from the assumed transition-specific model, including an inadequate covariate form or time-varying effects where a constant coefficient is assumed, can make a formal equality test answer a misleading question.
The Wald test is not the only standard approach. A likelihood-ratio test compares a model constrained to have one common coefficient with a model having separate coefficients for the selected transitions. For nested partial-likelihood fits on the same analysis data, twice the difference in maximized partial log likelihood is compared approximately with \(\chi^2_{K-1}\), under regularity conditions. A score test evaluates the restrictions using information at the constrained fit. These approaches test the same type of null but can behave differently in finite samples; Wald tests can be particularly sensitive to unstable estimates or covariance estimates. When estimates are well behaved, the Wald test is convenient because the contrast and covariance directly display the tested difference and its uncertainty.
A non-significant result is not proof of exact equality. If the scientific goal is to establish that differences are small enough to be negligible, that requires a prespecified tolerance and an equivalence-style analysis, not merely failure to reject equality. Also, if many covariates or many different transition subsets are tested, the chance of at least one false positive can increase; the testing plan and any multiplicity adjustment should match the inferential goal.
Common Mistake
A frequent error is to compare two coefficient estimates by eye, or to calculate a contrast standard error as though the estimates were independent. The correct variance includes their covariance:
Another error is to say that a non-significant test proves a common effect. It does not: it says the observed data do not provide sufficient evidence against the stated equality null at the chosen significance level. Report the contrast, its uncertainty, the test statistic, degrees of freedom, p-value, and the transitions included so that the scope of the conclusion is clear.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- For three transition coefficients, how many independent contrasts are needed to test that all three are equal?
- Two coefficient estimates are \(0.30\) and \(0.50\), and their contrast has estimated variance \(0.040\). Calculate the Wald statistic and state its degrees of freedom.
- Why can the variance of a coefficient difference not generally be found by adding the two coefficient variances alone?
- A test of equality has p-value \(0.27\). What conclusion is appropriate at \(\alpha=0.05\), and what conclusion is not justified?
Solutions. (1) Two independent contrasts are needed, for example \(\beta_2-\beta_1\) and \(\beta_3-\beta_1\), so the test has two degrees of freedom. (2) The difference is \(0.50-0.30=0.20\), so \(W=(0.20)^2/0.040=1.00\), with one degree of freedom. (3) The variance includes minus twice the covariance: \(\mathrm{Var}(\hat\beta_2-\hat\beta_1)=\mathrm{Var}(\hat\beta_2)+\mathrm{Var}(\hat\beta_1)-2\mathrm{Cov}(\hat\beta_1,\hat\beta_2)\). (4) Do not reject equality at the 0.05 level; the result does not prove that the coefficients are exactly equal.