# \donttest{
set.seed(1234)
library(markovMSM)
data("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=colonMSM, trans, timesNames, status)
res<-LR.test(data=db_long, times=180, from = 2, to = 3, replicas = 1000)
res$globalTestLR
times<-c(73.5, 117, 223, 392, 681)
res2<-LR.test(data=prothr, times=times, from = 2, to = 3, replicas = 1000)
res2$localTestLR
res2$globalTestLR
res3<-LR.test(data=prothr, times=times, from = 2, to = 1, replicas = 1000)
res3$localTestLR
res3$globalTestLR
# }
Run the code above in your browser using DataLab