survcifcurves | R Documentation |
Function for grouping survival curves based on the k-means or k-medians algorithm. It returns the number of groups and the assignment.
survcifcurves(
time,
status = NULL,
x,
max_time = NULL,
labels = NULL,
kvector = NULL,
kbin = 50,
weights = NULL,
nboot = 100,
algorithm = "kmeans",
bagging = FALSE,
nsamples = 5,
alpha = 0.05,
cluster = FALSE,
ncores = NULL,
seed = NULL,
multiple = FALSE,
multiple.method = "holm"
)
time |
Survival time. |
status |
Censoring indicator of the survival time of the process; 0 if the total time is censored and 1 otherwise. |
x |
Categorical variable indicating the population to which the observations belongs. |
max_time |
TODO |
labels |
TODO |
kvector |
A vector specifying the number of groups of curves to be checking. |
kbin |
Size of the grid over which the survival functions are to be estimated. |
weights |
TODO |
nboot |
Number of bootstrap repeats. |
algorithm |
A character string specifying which clustering algorithm is used,
i.e., k-means( |
bagging |
TODO |
nsamples |
TODO |
alpha |
Significance level of the testing procedure. Defaults to 0.05. |
cluster |
A logical value. If |
ncores |
An integer value specifying the number of cores to be used
in the parallelized procedure. If |
seed |
Seed to be used in the procedure. |
multiple |
A logical value. If |
multiple.method |
Correction method. See Details. |
The adjustment methods include the Bonferroni correction ("bonferroni") in which the p-values are multiplied by the number of comparisons. Less conservative corrections are also included by Holm (1979) ('holm'), Hochberg (1988) ('hochberg'), Hommel (1988) ('hommel'), Benjamini & Hochberg (1995) ('BH' or its alias 'fdr'), and Benjamini & Yekutieli (2001) ('BY'), respectively. A pass-through option ('none') is also included.
A list containing the following items:
table |
A data frame containing the null hypothesis tested, the values of the test statistic and the obtained pvalues. |
levels |
Original levels of the variable |
cluster |
A vector of integers (from 1:k) indicating the cluster to which each curve is allocated. |
centers |
An object containing the centroids (mean of the curves pertaining to the same group). |
curves |
An object containing the fitted curves for each population. |
Nora M. Villanueva and Marta Sestelo.
library(clustcurv)
library(survival)
library(condSURV)
data(veteran)
data(colonCS)
# Survival framework
res <- survclustcurves(time = veteran$time, status = veteran$status,
x = veteran$celltype, algorithm = 'kmeans', nboot = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.