Tutorials › Competing Risks and Multi-State Models › Two-State Product-Integral Calculations

Transition Intensities and Probabilities · Tutorial 291 of 699

Two-State Product-Integral Calculations

Learn to convert two-state transition counts and risk sets into event-time matrices, multiply the updates in order, and check whether the resulting estimates are interpretable.

Advanced 10 min read

What You'll Learn

  • Calculate each transition-intensity increment from its event count and origin-state risk set.
  • Construct the two-state event-time update matrix, including its diagonal entries.
  • Multiply event-time matrices in chronological order to estimate transition probabilities.
  • Use a row vector to obtain state probabilities for a specified initial distribution.
  • Check risk sets, event counts, update matrices, and assumptions for calculation failures.
  • Distinguish product-integral calculations from survival-only shortcuts that cannot represent transitions back between states.

From Transition Counts to a Two-State Probability Matrix

In a two-state system, an individual can move from state 0 to state 1 or from state 1 to state 0. For example, the states might represent a temporary clinical condition being absent or present. If movement in both directions is possible, a probability calculation must account for both kinds of transitions, in their observed time order. The product integral does this by applying a small transition-matrix update at each event time.

The earlier material on the product-integral recursion establishes the general update: the estimated transition-probability matrix is multiplied by an event-time factor \(I+\Delta\widehat A(u)\). Here we specialize that calculation to two states and show how to build the factors directly from a short table of transition counts and risk sets.

Definition: At event time \(u\), let \(dN_{01}(u)\) and \(dN_{10}(u)\) be the numbers of observed transitions from state 0 to state 1 and from state 1 to state 0. Let \(Y_0(u)\) and \(Y_1(u)\) be the numbers at risk in states 0 and 1 immediately before \(u\). When the relevant risk set is positive, define the estimated increments \(a(u)=dN_{01}(u)/Y_0(u)\) and \(b(u)=dN_{10}(u)/Y_1(u)\). The two-state estimated cumulative transition-hazard increment and its product-integral factor are $$ \Delta\widehat A(u)= \begin{pmatrix} -a(u)&a(u)\\ b(u)&-b(u) \end{pmatrix}, \qquad F(u)=I+\Delta\widehat A(u)= \begin{pmatrix} 1-a(u)&a(u)\\ b(u)&1-b(u) \end{pmatrix}. $$ Rows index the state occupied just before the update; columns index the state just after it. A transition-probability matrix from \(s\) to \(t\) is estimated by multiplying the factors for event times in \((s,t]\) in chronological order.

The diagonal entries are essential: they represent the part of the update that remains in the same state. If only 0-to-1 transitions occur at \(u\), then \(b(u)=0\), and the factor is \(\begin{pmatrix}1-a(u)&a(u)\\0&1\end{pmatrix}\). If transitions in both directions occur at the same recorded time, both increments enter the same factor. Each increment uses the risk set for its own origin state.

These factors are used under conditions that make the counts and risk sets informative about the transition process. The state at risk immediately before each event time must be observed and correctly classified; the event counts must be transitions out of the stated origin state; and censoring must not selectively remove individuals in a way that invalidates those risk sets. For a transition-probability interpretation conditional on the current state, a standard setting is a Markov process with independent censoring conditional on the observed process. Risk sets also need to be positive wherever a transition increment is estimated. The arithmetic can still be performed on a table that violates these conditions, but the resulting matrix need not estimate the intended probabilities.

One Event-Time Update, Then the Full Product

Suppose the current estimated probabilities of being in states 0 and 1 are \(p_0\) and \(p_1\), written as a row vector \((p_0,p_1)\). At a single event time, the updated row is

$$ (p_0,p_1)F(u) = \bigl(p_0(1-a)+p_1b,\;p_0a+p_1(1-b)\bigr). $$

Thus probability can flow from either state to the other in the update. Across multiple event times, each new factor acts on the probabilities produced by all previous factors. With the row convention above, the order is

$$ \widehat P(s,t)=F(u_1)F(u_2)\cdots F(u_m), \qquad s<u_1<\cdots<u_m\leq t. $$

The order is chronological: the factor for the earliest time is on the left. A matrix entry \(\widehat P_{jk}(s,t)\) is the estimated probability of being in state \(k\) at \(t\), conditional on starting in state \(j\) at \(s\), under the model and censoring assumptions. If the starting state is known to be 0, the estimated probabilities at \(t\) are the first row of \(\widehat P(s,t)\).

Worked Example: Three Event Times With Transitions in Both Directions

Consider hypothetical event-time data with the following counts and risk sets. There are no other transitions between the listed times.

TimeOrigin stateTransitionsRisk set
\(u_1\)0\(dN_{01}=2\)\(Y_0=10\)
\(u_2\)1\(dN_{10}=1\)\(Y_1=5\)
\(u_3\)0\(dN_{01}=1\)\(Y_0=6\)

