Description Usage Arguments Value Author(s) See Also Examples
For a given age interval, each spell is cut to fit into the given age interval.
1 | age.window(dat, window, surv = c("enter", "exit", "event"))
|
dat |
Input data frame. Must contain survival data. |
window |
Vector of length two: The age interval. |
surv |
Vector of length three giving tha names of the central variables (a Surv object) in the dataframe 'dat'. |
A dataframe of the same form as the input, but 'cut' as
desired. Intervals exceeding window[2]
are cut there and
given event = 0 (censoring).
Göran Broström
1 2 3 | dat <- data.frame(enter = 0, exit = 5.731, event = 1, x = 2)
window <- c(2, 5.3)
dat.trim <- age.window(dat, window)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.