Obtains the Kaplan-Meier estimates of the survival curve.
kmest(
data,
rep = "",
stratum = "",
time = "time",
event = "event",
conftype = "log-log",
conflev = 0.95,
keep_censor = 0L
)
A data frame with the following variables:
size
: The number of subjects in the stratum.
time
: The event time.
nrisk
: The number of subjects at risk.
nevent
: The number of subjects having the event.
ncensor
: The number of censored subjects.
survival
: The Kaplan-Meier estimate of the survival probability.
stderr
: The standard error of the estimated survival
probability based on the Greendwood formula.
lower
: The lower bound of confidence interval if requested.
upper
: The upper bound of confidence interval if requested.
conflev
: The level of confidence interval if requested.
conftype
: The type of confidence interval if requested.
stratum
: The stratum.
rep
: The replication.
The input data frame that contains the following variables:
rep
: The replication for by-group processing.
stratum
: The stratum.
time
: The possibly right-censored survival time.
event
: The event indicator.
The name(s) of the replication variable(s) in the input data.
The name(s) of the stratum variable(s) in the input data.
The name of the time variable in the input data.
The name of the event variable in the input data.
The type of the confidence interval. One of "none", "plain", "log", "log-log" (the default), or "arcsin". The arcsin option bases the intervals on asin(sqrt(survival)).
The level of the two-sided confidence interval for the survival probabilities. Defaults to 0.95.
Whether to retain the censoring time in the output data frame.
Kaifeng Lu, kaifenglu@gmail.com
kmest(data = aml, stratum = "x", time = "time", event = "status")
Run the code above in your browser using DataLab