Expected cycles before absorption from the fundamental matrix

Inverts I minus Q to obtain the fundamental matrix N, whose entry in row i and column j is the expected number of cycles spent in transient state j by a person starting in transient state i, counting the starting cycle. Multiplying N by a column of ones sums each row, giving the expected number of cycles before absorption from each starting state. With death as the only absorbing state, this is the undiscounted expected number of cycles alive.

Signature

t_abs = (I - Q)^(-1) * c
Inputs
InputsDefinitionUnit
ISquare matrix with 1 on the diagonal and 0 elsewhere, of the same size as Qno unit
QProbabilities of moving between transient states in one cycle, with rows for the starting state and columns for the destinationprobability per cycle
cVector with one entry equal to 1 for each transient stateno unit
Output
t_absColumn vector whose entry i is the expected number of cycles before absorption for a person starting in transient state icycles

Function

Absorbing Markov chain function

A state k is absorbing when p_kk = 1 and p_kj = 0 for every other state j, so no one who enters it can leave. Ordering the transient states first writes the transition matrix in canonical form, with Q the transitions among transient states, R the transitions from transient to absorbing states, a zero block and an identity block for the absorbing states. From Q and R the expected time before absorption and the probability of ending in each absorbing state follow without running the cohort trace s_(t+1) = s_t P.

Try this function

Implementations

  • Excel

    Expected cycles before absorption in Excel

    With the transient block in the named range TransientQ, Excel 365 returns the column t_abs as a dynamic array. MUNIT builds the identity matrix and SEQUENCE builds the column of ones.

    =MMULT(MINVERSE(MUNIT(ROWS(TransientQ))-TransientQ),SEQUENCE(ROWS(TransientQ),1,1,0))

Assumptions

  • Absorbing chain

    At least one state is absorbing and every transient state can reach an absorbing state, directly or through other states. Then Q raised to the power n tends to zero, the whole cohort is eventually absorbed and I minus Q can be inverted.

  • Time-homogeneous transition matrix

    Q is the same in every cycle. A model whose probabilities change with age or cycle, such as one using life-table background mortality, has no single fundamental matrix, and its expected time before absorption comes from summing the cohort trace.

  • Counting convention

    The starting cycle is counted, so the result equals the sum over all cycles of the proportion outside the absorbing states at the start of each cycle. It applies no half-cycle correction and no discounting.

Worked examples

  • Three-state Well, Sick and Dead model

    Using the article's matrix, 85% of Well stay Well, 10% become Sick and 5% die each cycle, and 80% of Sick stay Sick and 20% die. The transient block is Q = [[0.85,0.10],[0,0.80]], and the expected number of cycles before death is 10 from Well and 5 from Sick.

    Q = [[0.85,0.10],[0,0.80]]; I = [[1,0],[0,1]]; c = [1,1]; t_abs = [10,5]

Common errors

  • Including the absorbing state in Q

    If the Dead row and column are left in Q, I minus Q has a row of zeros and cannot be inverted; Excel MINVERSE returns #NUM!.

  • Reading t_abs as a corrected or discounted life expectancy

    t_abs counts every cycle begun alive in full. Applying a half-cycle correction to a cohort that starts alive and is fully absorbed reduces it by half a cycle, to 9.5 cycles from Well in the example, and discounting reduces it further.

  • Using a fundamental matrix with age-dependent mortality

    A lifetime model with background mortality rising by age has a different matrix in each cycle. Inverting the matrix of one cycle gives the life expectancy of a cohort whose risks never change.

Sources

  • Fundamental matrix and time to absorption

    Grinstead CM, Snell JL. Grinstead and Snell's Introduction to Probability. The CHANCE Project version of 4 July 2006, based on the 2nd edition published by the American Mathematical Society. Chapter 11 Markov Chains, section 11.2 Absorbing Markov Chains: Definition 11.1, canonical form, Theorem 11.3 (absorption has probability 1), Theorem 11.4 (N equals the inverse of I minus Q) and Theorem 11.5 (t = Nc).

    View source →

  • Matrix algebra evaluation of Markov models in medical decision making

    Sonnenberg FA, Beck JR. Markov models in medical decision making: a practical guide. Medical Decision Making. 1993;13(4):322-338. A Markov model may be evaluated by matrix algebra, as a cohort simulation or as a Monte Carlo simulation.

    View source →

Canonical Identity

Stable URI · Machine-readable · Resolvable · CC BY 4.0