Tutorials › Competing Risks and Multi-State Models › Time-Homogeneous and Time-Inhomogeneous Markov Models

States, Transitions and the Markov Assumption · Tutorial 257 of 699

Time-Homogeneous and Time-Inhomogeneous Markov Models

Learn to distinguish time-invariant conditional transition behavior from transitions that change with time, and to calculate state probabilities when transition matrices vary.

Intermediate 10 min read

What You'll Learn

  • Define time homogeneity for discrete-time and continuous-time Markov models.
  • Distinguish a changing state distribution from changing transition behavior.
  • Calculate multi-interval probabilities using transition matrices in the correct order.
  • Interpret a time-varying transition rate without confusing it with loss of the Markov property.
  • Identify practical diagnostics, limitations, and common interpretation errors.

Why Transition Behavior May Change Over Time

A Markov model describes how a process moves among states, such as being well, ill, or dead. The Markov property says that, conditional on the present state, the future does not additionally depend on the earlier state history. A separate question is whether the transition behavior from that present state stays the same over time. A person who is well at the start of follow-up might have a different probability of entering an illness state in the next month than a person who is well much later in follow-up.

The distinction matters because a single transition matrix summarizes behavior across time only when the model’s homogeneity assumption is appropriate. If transition behavior changes, calculations based on one constant matrix can misstate future state probabilities, even when the process is Markov. Thus, homogeneity is not another name for the Markov property: it is an additional restriction on how transition behavior may vary.

Definition: Let \(X(t)\) denote the state occupied at time \(t\), and define the transition probability \(p_{ij}(s,t)=P\{X(t)=j\mid X(s)=i\}\) for \(s\le t\). A Markov process is time-homogeneous if \(p_{ij}(s,t)\) depends on \(s\) and \(t\) only through the elapsed time \(t-s\), for every pair of states \(i,j\). It is time-inhomogeneous if these conditional transition probabilities can also depend on the time at which the interval begins.

In discrete time with equally spaced observations, homogeneity means the same one-step transition matrix applies at each step. In continuous time, a homogeneous process has the same transition behavior over intervals of the same duration, regardless of their location on the time axis. Homogeneity does not mean that transition probabilities are the same for intervals of different lengths: the chance of a transition over two years will generally differ from the chance over one year.

A homogeneous model can still have a state distribution that changes over time. For example, if more people accumulate in an absorbing state such as death, the proportion in that state increases even though the transition rules remain constant. Homogeneity concerns the conditional transitions given the current state, not whether the overall population composition is stable.

Transition Matrices and Composition Across Intervals

For a discrete-time model with a finite set of states, the transition matrix \(P_k\) for step \(k\) has entry \(p_{ij,k}=P\{X_k=j\mid X_{k-1}=i\}\). Each entry is a probability, so the entries are nonnegative and each row sums to one. Under homogeneity, \(P_k=P\) at every step. Under inhomogeneity, the matrix may change from step to step.

Use the row-vector convention: a row vector gives the probabilities of occupying each state, in the same order as the rows and columns of the transition matrices. If the distribution at the start is \(\boldsymbol{\pi}_0\), then after two intervals with matrices \(P_1\) and \(P_2\), it is \(\boldsymbol{\pi}_0P_1P_2\). The order records the actual sequence of intervals: first apply \(P_1\), then \(P_2\).

Key result: For a homogeneous discrete-time Markov model, the transition matrix over \(m\) steps is \(P^m\). For an inhomogeneous model, the transition matrix from the start through \(m\) successive intervals is \(P_1P_2\cdots P_m\). The Markov assumption is needed for this composition: given the state at an interval boundary, the next transition is governed by that interval’s matrix, without additional dependence on earlier states.

The composition rule follows by conditioning on the state at the boundary between intervals. For two intervals, the probability of starting in state \(i\) and ending in state \(j\) is the sum over every possible intermediate state \(k\) of the probability of reaching \(k\) and then moving from \(k\) to \(j\). In matrix notation, this is exactly the \((i,j)\) entry of \(P_1P_2\).

$$ P\{X_2=j\mid X_0=i\} =\sum_k P\{X_1=k\mid X_0=i\}P\{X_2=j\mid X_1=k\} =(P_1P_2)_{ij}. $$

