Tutorials › Competing Risks and Multi-State Models › Unequal Visit Times and Panel Likelihood Construction

Interval Censoring and Panel Data · Tutorial 531 of 699

Unequal Visit Times and Panel Likelihood Construction

Build a likelihood from each subject’s observed states and actual visit intervals, and see how the construction changes when intermediate states are unobserved.

Advanced 10 min read

What You'll Learn

  • Write a subject’s likelihood as a product of transition probabilities for their observed visit intervals.
  • Distinguish transition probabilities indexed by elapsed time from those indexed by calendar time.
  • Combine subject contributions under independent sampling and an ignorable visit schedule.
  • Sum over unobserved intermediate states using the Markov property.
  • Check transition matrices, time units, and likelihood contributions for common construction errors.

Why Unequal Visit Times Matter

In panel data, a subject’s state is observed at scheduled visits, but the times between visits need not be equal across subjects—or even within one subject. A transition observed across one month and a transition observed across three months generally have different probabilities. Consequently, a likelihood must use the transition probabilities for the actual interval between each pair of observations, rather than treating every observed change as if it occurred over one common step.

The event path between visits is usually not observed. A subject recorded in state 0 at one visit and state 1 at the next may have changed state once or several times in between. A transition probability over the full interval accounts for all paths compatible with the endpoint states; it is not a claim that a particular change happened at a particular unobserved time.

Definition: Let \(X_i(t)\) denote subject \(i\)’s state at time \(t\), taking values in a finite state space. For \(s<t\), define \(P_i(s,t)_{rs}=P\{X_i(t)=s\mid X_i(s)=r\}\), conditional on the model and any included covariate history. The matrix \(P_i(s,t)\) is the transition-probability matrix for that interval: its rows index the state at the start, its columns index the state at the end, and each row sums to one.

Constructing the Observed-Data Likelihood

Suppose subject \(i\) is observed at times \(t_{i0}<t_{i1}<\cdots<t_{im_i}\), with observed states \(x_{i0},x_{i1},\ldots,x_{im_i}\). If the initial state is conditioned on, the subject’s likelihood contribution is

$$ L_i=\prod_{j=1}^{m_i}P_i(t_{i,j-1},t_{ij})_{x_{i,j-1},x_{ij}}. $$

This expression uses a separate transition probability for every consecutive observed pair. For independent subjects, the full likelihood conditional on their initial states is \(L=\prod_i L_i\). If initial states are modeled as random with distribution \(\pi_i\), include the corresponding initial-state probability, \(\pi_i(x_{i0})\), in each subject’s contribution. The likelihood is a function of the model parameters through the transition matrices.

For a time-homogeneous continuous-time Markov model, the transition matrix depends on the elapsed time \(\Delta=t_{ij}-t_{i,j-1}\), so it is written \(P(\Delta)\). If the generator is \(Q\), with off-diagonal entries equal to transition intensities and diagonal entries chosen so each row sums to zero, then \(P(\Delta)=\exp(\Delta Q)\). Intensities have units inverse to the time unit used for \(\Delta\). In a time-inhomogeneous model, the matrix can depend on both the start and end times, so the appropriate notation is \(P(s,t)\); equal-length intervals at different calendar times need not have the same matrix.

Assumptions for this likelihood: The state process follows the stated transition model, including its Markov and time-homogeneity assumptions when those are imposed. Subjects are independent conditional on modeled covariates and initial states. The observed state labels and visit times are recorded correctly. The visit schedule is fixed by design or ignorable for the state-process likelihood: after conditioning on included information, the schedule does not add unmodeled information about the states or parameters. If visits depend on unobserved disease status, this conditional likelihood alone may not be adequate; the observation process may need to be modeled jointly.

The factorization follows directly from the chain rule and the Markov property. For one subject, the joint conditional probability of the observed state sequence is

$$ \begin{aligned} &P\{X_i(t_{i1})=x_{i1},\ldots,X_i(t_{im_i})=x_{im_i}\mid X_i(t_{i0})=x_{i0}\}\\ &=\prod_{j=1}^{m_i}P\{X_i(t_{ij})=x_{ij}\mid X_i(t_{i0})=x_{i0},\ldots,X_i(t_{i,j-1})=x_{i,j-1}\}\\ &=\prod_{j=1}^{m_i}P_i(t_{i,j-1},t_{ij})_{x_{i,j-1},x_{ij}}. \end{aligned} $$

The second equality is exactly where the Markov assumption is used: conditional on the state at the beginning of an interval (and the modeled covariate history), earlier states add no information about the next state. If an intermediate state is not observed, it is not inserted as though it were known. Instead, its possible values are summed over, as the next example shows.

