# NOT RUN {
library(clustcurv)
library(survival)
data(veteran)
# Survival: 2 groups k-means
s2 <- ksurvcurves(time = veteran$time, status = veteran$status,
x = veteran$celltype, k = 2, algorithm = "kmeans")
summary(s2)
# Regression: 2 groups k-means
r2 <- kregcurves(y = barnacle5$DW, x = barnacle5$RC,
z = barnacle5$F, k = 2, algorithm = "kmeans")
summary(r2)
# }
Run the code above in your browser using DataLab