| print.summary.unsurv | R Documentation |
Print a summary of an unsurv model
## S3 method for class 'summary.unsurv'
print(x, ...)
x |
An object of class |
... |
Unused. |
Invisibly returns x.
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)
s <- summary(fit)
print(s)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.