Learn R Programming

kaps (version 1.0-0)

kaps: K-adaptive partitioning for survival data

Description

Conduct K-adaptive partitioning algorithm for survival data

Usage

kaps(formula, data, K = 2:4, mindat, type = c("perm", "NULL"), ...)

Arguments

formula
a 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

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
  • groups:candidate K used in the argument
  • results:a list of results about each K
  • Options:tuning parameters

Details

This function provides routines to conduct KAPS algorithm which is designed to classify cut-off values by the minimax-based rule.

References

SH 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

Run this code
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)

Run the code above in your browser using DataLab