| as_survmat | R Documentation |
Construct a survival matrix object
as_survmat(S, time, id = NULL, group = NULL)
S |
Numeric matrix of survival probabilities (rows = subjects, columns = time). |
time |
Numeric strictly increasing time grid with |
id |
Optional subject identifiers. Defaults to |
group |
Optional group labels with length |
An object of class "survmat".
time <- c(0, 1, 2)
S <- rbind(
c(1.0, 0.8, 0.6),
c(1.0, 0.7, 0.5)
)
x <- as_survmat(S, time, group = c("A", "B"))
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.