| summary.unsurv | R Documentation |
Summarize an unsurv model
## S3 method for class 'unsurv'
summary(object, ...)
object |
An object of class |
... |
Unused. |
An object of class "summary.unsurv" with elements:
K: number of clusters
silhouette_mean: mean silhouette width
size: cluster sizes
if (requireNamespace("cluster", quietly = TRUE)) {
set.seed(1)
times <- seq(0, 4, length.out = 20)
grp <- rep(1:2, each = 6)
rates <- c(0.2, 0.6)
S <- sapply(times, function(t) exp(-rates[grp] * t))
fit <- unsurv(S, times, K = 2)
summary(fit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.