landmark | R Documentation |
Fit survival curves for landmark time points.
landmark(
object,
times = NULL,
col = 2L,
plot = TRUE,
plot.main = plot,
lr_test = TRUE,
adjust_start = FALSE,
single = FALSE,
...
)
object |
an object of class |
times |
a vector of landmark times |
col |
color for |
plot , plot.main |
logicals; if |
lr_test |
logical or numeric; if |
adjust_start |
logical; if |
single |
logical; if |
... |
additional arguments passed to |
A list with the following elements:
$table |
data frame with the sample size, chi-square
statistic, degrees of freedom, and p-value for the test (the type of test
can be controlled by using a numeric value for |
$survfit |
a list with each |
library('survival')
s <- survfit(Surv(time, status) ~ rx, colon)
l <- landmark(s, times = c(500, 1000, 2000), single = TRUE)
l$table
layout(matrix(c(1, 1, 2, 3), 2))
landmark(s, times = c(500, 2000), adjust_start = TRUE,
hr_text = TRUE, col.surv = 4:6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.