meanimp {asmbPLS} | R Documentation |
In this approach, \mu
can be computed using the familiar sample mean
formula provided the censored values are imputed.
meanimp(survival.data, round = FALSE)
survival.data |
A matrix of two columns with the first column indicates the survival time and the second column indicates the event indicator (1 and 0, where 1 indicates observed event and 0 indicates unobserved event). |
round |
Whether survival time should be rounded, default = FALSE. |
meanimp
returns a list containing the following components:
imputed_table |
A matrix containing the original survival data and the imputed time. |
KM_table |
Kaplan-Meier estimator of failure times. |
## Generate the survival data
data_test <- matrix(c(1, 1, 1, 2.5, 5, 7, 1, 1, 0, 1, 0, 1), ncol = 2)
## Mean imputation
meanimp(data_test, round = FALSE)