Assume event times are distinct, the risk sets are measured immediately before each time, and censoring and observation of state are adequate for interpreting these estimates as transition probabilities. At \(u_1\), \(a=2/10=0.2\), while \(b=0\). At \(u_2\), \(b=1/5=0.2\), while \(a=0\). At \(u_3\), \(a=1/6\approx0.1667\), while \(b=0\). Therefore,

$$ F(u_1)= \begin{pmatrix}0.8&0.2\\0&1\end{pmatrix}, \quad F(u_2)= \begin{pmatrix}1&0\\0.2&0.8\end{pmatrix}, \quad F(u_3)= \begin{pmatrix}5/6&1/6\\0&1\end{pmatrix}. $$

First multiply the first two updates:

$$ F(u_1)F(u_2) = \begin{pmatrix} 0.8(1)+0.2(0.2)&0.8(0)+0.2(0.8)\\ 0(1)+1(0.2)&0(0)+1(0.8) \end{pmatrix} = \begin{pmatrix}0.84&0.16\\0.2&0.8\end{pmatrix}. $$

Now apply the third update:

$$ \widehat P(s,t)= \begin{pmatrix}0.84&0.16\\0.2&0.8\end{pmatrix} \begin{pmatrix}5/6&1/6\\0&1\end{pmatrix} = \begin{pmatrix}0.70&0.30\\1/6&5/6\end{pmatrix}. $$

For an individual starting in state 0, the estimated probabilities at the horizon are 0.70 for state 0 and 0.30 for state 1. For an individual starting in state 1, they are approximately 0.1667 for state 0 and 0.8333 for state 1. These are conditional transition probabilities under the stated assumptions, not probabilities that the model assumptions themselves are true.

Justifying the Two-State Update

The increment \(a(u)\) estimates the fraction of the state-0 risk set making the 0-to-1 transition at \(u\); \(b(u)\) estimates the corresponding fraction of the state-1 risk set making the 1-to-0 transition. In the estimated cumulative transition-hazard matrix, each off-diagonal increment is paired with a negative diagonal increment in the same row. This gives the row sums zero. Adding the identity matrix turns those increments into the event-time update factor.

For example, starting from state 0, the update assigns fraction \(a\) to state 1 and fraction \(1-a\) to state 0. Starting from state 1, it assigns fraction \(b\) to state 0 and fraction \(1-b\) to state 1. The same logic yields the row-vector update formula above. The product integral applies this update successively because the transition probabilities at a later event time act on the distribution resulting from earlier event times.

This finite-event calculation uses the observed jump increments; it is not the same as replacing a cumulative hazard by an exponential survival formula. In particular, a one-direction survival calculation does not represent transitions back to the original state. The product-integral matrix handles both directions and retains their chronological sequence.

Worked Example: Starting From a Mixed Initial Distribution

Suppose a hypothetical population has initial state distribution \(\pi(s)=(0.6,0.4)\). There are two event times: at the first, \(dN_{01}=3\) and \(Y_0=12\); at the second, \(dN_{10}=2\) and \(Y_1=8\). Assume the risk sets and censoring satisfy the conditions described above. The increments are \(a_1=3/12=0.25\) and \(b_2=2/8=0.25\), giving

$$ F(u_1)=\begin{pmatrix}0.75&0.25\\0&1\end{pmatrix}, \qquad F(u_2)=\begin{pmatrix}1&0\\0.25&0.75\end{pmatrix}. $$

The transition matrix is

$$ \widehat P(s,t)=F(u_1)F(u_2) = \begin{pmatrix} 0.75+0.25(0.25)&0.25(0.75)\\ 0.25&0.75 \end{pmatrix} = \begin{pmatrix}0.8125&0.1875\\0.25&0.75\end{pmatrix}. $$

The estimated state distribution at \(t\) is the initial row vector multiplied by this matrix:

$$ \pi(s)\widehat P(s,t) = (0.6,0.4) \begin{pmatrix}0.8125&0.1875\\0.25&0.75\end{pmatrix} = (0.6(0.8125)+0.4(0.25),\;0.6(0.1875)+0.4(0.75)) = (0.5875,0.4125). $$

Thus, under these assumptions and this initial distribution, the estimated probabilities at \(t\) are 0.5875 in state 0 and 0.4125 in state 1. This is a population state distribution; it is not either row of the transition matrix because the population starts in a mixture of states.

Simultaneous Counts and Validity Checks

If both transition types are recorded at the same event time, calculate both increments using the risk set in their own origin state, then form one combined factor. This is the event-time convention for the product-integral update; it does not mean that a single individual makes two transitions at once.

Worked Example: A Shared Event Time

