surv_cluster: K-means clusterization for survival data

View source: R/surv_cluster.r

surv_clusterR Documentation

K-means clusterization for survival data

Description

Clusterization of survival data using 'kml' and 'survival'. This function identify clusters of data that behaves similarly with regard to the hazard function.

Usage

surv_cluster(
  aj,
  n_clusters,
  nbRedrawing = 1,
  parAlgo = kml::parALGO(saveFreq = Inf, distanceName = "canberra")
)

Arguments

aj

aj previously fitted model (using 'survival::survfit()').

n_clusters

number of clusters, as defined in 'kml::kml'.

parAlgo, nbRedrawing

argumentos passados para 'kml::kml'.

Value

a data.frame with the resulting groups.


vitorcapdeville/survtools documentation built on Feb. 12, 2023, 12:01 p.m.