Description Usage Arguments Value Author(s) References Examples
Function LR.test performs the log-rank test described in Titman & Putter (2020).
1 2 3 4 5 6 7 8 9 10 11 12 13 |
db_long |
Multi-state data in |
times |
Grid of time points at which to compute the statistic. |
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. |
replicas |
Number of wild bootstrap replications to perform. |
formula |
Right-hand side of the formula. If NULL will fit with no covariates (formula="1" will also work), offset terms can also be specified. |
fn |
A list of summary functions to be applied to the individual zbar traces (or a list of lists) |
fn2 |
A list of summary functions to be applied to the overall chi-squared trace |
min_time |
The minimum time for calculating optimal weights |
other_weights |
Other (than optimal) weights can be specified here |
dist |
Distribution of wild bootstrap random weights, either "poisson" for centred Poisson (default), or "normal" for standard normal |
LR.test returns an object of class "markovMSM", which is a list with the following items:
localTestLR |
p-value of AUC local tests for each times and transitions. |
globalTestLR |
p-value of AUC global tests for each transition |
times |
Grid of time points at which to compute the statistic. |
replicas |
Number of wild bootstrap replications to perform. |
call |
Expression of the LR.test used. |
Gustavo Soutinho and Luis Meira-Machado.
Titman AC, Putter H (2020). General tests of the Markov property in multi-state models. Biostatistics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | set.seed(1234)
## Not run:
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(db_long=db_long, times=180, from = 2, to = 3, replicas = 1000)
res$globalTestLR
times<-c(73.5, 117, 223, 392, 681)
res2<-LR.test(db_long=prothr, times=times, from = 2, to = 3, replicas = 1000)
res2$localTestLR
res2$globalTestLR
res3<-LR.test(db_long=prothr, times=times, from = 2, to = 1, replicas = 1000)
res3$localTestLR
res3$globalTestLR
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.