View source: R/utils-survival.R
observed_vs_expected_mortality | R Documentation |
This function creates a table to compare the observed and the expected mortality.
observed_vs_expected_mortality(x, f, time, expected)
x |
|
f |
|
time |
|
expected |
|
data.frame
, with observed/expected mortality rates and events.
sv <- Surv(1:8, c(0, 1, 1, 0, 1, 1, 1, 0))
f <- factor(rep(c("a", "c"), 4), levels = c("a", "b", "c"))
observed_vs_expected_mortality(sv, f, time = 3, expected = c(0.5, 0.3, 0.2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.