| survCOND {condSURV} | R Documentation |
Provides estimates for the conditional survival probabilities based on Kaplan-Meier weighted estimators, the Landmark approaches and Inverse probability of censoring weighted.
survCOND( formula, x, y, lower.tail = FALSE, method = "LDM", presmooth = FALSE, conf = TRUE, n.boot = 200, data, conf.level = 0.95, z.value, bw = "dpik", window = "gaussian", method.weights = "NW", cluster = FALSE, ncores = NULL, na.rm = TRUE )
formula |
A formula object, which must have a |
x |
Time or vector of times for the condional event(s). |
y |
The total time for obtaining estimates for the conditional survival probabilities. |
lower.tail |
vector of logical values with the same size as 'x'. If 'x' has dimension one and if lower.tail = FALSE (default), probabilities are P(T > y|T1 > x) otherwise, P(T > y|T1 <= x). If the conditional event is 2-dimensional, then, for example, given x = c(x1, x2) and lower.tail = c(TRUE, FALSE) must be used to obtain probabilities P(T > y|T1 <= x1, T2 > x2). Multi-dimensional conditional events are introduced similarly. |
method |
The method used to compute the conditional survival function. Possible options are "LDM" and "KMW". Defaults to "LDM". |
presmooth |
A logical value. If |
conf |
Provides pointwise confidence bands. Defaults to TRUE. |
n.boot |
The number of bootstrap samples. Defaults to 200 samples. |
data |
A data frame in which to interpret the variables named in the
|
conf.level |
Level of confidence. Defaults to 0.95 (corresponding to 95%). |
z.value |
The value of the covariate on the right hand side of formula at which the conditional survival probabilities are computed. For quantitative covariates, i.e. of class integer and numeric. |
bw |
A single numeric value to compute a kernel density bandwidth. Use "dpik" for the KernSmooth package based selector or "np" for the 'npudensbw' function of the np package. |
window |
A character string specifying the desired kernel. See details below for possible options. Defaults to "gaussian" where the gaussian density kernel will be used. |
method.weights |
A character string specifying the desired weights method. Possible options are "NW" for the Nadaraya-Watson weights and "LL" for local linear weights. Defaults to "NW". |
cluster |
A logical value. If |
ncores |
An integer value specifying the number of cores to be used in
the parallelized procedure. If |
na.rm |
A logical value indicating whether NA values should be stripped in the computation. |
Possible options for argument window are "gaussian", "epanechnikov", "tricube", "boxcar", "triangular", "quartic" or "cosine".
An object of class "survCS" and one of the following four classes: "KMW", "LMD", "PLDM" and "IPCW". Objects are implemented as a list with elements:
est |
data.frame with estimates of the conditional probabilities. |
estimate |
Estimates of the conditional survival probability. |
LCI |
The lower conditional survival probabilities of the interval. |
UCI |
The upper conditional survival probabilities of the interval. |
conf.level |
Level of confidence. |
y |
The total time for obtaining the estimates of the conditional survival probabilities. |
x |
The first time for obtaining the estimates of the conditional survival probabilities. |
Nlevels |
The number of levels of the covariate. Provides important information when the covariate at the right hand side of formula is of class factor. |
conf |
logical; if FALSE (default) the pointwise confidence bands are not given. |
callp |
The expression of the estimated probability. |
levels |
The levels of the qualitative covariate (if it is of class factor) on the right hand side of formula. |
Luis Meira-Machado and Marta Sestelo
L. Meira-Machado, M. Sestelo, and A. Goncalves (2016). Nonparametric estimation of the survival function for ordered multivariate failure time data: a comparative study. Biometrical Journal, 58(3), 623–634.
fit <- survCOND(survCS(time1, event1, Stime, event) ~ 1, x = 365, y = 730, data = colonCS, method = "KMW", conf = FALSE) fit1 <- survCOND(survCS(time1, event1, Stime, event) ~ 1, x = 365, data = colonCS, method = "LDM", conf = FALSE) fit2 <- survCOND(survCS(time1, event1, Stime, event) ~ 1, x = 365, data = colonCS, method = "LDM", lower.tail = TRUE, conf = FALSE) fit3 <- survCOND(survCS(time1, event1, Stime, event) ~ 1, x = 365, y = c(730, 1095, 1460), data = colonCS, method = "LDM", presmooth = TRUE, lower.tail = TRUE, conf = TRUE, n.boot = 100, conf.level = 0.95, cluster = FALSE) fit4 <- survCOND(survCS(time1, event1, Stime, event) ~ rx, x = 365, data = colonCS, method = "LDM", conf = FALSE) fit5 <- survCOND(survCS(time1, event1, Stime, event) ~ factor(sex), x = 365, data = colonCS, method = "LDM", conf = FALSE) ## Not run: fit6 <- survCOND(survCS(time1, event1, Stime, event) ~ age, x = 365, y = 730, z.value = 48, data = colonCS, conf = TRUE) ## End(Not run)