Description Usage Arguments Value Author(s) References Examples
Perform the Tayob and Murray two-sample recurrent events test described in Tayob, N. and Murray, S., 2014. Nonparametric tests of treatment effect based on combined endpoints for mortality and recurrent events. Biostatistics, 16(1), pp.73-83.
1 |
X |
vector containing observed time to terminating event |
delta |
vector that is 1 if terminating event is observed and 0 if patient is censored |
Z |
array of times to recurrent events. Number of columns corresponds to maximum number of recurrent events observed for a patient |
Group |
vector indicating which group each patient belongs to |
Tau |
upper limit of integration (cannot be greater than largest follow-up time, cannot be negative) |
t |
vector containing start times of follow-up windows chosen |
method |
Choose "average" for mean difference test or "area" for area between the RMRL curves |
A list
object which contains
Mean - vector containing sample estimates of overall tau-restricted mean survival in each group
Var - vector containing empirical variance of estimates of overall tau-restricted mean survival in each group
test_stat - test statistic of two-sample test
test_stat_p - p-value of two-sample test
Nabihah Tayob
Tayob, N. and Murray, S., 2014. Nonparametric tests of treatment effect based on combined endpoints for mortality and recurrent events. Biostatistics, 16(1), pp.73-83.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data("TMdata")
head(TMdata)
N=nrow(TMdata) #Number of subjects
X=TMdata$X
delta=TMdata$delta
table(delta)
Z=array(cbind(TMdata$Z1,TMdata$Z2,TMdata$Z3,TMdata$Z4,TMdata$Z5,TMdata$Z6),c(N,6))
A=max(X) #length of study
Treatment=as.numeric(TMdata$Group==1) #1 if Case and 0 if Control
table(Treatment,delta)
srec.average = TM(X = X, delta = delta, Z = Z, Group = Treatment, Tau = A/2,
t = seq(from = 0, to = A-A/2, by = A/4))
summary(srec.average)
srec.area = TM(X = X, delta = delta, Z = Z, Group = Treatment, Tau = A/2,
t = seq(from = 0, to = A-A/2, by = A/4), method = "area")
summary(srec.area)
plot(srec.area)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.