When \(P_1=P_2=P\), the product reduces to \(P^2\). For more intervals, repeated conditioning gives the ordered product \(P_1P_2\cdots P_m\). This argument also explains why reversing the order of two different matrices generally gives the wrong answer: \(P_1P_2\) and \(P_2P_1\) need not be equal.

Worked Example: Two Steps Under a Homogeneous Model

Suppose a hypothetical cohort is classified quarterly as Well, Ill, or Dead. Assume that the state categories are mutually exclusive and exhaustive; Dead is absorbing; and, conditional on the current state, the next-quarter probabilities are the same in every quarter. The one-quarter matrix is

$$ P= \begin{pmatrix} 0.80&0.15&0.05\\ 0&0.70&0.30\\ 0&0&1 \end{pmatrix}. $$

Each row sums to one, the entries are nonnegative, and the zero entries encode transitions ruled out by this hypothetical model. These checks make the matrix a valid transition matrix. The assumption of the same matrix each quarter is the homogeneity assumption; the assumption that the next state depends on the current state rather than earlier states is the Markov assumption.

For a person Well at the start, the probability of being Well after two quarters is the Well-to-Well entry of \(P^2\), \(0.80(0.80)=0.640\). To be Ill after two quarters, the person can be Well then Ill, or Ill then Ill:

$$ 0.80(0.15)+0.15(0.70)=0.120+0.105=0.225. $$

To be Dead after two quarters, the three possible intermediate states contribute:

$$ 0.80(0.05)+0.15(0.30)+0.05(1) =0.040+0.045+0.050=0.135. $$

Thus, the first row of \(P^2\) is \((0.640,0.225,0.135)\), and it sums to one. Under the stated model, a person Well at the start has a 13.5% probability of being Dead two quarters later. This calculation depends on using the same transition matrix for both quarters.

Time-Inhomogeneous Models in Practice

Transition behavior can change with time for substantive reasons: treatment may become more effective after an initial period, disease risk may rise with duration, or a policy change may alter hospitalization patterns. A time-inhomogeneous Markov model allows the transition probabilities to vary while retaining the Markov condition that the present state summarizes the relevant past for predicting the future.

In continuous time, this distinction is often expressed through transition intensities. For distinct states \(i\) and \(j\), an intensity \(q_{ij}(t)\) describes the instantaneous rate of moving from \(i\) to \(j\) at time \(t\), conditional on being in \(i\) just before \(t\). In a homogeneous continuous-time model, these rates are constant over time; in an inhomogeneous model, they may vary with time. A time-varying rate does not, by itself, violate the Markov property.

Worked Example: Multiplying Different Quarterly Matrices

Consider a hypothetical model with states Stable, Flare, and Dead. Assume the states are mutually exclusive and exhaustive, the model is Markov at the quarterly observation times, and the transition probabilities may differ between the first and second quarters. Suppose

$$ P_1= \begin{pmatrix} 0.80&0.15&0.05\\ 0.10&0.70&0.20\\ 0&0&1 \end{pmatrix}, \qquad P_2= \begin{pmatrix} 0.70&0.25&0.05\\ 0.05&0.75&0.20\\ 0&0&1 \end{pmatrix}. $$

Both matrices have nonnegative entries and rows summing to one. Their different entries represent a model in which transition behavior changes between quarters. For someone Stable at the start, the probability of being Stable after two quarters is

$$ 0.80(0.70)+0.15(0.05)+0.05(0)=0.560+0.0075=0.5675. $$

The probability of being in Flare is \(0.80(0.25)+0.15(0.75)+0.05(0)=0.200+0.1125=0.3125\). The probability of being Dead is \(0.80(0.05)+0.15(0.20)+0.05(1)=0.040+0.030+0.050=0.120\). The results sum to \(0.5675+0.3125+0.120=1\). Therefore, the probability of being Dead after two quarters is 12.0% under this sequence of matrices.

The order is essential: the first-quarter probabilities are applied before the second-quarter probabilities, so the calculation uses \(P_1P_2\). In general, switching the matrices would describe a different sequence of transition conditions. A single matrix raised to the second power would also impose a constant transition pattern that these assumptions do not support.

