# 多状态分析

多状态分析是一种统计方法，用于建模个体如何在有限个不同状态之间随时间随机转移，估计每种可能转移的速率以及在以后各时点处于各状态的概率。它将生存分析——描述两个状态（存活与死亡）之间的移动——推广到具有多种事件类型、复发性事件或疾病发作等中间状况的病史。

| 关键事实 | 详情 |
|---|---|
| 模型对象 | 有限状态空间 \( S = \{1, \ldots, N\} \) 上的随机过程 \( X(t) \)，由转移概率 \( p_{hj}(s,t) = P(X(t)=j \mid X(s)=h, H_{s-}) \) 刻画 <sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> |
| 核心量 | 转移强度 \( \alpha_{hj}(t) \)，即从状态 \( h \) 移动到状态 \( j \) 的瞬时风险 <sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> |
| 非参数估计量 | Aalen–Johansen估计量，它将Kaplan–Meier估计量推广到时间非齐次马尔可夫模型的转移概率矩阵 <sup>[2](https://ideas.repec.org/a/eee/ecosta/v25y2023icp110-124.html)</sup> |
| 关键假设 | 马尔可夫性；只有当过程为马尔可夫过程时，Aalen–Johansen估计量对转移概率才是一致的 <sup>[3](https://ideas.repec.org/a/spr/compst/v37y2022i2d10.1007_s00180-021-01139-7.html)</sup> |
| 典型结构 | 竞争风险模型和疾病-死亡模型，二者均为一般框架的特例 <sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup>, <sup>[4](https://journals.sagepub.com/doi/10.1191/0962280202sm281ra)</sup> |
| 主要软件 | R包mstate、msm、etm、TPmsm和survival，以及Stata中的多状态功能 <sup>[5](https://cran.r-project.org/web/packages/TPmsm/vignettes/TPmsm.pdf)</sup>, <sup>[6](https://www.stata.com/meeting/italy18/slides/italy18_Crowther.pdf)</sup> |

## 工作原理

多状态过程是取值于有限状态空间 \( S = \{1, \ldots, N\} \) 的随机过程。给定过程截至时刻 \( s \) 的历史 \( H_{s-} \)，其行为由转移概率 \( p_{hj}(s,t) = P(X(t)=j \mid X(s)=h, H_{s-}) \) 概括。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> 模型由转移强度定义，即单位时间内状态间移动的瞬时概率<sup>[7](http://www.ressources-actuarielles.net/EXT/ISFA/1226.nsf/d512ad5b22d73cc1c1257052003f1aed/5e6126caa6707918c1257a89003ab4a3/$FILE/ART%20-%20ANDERSEN%20AND%20KEIDING%20-%20%5B2002%5D.pdf)</sup>：

\[ \alpha_{hj}(t) = \lim_{\Delta t \to 0} \frac{p_{hj}(t,\, t+\Delta t)}{\Delta t} \]

这一强度定义隐含地假定模型是马尔可夫的，即转移到未来状态的概率仅取决于当前状态，而不取决于更早的历史。<sup>[8](https://scholarlypublications.universiteitleiden.nl/access/item%3A2873393/view)</sup> 在马尔可夫模型中，转移概率可通过求解正向Kolmogorov微分方程从强度中恢复。对于疾病-死亡模型，\( p_{11}(s,t) = e^{-(A_{12}(s,t) + A_{13}(s,t))} \) 且 \( p_{12}(s,t) = \int_s^t p_{11}(s,u)\,\alpha_{12}(u)\,p_{22}(u,t)\,du \)，其中 \( A_{hj} \) 表示累积转移风险。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> 在时间齐次马尔可夫模型中，每个转移概率仅依赖于 \( t - s \)，且Kolmogorov方程可通过强度矩阵的特征分解得到显式解。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> 在非参数情形下，转移概率用Aalen–Johansen估计量估计，该估计量将风险估计转化为状态占据概率和转移概率，并将Kaplan–Meier方法推广到具有有限个状态的模型 <sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup>,.<sup>[2](https://ideas.repec.org/a/eee/ecosta/v25y2023icp110-124.html)</sup>

## 操作步骤

第一步是建立转移矩阵，它规定哪些直接转移是可能的（标为NA的条目为不可能），并为各转移分配编号以便后续引用。<sup>[9](https://hputter.r-universe.dev/mstate/doc/Tutorial.pdf)</sup> 对于非参数估计，在每个唯一事件时间构造一个转移矩阵 \( T(t) \)，其元素 \( \lambda_{ij}(t) \) 为在时刻 \( t \) 紧前处于状态 \( i \) 的受试者中，在时刻 \( t \) 从状态 \( i \) 转移到状态 \( j \) 的比例。<sup>[10](https://cran.r-project.org/web/packages/survival/vignettes/compete.pdf)</sup> 对于回归，用coxph()拟合一个按转移分层、每个转移有各自基线风险的Cox模型；其输出传递给mstate的msfit()，由后者估计转移风险及其相关的（协）方差。<sup>[8](https://scholarlypublications.universiteitleiden.nl/access/item%3A2873393/view)</sup> 累积风险 \( A_{gh}(t) \) 在独立删失下用Nelson–Aalen估计量估计。<sup>[8](https://scholarlypublications.universiteitleiden.nl/access/item%3A2873393/view)</sup> 软件方面涵盖R包mstate（数据准备、风险估计、Aalen–Johansen预测）、msm（对任意时间观测的纵向数据拟合连续时间马尔可夫模型和隐马尔可夫模型，速率和误分类概率上可带协变量）、etm（带Greenwood型协方差估计量的Aalen–Johansen概率）、TPmsm（三状态模型的非参数和半参数转移概率估计量）以及survival <sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup>, <sup>[5](https://cran.r-project.org/web/packages/TPmsm/vignettes/TPmsm.pdf)</sup>, <sup>[11](https://hputter.r-universe.dev/mstate/doc/manual.html)</sup>；Stata提供了建立在相同状态空间记法之上的类似多状态框架。<sup>[6](https://www.stata.com/meeting/italy18/slides/italy18_Crowther.pdf)</sup>

## 起源

多状态模型源于生命史数据的计数过程模型，1985年的一篇综述对此作了梳理，涵盖计数过程强度的非参数估计与检验、核平滑、参数推断，以及包括针对删失生存数据的Cox回归推广在内的回归技术。<sup>[12](https://www.mn.uio.no/math/english/research/projects/focustat/publications_2/andersen_borgan_plusnils_sjs1985.pdf)</sup> Per Kragh Andersen和Niels Keiding于2002年在《医学研究中的统计方法》上给出了通过多状态模型进行事件史分析的介绍，示例包括两状态生存模型、竞争风险和疾病-死亡模型，以及骨髓移植模型。<sup>[7](http://www.ressources-actuarielles.net/EXT/ISFA/1226.nsf/d512ad5b22d73cc1c1257052003f1aed/5e6126caa6707918c1257a89003ab4a3/$FILE/ART%20-%20ANDERSEN%20AND%20KEIDING%20-%20%5B2002%5D.pdf)</sup> 竞争风险模型在同一期刊系列中被明确处理为多状态模型的特例，并与潜在失效时间方法进行了对比。<sup>[4](https://journals.sagepub.com/doi/10.1191/0962280202sm281ra)</sup> 在软件方面，用于经验转移矩阵的etm包由Arthur Allignol、Martin Schumacher和Jan Beyersmann于2011年创建。<sup>[5](https://cran.r-project.org/web/packages/TPmsm/vignettes/TPmsm.pdf)</sup>

## 变体

**时间齐次马尔可夫模型**假定转移强度恒定，因此每个转移概率仅依赖于经过的时间 \( t - s \)。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> **一般马尔可夫模型**让强度依赖于时间和协变量，但不依赖于更深层的历史。**半马尔可夫模型**让未来演化还依赖于进入当前状态 \( h \) 的进入时间 \( t_h \)，强度形式为 \( \alpha_{hj}(t,\, t - t_h) \) <sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup>；它们允许两种参数化，一种基于带嵌入马尔可夫链的逗留时间分布，另一种基于强度转移函数，后者允许将似然分解为参数更少的两状态似然。<sup>[13](https://www.degruyterbrill.com/document/doi/10.1515/ijb-2020-0083/html?lang=de)</sup> 在疾病-死亡模型（也称失能模型）中，个体起始健康，可能患病，并可能从任一状态死亡；半马尔可夫时钟重置设定将健康状态的逗留时间作为健康到疾病转移的协变量，从而得到非齐次半马尔可夫模型 <sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup>,.<sup>[14](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0123489)</sup> 在马尔可夫模型拟合不佳之处，马尔可夫扩展模型可以捕捉短期或长期性质的依赖关系 <sup>[15](https://link.springer.com/article/10.1023/A:1009672031531)</sup>，隐马尔可夫多状态模型则处理带有误分类的观测状态。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> 对于带纵向数据的疾病进展多状态模型，也有人提出了通过Kolmogorov–Chapman前向方程进行贝叶斯估计。<sup>[16](https://journals.sagepub.com/doi/10.1177/0962280221997507)</sup>

## 应用

多状态模型已应用于大型疾病队列和登记数据，主要用于预测患者预后，拟合它们的一般方法和软件均已具备。<sup>[17](https://onlinelibrary.wiley.com/doi/10.1002/sim.8882)</sup> 在医学中，疾病-死亡模型被广泛用于研究疾病发病率和死亡率，竞争风险模型将简单生存分析推广到多种死因。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> 近期工作将隐多状态模型应用于多病共存轨迹，对包括暂态健康-生存状态和死亡在内的离散健康状态之间的移动进行建模 <sup>[18](https://www.nature.com/articles/s41598-026-62471-w)</sup>，并从估计的转移速率推导出心脏病病程的汇总指标，如多病共存调整生命年（MALY）和疾病路径。<sup>[19](https://link.springer.com/article/10.1186/s12874-026-02798-0)</sup> ebmstate是一个疾病进展建模包，它使用卷积方法和快速傅里叶变换计算时钟前向Cox模型的状态占据概率。<sup>[20](https://journal.r-project.org/articles/RJ-2024-002/RJ-2024-002.pdf)</sup>

## 局限性与替代方法

右删失下的有效推断需要独立右删失条件，即在此类删失后观测到的样本对无删失总体具有代表性；右删失、左截断以及来自间歇观测的区间删失在构造似然时都需要特别处理 <sup>[7](http://www.ressources-actuarielles.net/EXT/ISFA/1226.nsf/d512ad5b22d73cc1c1257052003f1aed/5e6126caa6707918c1257a89003ab4a3/$FILE/ART%20-%20ANDERSEN%20AND%20KEIDING%20-%20%5B2002%5D.pdf)</sup>,.<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)</sup> 马尔可夫假设是严格的，可能无法令人满意地拟合实际数据。<sup>[21](https://link.springer.com/article/10.1007/s10985-022-09560-w)</sup> 当该假设成立时，Aalen–Johansen估计量对转移概率是一致的；当它不成立时，这种一致性不再保持 <sup>[3](https://ideas.repec.org/a/spr/compst/v37y2022i2d10.1007_s00180-021-01139-7.html)</sup>,.<sup>[22](https://onlinelibrary.wiley.com/doi/10.1111/biom.12288)</sup> 该假设通常通过纳入依赖于历史的协变量来检验，检验也可基于不依赖马尔可夫假设的转移概率地标估计量，通过度量它们与马尔可夫估计量的差异来构造。<sup>[3](https://ideas.repec.org/a/spr/compst/v37y2022i2d10.1007_s00180-021-01139-7.html)</sup> 针对疾病-死亡模型已提出若干非马尔可夫估计量，近期文献已证明它们优于Aalen–Johansen估计量 <sup>[3](https://ideas.repec.org/a/spr/compst/v37y2022i2d10.1007_s00180-021-01139-7.html)</sup>, <sup>[22](https://onlinelibrary.wiley.com/doi/10.1111/biom.12288)</sup>，并且地标法和基于伪观测的回归作为非马尔可夫模型的推断方法也得到了综述。<sup>[21](https://link.springer.com/article/10.1007/s10985-022-09560-w)</sup> 竞争风险既可在多状态框架内分析，也可通过潜在失效时间方法分析，两者性质不同；多状态处理还阐明了竞争风险与右删失之间的关系。<sup>[4](https://journals.sagepub.com/doi/10.1191/0962280202sm281ra)</sup> 就估计本身而言，使用Kolmogorov–Chapman前向方程的贝叶斯方法为似然方法和非参数方法提供了替代。<sup>[16](https://journals.sagepub.com/doi/10.1177/0962280221997507)</sup> 该框架的灵活性——在纵向模型中描述单个个体一种以上的可能事件时间结局——正是它区别于单一标准生存曲线之处。<sup>[16](https://journals.sagepub.com/doi/10.1177/0962280221997507)</sup>

## References

1. [Multi-state models for the analysis of time-to-event data (Meira-Machado et al.)](https://pmc.ncbi.nlm.nih.gov/articles/PMC2692556/)
2. [Statistical inference for state occupation and transition probabilities in non-Markov multi-state models subject to both random left-truncation and right-censoring](https://ideas.repec.org/a/eee/ecosta/v25y2023icp110-124.html)
3. [Methods for checking the Markov condition in multi-state survival data](https://ideas.repec.org/a/spr/compst/v37y2022i2d10.1007_s00180-021-01139-7.html)
4. [Competing risks as a multi-state model](https://journals.sagepub.com/doi/10.1191/0962280202sm281ra)
5. [TPmsm: Estimation of the Transition Probabilities in 3-State Models](https://cran.r-project.org/web/packages/TPmsm/vignettes/TPmsm.pdf)
6. [Multi-state survival analysis in Stata](https://www.stata.com/meeting/italy18/slides/italy18_Crowther.pdf)
7. [Multi-state models for event history analysis (Andersen & Keiding, 2002)](http://www.ressources-actuarielles.net/EXT/ISFA/1226.nsf/d512ad5b22d73cc1c1257052003f1aed/5e6126caa6707918c1257a89003ab4a3/$FILE/ART%20-%20ANDERSEN%20AND%20KEIDING%20-%20%5B2002%5D.pdf)
8. [Multi-state analysis (Leiden University, mstate-related text)](https://scholarlypublications.universiteitleiden.nl/access/item%3A2873393/view)
9. [Tutorial in biostatistics: Competing risks and multi-state models (mstate tutorial)](https://hputter.r-universe.dev/mstate/doc/Tutorial.pdf)
10. [Multi-state models and competing risks (survival package vignette)](https://cran.r-project.org/web/packages/survival/vignettes/compete.pdf)
11. [Package 'mstate' reference manual](https://hputter.r-universe.dev/mstate/doc/manual.html)
12. [Counting Process Models for Life History Data: A Review [with Discussion and Reply]](https://www.mn.uio.no/math/english/research/projects/focustat/publications_2/andersen_borgan_plusnils_sjs1985.pdf)
13. [Estimation of semi-Markov multi-state models: a comparison of approaches](https://www.degruyterbrill.com/document/doi/10.1515/ijb-2020-0083/html?lang=de)
14. [A Systematic Model Specification Procedure for an Illness-Death Model without Recovery | PLOS One](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0123489)
15. [Multi-state Models: A Review | Lifetime Data Analysis](https://link.springer.com/article/10.1023/A:1009672031531)
16. [A review of multistate modelling approaches in monitoring disease progression: Bayesian estimation using the Kolmogorov-Chapman forward equations](https://journals.sagepub.com/doi/10.1177/0962280221997507)
17. [Power and sample size for multistate model analysis of longitudinal discrete outcomes in disease prevention trials](https://onlinelibrary.wiley.com/doi/10.1002/sim.8882)
18. [Hidden multistate models to study multimorbidity trajectories](https://www.nature.com/articles/s41598-026-62471-w)
19. [Summary measures derived from a multi-state modeling framework to characterize the course of heart disease](https://link.springer.com/article/10.1186/s12874-026-02798-0)
20. [ebmstate: An R Package For Disease Progression Modelling](https://journal.r-project.org/articles/RJ-2024-002/RJ-2024-002.pdf)
21. [Inference for transition probabilities in non-Markov multi-state models (Lifetime Data Analysis, 2022)](https://link.springer.com/article/10.1007/s10985-022-09560-w)
22. [Nonparametric estimation of transition probabilities in the non-Markov illness-death model: A comparative study](https://onlinelibrary.wiley.com/doi/10.1111/biom.12288)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Stochastic processes › Markov chains and processes › Continuous-time Markov processes

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/multistate-analysis

English original: https://www.edgepedia.org/multistate-analysis
