Description Usage Arguments Value Author(s) References Examples
This function is used to obtain a global test to check the Markov condition for each transition based on Cox Proportional hazard models.
1 |
data |
A data frame in long format containing the subject |
from |
The starting state of the transition to check the Markov condition. |
to |
The last state of the considered transition to check the Markov condition. |
An object with a list with the following outcomes:
p.value |
p-value of Cox global tests for each transition. |
from |
The starting state of the transition to check the Markov condition. |
to |
The last state of the considered transition to check the Markov condition. |
Gustavo Soutinho and Luis Meira-Machado.
Kay, R (1986). A Markov model for analyzing cancer markers and disease states in survival studies. Biometrics 42, 457-481. Soutinho G, Meira-Machado L (2021). Methods for checking the Markov condition in multi-state survival data. Computational Statistics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | data("colonMSM")
db_wide<-colonMSM
positions<-list(c(2, 3), c(3), c())
namesStates = c("Alive", "Rec", "Death")
tmat <-transMatMSM(positions, namesStates)
timesNames = c(NA, "time1","Stime")
status=c(NA, "event1","event")
trans = tmat
db_long<- prepMSM(data=db_wide, trans, timesNames, status)
res1<-PHM.test(data=db_long, from = 2, to=3)
res1
data("ebmt4")
db_wide <- ebmt4
positions=list(c(2, 3, 5, 6), c(4, 5, 6), c(4, 5, 6),
c(5, 6), c(6), c())
namesStates = c("Tx", "Rec", "AE", "Rec+AE", "Rel", "Death")
tmat <-transMatMSM(positions, namesStates)
timesNames = c(NA, "rec", "ae","recae", "rel", "srv")
status=c(NA, "rec.s", "ae.s", "recae.s","rel.s", "srv.s")
trans = tmat
db_long<- prepMSM(data=db_wide, trans, timesNames, status)
db_long$trans<-as.factor(db_long$trans)
res2<-PHM.test(data=db_long, from = 5, to=6)
res2$p.value
res2$from
res2$to
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.