Worked Example: A Time-Varying Transition Rate

Suppose, hypothetically, a person starts in state 0 and can move once to an absorbing event state 1. Assume a continuous-time Markov model with transition intensity \(0.10\) per year during the first year and \(0.30\) per year during the second year. The person has no other possible transition, and the rates are constant within each of these two intervals. This is time-inhomogeneous because the rate changes with calendar time, but it remains Markov under the stated model.

For a constant rate \(\lambda\) over an interval of length \(d\), the probability of no transition in that interval is \(\exp(-\lambda d)\). Thus, the first-year event probability, conditional on starting that year in state 0, is \(1-\exp(-0.10)=0.09516\), or about 9.52%. The second-year event probability conditional on still being in state 0 at the start of that year is \(1-\exp(-0.30)=0.2592\), or about 25.9%.

The probability of remaining in state 0 through both years is \(\exp(-0.10)\exp(-0.30)=\exp(-0.40)=0.6703\). Therefore, the probability of entering state 1 by two years is \(1-0.6703=0.3297\), or about 33.0%. The interval-specific probabilities differ, even though the Markov property holds. Treating the rate as constant at \(0.10\) per year would instead give \(1-\exp(-0.20)=0.1813\), a different two-year event probability and a poor representation of the stipulated rates.

Assessing the Homogeneity Assumption

Homogeneity is a modeling assumption, not something established merely by observing that the process is Markov. A practical check is to compare transition patterns across relevant time periods: for example, compare the observed transitions out of a state during early and later follow-up, while accounting for how many people were in that state and at risk of each transition. Large, systematic differences can indicate time variation. Small differences may simply reflect sampling variability, especially when few transitions are observed.

Before attributing differences to time, check that the state definitions and observation intervals are comparable. Changes in who is observed, how states are measured, treatment practice, or censoring can also produce different observed transition patterns. Sparse data can make a time-stratified comparison unstable. These checks are diagnostic rather than a guarantee that a constant-transition model is correct.

A common mistake is to conclude that a model must be homogeneous because the process satisfies the Markov property. These are separate claims: the Markov property concerns dependence on earlier state history after conditioning on the present state; homogeneity concerns whether transition behavior changes with time. Another mistake is to infer inhomogeneity just because the proportion in each state changes. A changing state distribution can arise under a homogeneous transition matrix, as the two-quarter calculation above illustrates.

If transition behavior clearly varies, one alternative is to use interval-specific transition matrices or time-varying transition rates. A homogeneous model is simpler and can summarize behavior compactly when its restriction is reasonable. More flexible time-specific models can represent changing behavior, but may require more data and produce less precise estimates. Neither approach removes the need to define states and to justify the Markov assumption. Also, a time-varying rate is not automatically evidence that time alone explains the change; relevant predictors or changes in the study process may need consideration.

Key takeaway: Time homogeneity means that conditional transition behavior is invariant to shifting an interval along the time axis, not that the state distribution is constant. A Markov model may be homogeneous or inhomogeneous; choose the transition representation to match the time pattern supported by the model and data.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A Markov model uses the same one-step transition matrix in every month. Is it homogeneous? What additional distinction should be kept in mind?
  2. For a three-interval inhomogeneous discrete-time model, write the matrix product for the transition distribution, using the row-vector convention.
  3. In the Stable/Flare/Dead example, why is the probability of being Dead calculated using all three possible states at the end of the first quarter?
  4. A population’s proportion in an absorbing state rises over time, but its transition matrix is constant. Does that alone show the model is inhomogeneous?

Solutions. (1) Yes, the same one-step matrix at every month defines discrete-time homogeneity. The Markov property and homogeneity are distinct assumptions; a model can satisfy one without the other. (2) The product is \(P_1P_2P_3\), in chronological order after the initial row distribution. (3) The person can be Stable, Flare, or Dead after the first quarter, and each of those intermediate states contributes to being Dead after the second. The contributions must be summed over all possible intermediate states. (4) No. An increasing proportion in an absorbing state can result from repeated application of a constant transition matrix. Homogeneity concerns conditional transition probabilities, not the marginal state distribution.

Clinical Biostats