Description Usage Arguments Value Author(s) See Also Examples
For a given time interval, each spell is cut to fit into the given calendar time interval.
1 | cal.window(dat, window, surv = c("enter", "exit", "event", "birthdate"))
|
dat |
Input data frame. Must contain survival data. |
window |
Vector of length two: The time interval. |
surv |
Vector of length four giving tha names of the central variables (an "extended" 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 4 | dat <- data.frame(enter = 0, exit = 5.731, event = 1,
birthdate = 1962.505, x = 2)
window <- c(1963, 1965)
dat.trim <- cal.window(dat, window)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.