pcoxsurvfit.pcoxtime | R Documentation |
Compute the predicted survivor and cumulative hazard function for a penalized Cox proportional hazard model.
## S3 method for class 'pcoxtime' pcoxsurvfit(fit, newdata, ...) ## S3 method for class 'pcoxtime' pcoxbasehaz(fit, centered = TRUE)
fit |
fitted |
newdata |
a data frame containing the variables appearing on the right hand side of |
... |
for future implementations |
centered |
if |
pcoxsurvfit
and pcoxbasehaz
functions produce survival curves and estimated cumulative hazard, respectively, for the fitted pcoxtime
model. They both return the estimated survival probability and the estimated cumulative hazard, which are both Breslow estimate.
The pcoxbasehaz
is an alias for pcoxsurvfit
which simply computed the predicted survival estimates (baseline).
If the newdata
argument is missing, the "average" survival or cumulative hazard estimates are produced with the predictor values equal to means of the data set. See survfit.coxph
for warning against this. If the newdata
is specified, then the returned object will contain a matrix of both survival and cumulative hazard estimates with each column for each row in the newdata
.
pcoxsurvfit
and pcoxbasehaz
return S3 objects of class pcoxsurvfit.pcoxtime
and pcoxbasehaz.pcoxtime
, respectively:
n |
number of observations used in the fit. |
events |
total number of events of interest in the fit. |
time |
time points defined by the risk set. |
n.risk |
the number of individuals at risk at time |
n.event |
the number of events that occur at time |
n.censor |
the number of subjects who exit the risk set, without an event, at time |
surv |
a vector or a matrix of estimated survival function. |
cumhaz, hazard |
a vector or a matrix of estimated cumulative hazard. |
call |
the call that produced the object. |
pcoxtime
, plot.pcoxsurvfit
data(heart, package="survival") lam <- 0.1 alp <- 0.8 pfit <- pcoxtime(Surv(start, stop, event) ~ age + year + surgery + transplant , data = heart , lambda = lam , alpha = alp ) # Survival estimate psurv <- pcoxsurvfit(pfit) print(psurv) # Baseline survival estimate bsurv <- pcoxbasehaz(pfit, centered = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.