survivalG | R Documentation |
Computes G-estimator
\hat S(t,A=a) = n^{-1} \sum_i \hat S(t,A=a,Z_i)
for the Cox model based on phreg og the Fine-Gray model based on the cifreg function. Gives influence functions of these risk estimates and SE's are based on these. If first covariate is a factor then all contrast are computed, and if continuous then considered covariate values are given by Avalues.
survivalG(
x,
data,
time = NULL,
Avalues = c(0, 1),
varname = NULL,
same.data = TRUE,
id = NULL
)
x |
phreg or cifreg object |
data |
data frame for risk averaging |
time |
for estimate |
Avalues |
values to compare for first covariate A |
varname |
if given then averages for this variable, default is first variable |
same.data |
assumes that same data is used for fitting of survival model and averaging. |
id |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.