Conduct K-adaptive partitioning algorithm for survival data
Usage
kaps(formula, data, K = 2:4, mindat, type = c("perm", "NULL"), ...)
Arguments
formula
Formula object with a response on the left hand side of the '~' operator, and the covariate terms on the right side. The response has to be a survival object with survival time and censoring status in the Surv function. For more details, see Formula page.
data
data frame with variables used in formula. It needs at least three variables including survival time, censoring status, and a covariate. Multivariate covariates can be supported with "+" sign.
K
number of subgroups used in the model fitting. The default value is 2:4 which means finding optimal subgroups ranging from 2 to 4.
type
Select a type of algorithm in order to find optimal number of subgroups. Two options are provided: perm and NULL. The perm chooses subgroups using permutation procudures, while the NULL passes a optimal selection algorithm.
mindat
the minimum number of observations at each subgroup. The default value is 5% of observations.
...
a list of tuning parameters with the class, "kapsOptions". For more details, see kaps.control.
Details
This function provides routines to conduct KAPS algorithm which is designed to classify cut-off values by the minimax-based rule.
Value
The function returns an object with class "kaps" with the following slots.
call:
evaluated function call
formula:
formula to be used in the model fitting
data:
data to be used in the model fitting
groupID:
information about the subgroup classification
index:
an index for the optimal subgroup among the candidate K
X:
test statistic with the worst pair of subgroups for the split set s
Z:
the overall test staitstic with K subgroups using the split set s
pair:
selected pair of subgroups
split.var:
selected covariate in the model fitting
split.pt:
selected set of cut-off points
mindat:
minimum number of observations at a subgroup
test.stat:
Bonferroni corrected p-value matrix. The first row means overall p-values and the second one denotes p-values of the worst-pair against K. The column in the matrix describes the order of K.
over.stat.sample:
adjusted overall test statistic by Bootstrapping
pair.stat.sample:
adjusted worst-pair test statistic by Bootstrapping
S-H Eo, S-M Hong and H Cho (2014). K-adaptive partitioning for survival data, submitted.
See Also
show, plot, predict, print and summary for the convenient use of kaps() kaps.control to control kaps() more detail count.mindat to calculate minimum subgroup sample size
Examples
## Not run:
data(toy)
f <- Surv(time, status) ~ meta
# Fit kaps algorithm without cross-validation.
# It means the step to finding optimal K is not entered.
fit1 <- kaps(f, data = toy, K = 3)
# show the object of kaps (it contains apss S4 class)
fit1
# plot Kaplan-Meire estimates
plot(fit1)
# Fit kaps algorithm for selection optimal number of subgropus.
fit2 <- kaps(f, data = toy, K= 2:4)
fit2
# plot outputs with subgroup selection
require(locfit) # for scatterplot smoothing
plot(fit2)
print(fit2,K=2)
summary(fit2)
summary(fit2,K=2)
# require(party)
# fit4 <- ctree(f, data = toy)
## End(Not run)