Worked Example: One Subject With Two Unequal Gaps

Consider a hypothetical two-state panel model with states 0 and 1. For a one-month interval, suppose the transition matrix is \(P(1)=\begin{pmatrix}0.90&0.10\\0.20&0.80\end{pmatrix}\), and for a three-month interval it is \(P(3)=\begin{pmatrix}0.70&0.30\\0.40&0.60\end{pmatrix}\). Both matrices have nonnegative entries and rows summing to one. A subject is observed in state 0 at month 0, state 1 at month 1, and state 1 at month 4.

The first observed transition uses \(P(1)\), and the second uses \(P(3)\). Conditional on the initial state, the subject contribution is

$$ L_i=P(1)_{0,1}P(3)_{1,1} =(0.10)(0.60)=0.0600. $$

Thus the probability of this observed sequence under the specified model is 0.0600. Using \(P(1)_{1,1}\) for the second factor would incorrectly treat the three-month gap as a one-month gap.

Worked Likelihood Under a Continuous-Time Model

For a concrete time-homogeneous example, consider a hypothetical two-state continuous-time Markov chain. Let \(\alpha=0.15\) per month be the intensity from state 0 to state 1, and let \(\beta=0.10\) per month be the intensity from state 1 to state 0. The rates are constant over time, the process is Markov, and the time unit is months. With state order \(0,1\), the generator is \(Q=\begin{pmatrix}-\alpha&\alpha\\\beta&-\beta\end{pmatrix}\). For an interval of \(u\) months, its transition probabilities are

$$ \begin{aligned} P_{00}(u)&=\frac{\beta}{\alpha+\beta} +\frac{\alpha}{\alpha+\beta}e^{-(\alpha+\beta)u},& P_{01}(u)&=\frac{\alpha}{\alpha+\beta}\left(1-e^{-(\alpha+\beta)u}\right),\\ P_{10}(u)&=\frac{\beta}{\alpha+\beta}\left(1-e^{-(\alpha+\beta)u}\right),& P_{11}(u)&=\frac{\alpha}{\alpha+\beta} +\frac{\beta}{\alpha+\beta}e^{-(\alpha+\beta)u}. \end{aligned} $$

The rates are nonnegative, the generator rows sum to zero, and the model’s continuous-time Markov and constant-intensity assumptions are being imposed for this hypothetical calculation. Here \(\alpha+\beta=0.25\) per month, so the exponent is \(-0.25u\). For the intervals used below, the matrices are approximately

$$ P(1)= \begin{pmatrix} 0.8673&0.1327\\ 0.08848&0.9115 \end{pmatrix},\qquad P(2)= \begin{pmatrix} 0.7639&0.2361\\ 0.1574&0.8426 \end{pmatrix},\qquad P(3)= \begin{pmatrix} 0.6834&0.3166\\ 0.2111&0.7889 \end{pmatrix}. $$

Worked Example: Combining Three Subjects’ Contributions

Suppose three hypothetical subjects have these observed sequences: subject A is in state 0, then state 1 one month later, then state 1 three months after that; subject B is in state 1, then state 0 two months later; subject C is in state 0, remains in state 0 at a visit two months later, and is in state 1 one month after that. Assume independent subjects, condition on each initial state, and use the two-state model just specified.

For subject A, the gaps are one and three months. Therefore

$$ L_A=P_{01}(1)P_{11}(3) \approx(0.1327195)(0.7889467) \approx0.10471. $$

For subject B, the observed transition is from state 1 to state 0 over two months:

$$ L_B=P_{10}(2) =\frac{0.10}{0.25}\left(1-e^{-0.25(2)}\right) =0.4(1-e^{-0.5}) \approx0.15739. $$

For subject C, the first transition is from state 0 to state 0 over two months and the second is from state 0 to state 1 over one month:

$$ L_C=P_{00}(2)P_{01}(1) \approx(0.7639184)(0.1327195) \approx0.10139. $$

Independence gives the full likelihood:

$$ L=L_A L_B L_C \approx(0.10471)(0.15739)(0.10139) \approx0.001671. $$

This is the likelihood of these observed sequences under the specified rates, conditional on the starting states. It is not the probability that the rates are correct. Rounding the displayed subject contributions affects only the last few digits of the product.

When an Intermediate State Is Unobserved

Sometimes the data provide only an initial and final observation even though a model calculation is conveniently expressed over multiple subintervals. The state at the boundary between those subintervals must be marginalized, not selected arbitrarily. For matrices \(P(s,t)\) and \(P(t,u)\), the Markov composition rule is \(P(s,u)=P(s,t)P(t,u)\). Entry \((r,q)\) of the product sums the probabilities of all possible intermediate states.