In a hypothetical system, at time \(u_1\), two individuals move from state 0 to state 1 among \(Y_0=8\), and one moves from state 1 to state 0 among \(Y_1=4\). At a later time \(u_2\), one individual moves from state 0 to state 1 among \(Y_0=6\). Assume these risk sets are valid, censoring is noninformative for the estimation, and the states and event times are observed. At \(u_1\), \(a=2/8=0.25\) and \(b=1/4=0.25\), so the combined factor is

$$ F(u_1)=\begin{pmatrix}0.75&0.25\\0.25&0.75\end{pmatrix}. $$

At \(u_2\), \(a=1/6\) and \(b=0\), giving \(F(u_2)=\begin{pmatrix}5/6&1/6\\0&1\end{pmatrix}\). The chronological product is

$$ \widehat P(s,t)=F(u_1)F(u_2) = \begin{pmatrix} 0.75(5/6)&0.75(1/6)+0.25\\ 0.25(5/6)&0.25(1/6)+0.75 \end{pmatrix} = \begin{pmatrix}0.625&0.375\\5/24&19/24\end{pmatrix}. $$

For a start in state 0, the final estimated probability of state 1 is 0.375; for a start in state 1, it is \(19/24\approx0.7917\). The calculation uses \(Y_0=8\) for the first increment and \(Y_1=4\) for the other; pooling those risk sets would give incorrect increments.

Several checks can reveal a faulty calculation. Each risk set must be positive for an increment that uses it; a zero risk set does not define a count-to-risk ratio. A transition count cannot exceed its origin-state risk set, since that would make an estimated increment exceed one. In the ordinary two-state update, each increment must be between zero and one so that the corresponding diagonal entry is not negative. Check that each count is assigned to the correct origin state, that the risk set is taken immediately before the event time, and that the factors are multiplied chronologically. Under valid increments, the factor rows sum to one; a row that does not is a sign or arithmetic warning. These numerical checks do not, by themselves, establish that censoring is independent or that the Markov interpretation is appropriate.

Common Mistakes, Alternatives, and Limits

  • Using the wrong risk set. Dividing a 1-to-0 count by \(Y_0\) confuses the destination with the origin. Use \(Y_1\) for \(dN_{10}\) and \(Y_0\) for \(dN_{01}\).
  • Forgetting the diagonal. Putting only the off-diagonal increment into the matrix omits the probability that remains in the current state. The diagonal increment is negative in \(\Delta\widehat A\), so the factor has diagonal entries \(1-a\) and \(1-b\).
  • Reversing the multiplication order. The factor for the earliest time goes on the left under the row convention used here. A different order generally describes a different sequence of updates.
  • Using a one-way survival shortcut when transitions can reverse. A scalar survival estimate cannot represent movement from state 1 back to state 0. Use both rows and columns of the transition matrix.

For a two-state system, the row-vector recursion can be used instead of writing full matrix products: update \(p_0\) and \(p_1\) at each event time using the two scalar formulas. It is often convenient for a hand calculation, while matrix multiplication is clearer when reporting transition probabilities from both possible starting states. Both approaches give the same result when they use the same increments and event-time order. Neither method repairs invalid risk sets, informative censoring, misclassified states, or a Markov assumption that does not fit the scientific question.

The calculations produce point estimates, not uncertainty intervals. They also rely on the states and transitions represented in the data; omitted states or unobserved transitions can change the interpretation. A transition-probability matrix is therefore only as meaningful as its state definitions, observation scheme, risk sets, and assumptions.

Check Your Understanding

Try each calculation first, then compare with the solutions.

  1. At one event time, \(dN_{01}=2\), \(Y_0=8\), and there are no 1-to-0 transitions. Write the event-time factor.
  2. At a later time, \(dN_{10}=1\) and \(Y_1=4\). Starting with the factor from Question 1, calculate the two-time transition matrix in chronological order.
  3. At a shared event time, \(dN_{01}=3\), \(Y_0=10\), \(dN_{10}=1\), and \(Y_1=5\). What is the combined factor?
  4. Why is multiplying the initial distribution by the transition matrix different from reporting one row of that matrix?

Solutions. 1. The increment is \(a=2/8=0.25\), so \(F_1=\begin{pmatrix}0.75&0.25\\0&1\end{pmatrix}\). 2. The second factor is \(F_2=\begin{pmatrix}1&0\\0.25&0.75\end{pmatrix}\), so \(F_1F_2=\begin{pmatrix}0.8125&0.1875\\0.25&0.75\end{pmatrix}\). 3. The increments are \(a=0.3\) and \(b=0.2\), giving \(F=\begin{pmatrix}0.7&0.3\\0.2&0.8\end{pmatrix}\). 4. A row gives probabilities conditional on one specified starting state. Multiplying by an initial distribution averages the conditional rows according to the proportions starting in each state.

Clinical Biostats