rmest {lrstat} | R Documentation |
Estimate of restricted mean survival time
Description
Obtains the estimate of restricted means survival time for each stratum.
Usage
rmest(
data,
rep = "rep",
stratum = "stratum",
time = "time",
event = "event",
milestone = NA_real_,
confint = 0.95,
biascorrection = 0L
)
Arguments
data |
The input data frame that contains the following variables:
|
rep |
The name of the replication variable in the input data. |
stratum |
The name of the stratum variable in the input data. |
time |
The name of the time variable in the input data. |
event |
The name of the event variable in the input data. |
milestone |
The milestone time at which to calculate the restricted mean survival time. |
confint |
The level of the two-sided confidence interval for the survival probabilities. Defaults to 0.95. |
biascorrection |
Whether to apply bias correction for the variance estimate. Defaults to no bias correction. |
Value
A data frame with the following variables:
-
rep
: The replication. -
stratum
: The stratum variable. -
size
: The number of subjects in the stratum. -
milestone
: The milestone time relative to randomization. -
rmst
: The estimate of restricted mean survival time. -
stderr
: The standard error of the estimated rmst. -
lower
: The lower bound of confidence interval if requested. -
upper
: The upper bound of confidence interval if requested. -
confint
: The level of confidence interval if requested. -
biascorrection
: Whether to apply bias correction for the variance estimate.
Author(s)
Kaifeng Lu, kaifenglu@gmail.com
Examples
rmest(data = aml, stratum = "x",
time = "time", event = "status", milestone = 24)