markovMSM: An R package for checking the Markov condition in multi-state survival data

Gustavo Soutinho and Luis Meira-Machado

2023-02-15

The purpose of the present vignette is to demonstrate the capacities of the R package markovMSM, as a tool to check the Markov condition. To this end, in the folowing example, we use data from a study with liver cirrhosis patients subjected to prednisone treatment (Andersen et al., 1993).

Application of the markovMSM for testing Markov assumption for more complex multi-state models

The proposed methods can also be used in reversible multi-state models such as those applied to the data set of liver cirrhosis patients who were included in a randomized clinical trial at several hospitals in Copenhagen between 1962 and 1974. The study aimed to evaluate whether a treatment based on prednisone prolongs survival for patients with cirrhosis Andersen et al. (1993). State 1 corresponds to ‘normal prothrombin level’, State 2 to ‘low (or abnormal) prothrombin level’, and State 3 to ‘dead’. The movement of the patients among these three states can be modeled using the reversible illness-death model shown in the next figure.

Note that the original data set prothr is already in the long format. Thus to obtain the probability values for transitions from State 2, the input command is the following:

library(markovMSM)

data("prothr")

set.seed(1234)

res8 <- AUC.test(data = prothr, from=2, to=3, type='global', replicas=2, 
                 limit=0.90, quantiles=c(.05, .10, .20, .30, 0.40))
#> This method is based on the calculation of 5 percentile times and can lead to a high execution time. 
#>           Partial execution times will be provided during execution.

round(res8$globalTest,5)
#>   2->1 2->2 2->3
#> 1    0    0    0

round(res8$localTests,4)
#>       s  2->1  2->2   2->3
#> 1  73.5 0.000 0.000 0.1542
#> 2 117.0 0.000 0.001 0.1336
#> 3 223.0 0.000 0.000 0.0000
#> 4 392.0 0.000 0.000 0.0000
#> 5 681.0 0.024 0.000 0.3727

Below we report, for the same data set prothr, the results for global and local tests proposed by Titman and Putter (2020), which are based on log-rank statistics, for transition 4 (between the states 2 and 3) and transition 3, (between the states 2 and 1), with times corresponding to the percentiles 5, 10, 20, 30, and 40 (the default percentile values also used by the AUC global test). The corresponding input commands are the following:

set.seed(1234)

times <- c(73.5, 117, 223, 392, 681)

res9 <- LR.test(data=prothr, times=times, from = 2, to = 3, replicas = 10)

res9$localTestLR
#> [1] 0.907 0.330 0.758 0.516 0.193

res9$globalTestLR
#> [1] 0.4

set.seed(1234)

res10 <- LR.test(data=prothr, times=times, from = 2, to = 1, replicas = 10)

res10$localTestLR
#> [1] 0.012 0.007 0.107 0.044 0.500

res10$globalTestLR
#> [1] 0

References