Last chance! 50% off unlimited learning
Sale ends in
Computes G-estimator
survivalG(
x,
data,
time = NULL,
Avalues = c(0, 1),
varname = NULL,
same.data = TRUE,
id = NULL
)
phreg or cifreg object
data frame for risk averaging
for estimate
values to compare for first covariate A
if given then averages for this variable, default is first variable
assumes that same data is used for fitting of survival model and averaging.
might be given to link to data to iid decomposition of survival data, must be coded as 1,2,..,
Thomas Scheike
data(bmt); bmt$time <- bmt$time+runif(408)*0.001
bmt$event <- (bmt$cause!=0)*1
dfactor(bmt) <- tcell.f~tcell
fg1 <- cifreg(Event(time,cause)~tcell.f+platelet+age,bmt,cause=1,
cox.prep=TRUE,propodds=NULL)
summary(survivalG(fg1,bmt,50))
ss <- phreg(Surv(time,event)~tcell.f+platelet+age,bmt)
summary(survivalG(ss,bmt,50))
sst <- survivalGtime(ss,bmt,n=50)
plot(sst,type=c("survival","risk","survival.ratio")[1])
Run the code above in your browser using DataLab