Worked Example: Summing Over an Unobserved State

In a hypothetical three-state model, suppose the transition matrix for the first interval is \(P(0,1)=\begin{pmatrix}0.80&0.20&0\\0.10&0.70&0.20\\0&0.30&0.70\end{pmatrix}\), and for the following interval it is \(P(1,3)=\begin{pmatrix}0.60&0.30&0.10\\0.05&0.65&0.30\\0.02&0.18&0.80\end{pmatrix}\). Each is a valid transition matrix: all entries are nonnegative and each row sums to one. A subject is known to be in state 0 at time 0 and is observed in state 2 at time 3; there is no observation at time 1.

Let \(k\) denote the unknown state at time 1. Summing over \(k=0,1,2\), the endpoint probability is

$$ \begin{aligned} P\{X(3)=2\mid X(0)=0\} &=\sum_{k=0}^{2}P(0,1)_{0k}P(1,3)_{k2}\\ &=(0.80)(0.10)+(0.20)(0.30)+(0)(0.80)\\ &=0.080+0.060+0=0.140. \end{aligned} $$

The likelihood contribution is 0.140. The zero contribution for intermediate state 2 follows from \(P(0,1)_{0,2}=0\) in the stated first-interval matrix, not from assuming that the subject could never occupy state 2 under any other model.

Practical Checks, Alternatives, and Limitations

Before using a panel likelihood, verify that visit times are ordered and that every interval length is expressed in the same units as the model’s rates. For every interval, check that the matrix being used has nonnegative entries and rows summing to one. Confirm that the row and column state ordering is consistent throughout; reversing the order silently changes the meaning of an entry. A zero transition probability for an observed pair gives a zero likelihood, signaling that the specified model cannot generate that observation as recorded.

The main scheduling distinction is between using elapsed time and calendar time. Under a time-homogeneous model, subjects with the same gap use the same matrix, even if their visits occur on different dates. Subjects with different gaps use different matrices. Under a time-inhomogeneous model, the start and end dates can matter too. A single common transition matrix for all observed pairs is justified only when the model makes those transition probabilities the same. For example, equal visit spacing does not by itself justify that choice if transition intensities vary with calendar time.

A related distinction is whether the intermediate states are observed. If they are observed, the likelihood has one factor for each consecutive observed interval. If they are not, sum over their possible values, equivalently using the relevant matrix product. Treating an unobserved state as known discards uncertainty and changes the likelihood. Likewise, a panel likelihood does not identify exact event times between visits merely because it assigns a probability to the observed endpoints.

This construction is the basis for likelihood-based estimation: one evaluates the transition matrices at candidate parameter values, multiplies the required entries, and seeks parameter values that make the observed data relatively likely. It relies on the transition model and visit-process assumptions being credible. If the Markov assumption fails, relevant history may need to be represented in the state or covariates. If visit timing is informative after conditioning, a joint model of states and visits may be required. Those are substantive modeling choices, not fixes achieved by substituting a common visit interval.

Common mistake: Using one transition probability for every observed change because the subjects belong to the same study. The correction is to select the matrix for each subject’s actual interval (and, in a time-inhomogeneous model, its actual start and end times), then multiply the corresponding entries. A second frequent error is to use the wrong exponential duration: with total rate \(\alpha+\beta=0.25\) per month, a two-month interval has exponent \(-0.25(2)=-0.5\), not \(-0.3\).

Check Your Understanding

Try each question, then compare your reasoning with the solution shown.

  1. A subject is observed in state 1 at time 0 and state 0 at time 4. Under a time-homogeneous model, which transition probability is the likelihood contribution? Solution. It is \(P(4)_{1,0}\), using the four-unit elapsed interval and row 1, column 0 under the stated state ordering. The contribution is conditional on the initial state.
  2. For a two-state model with \(\alpha+\beta=0.25\) per month, what exponential factor is used for a two-month interval? Solution. The exponent is \(-(\alpha+\beta)u=-(0.25)(2)=-0.5\), so the factor is \(e^{-0.5}\approx0.6065\).
  3. Two independent subjects have conditional likelihood contributions 0.12 and 0.30. What is the full likelihood? Solution. Independence gives \(L=(0.12)(0.30)=0.0360\). This is the likelihood under the specified model, conditional on the initial states.
  4. Suppose an intermediate state \(k\) is unobserved between two intervals, and the start and final states are \(r\) and \(q\). How is the endpoint probability obtained? Solution. Sum over every state the subject could occupy at the intermediate time: \(P(s,u)_{rq}=\sum_k P(s,t)_{rk}P(t,u)_{kq}\). This includes the uncertainty about the unobserved state rather than treating it as observed.
Clinical Biostats