The Akritas survival estimator is a conditional nearest-neighbours approach to the more common Kaplan-Meier estimator. Common usage includes IPCW Survival models and measures, which do not assume that censoring is independent of the covariates.
akritas(
formula = NULL,
data = NULL,
reverse = FALSE,
time_variable = "time",
status_variable = "status",
x = NULL,
y = NULL,
...
)
(formula(1))
Object specifying the model fit, left-hand-side of formula should describe a survival::Surv()
object.
(data.frame(1))
Training data of data.frame
like object, internally is coerced with stats::model.matrix()
.
(logical(1))
If TRUE
fits estimator on censoring distribution, otherwise (default) survival distribution.
(character(1))
Alternative method to call the function. Name of the 'time' variable, required if formula
.
or x
and Y
not given.
(character(1))
Alternative method to call the function. Name of the 'status' variable, required if formula
or x
and Y
not given.
(data.frame(1))
Alternative method to call the function. Required if formula, time_variable
and
status_variable
not given. Data frame like object of features which is internally
coerced with model.matrix
.
([survival::Surv()])
Alternative method to call the function. Required if formula, time_variable
and
status_variable
not given. Survival outcome of right-censored observations.
ANY
Additional arguments, currently unused.
An object inheriting from class akritas
.
This implementation uses a fit/predict interface to allow estimation on unseen data after fitting on training data. This is achieved by fitting the empirical CDF on the training data and applying this to the new data.
Akritas, M. G. (1994). Nearest Neighbor Estimation of a Bivariate Distribution Under Random Censoring. Ann. Statist., 22(3), 1299–1327. doi:10.1214/aos/1176325630
if (requireNamespaces(c("distr6", "survival"))) {
library(survival)
akritas(Surv(time, status) ~ ., data = rats[1:10, ])
}
#>
#> Akritas Estimator
#>
#> Call:
#> akritas(formula = Surv(time, status) ~ ., data = rats[1:10, ])
#>
#> Response:
#> Surv(time, status)
#> Features:
#> {litter, rx, sexm}