data(bmt,package="mets")
bmt$time <- bmt$time+runif(nrow(bmt))*0.01
bmt$id <- 1:nrow(bmt)
dcut(bmt) <- age.f~age
fg=cifregFG(Event(time,cause)~tcell,data=bmt,cause=1)
## computing tests for difference for CIF
pmt <- test_marginalMean(Event(time,cause)~strata(tcell)+cluster(id),data=bmt,cause=1,
death.code=1:2,death.code.prop=2,cens.code=0,time=40)
summary(pmt)
pmt$pepe.mori
pmt$RatioAUC
pmt$prop.test
## score test equialent to Gray's test but variance estimated differently
pmt$score.test
### age-groups
pmt <- test_marginalMean(Event(time,cause)~strata(age.f)+cluster(id),data=bmt,cause=1,
death.code=1:2,death.code.prop=2,cens.code=0)
summary(pmt)
## having a look at the cumulative incidences
cifs <- cif(Event(time,cause)~strata(age.f)+cluster(id),data=bmt,cause=1)
plot(cifs)
## recurrent events
data(hfactioncpx12)
hf <- hfactioncpx12
pmt <- test_marginalMean(Event(entry,time,status)~strata(treatment)+cluster(id),data=hf,
cause=1,death.code=2,cens.code=0)
summary(pmt)
Run the code above in your browser using DataLab