Description Usage Arguments Value See Also Examples
Given interval breaks points, returns data frame with information on interval start time, interval end time, interval length and a interval factor variable (left open intervals). If object of class ped is provided, extracts unique interval information from object.
1 2 3 4 5 6 7 8 9 10 |
x |
A numeric vector of cut points in which the follow-up should be
partitioned in or object of class |
... |
Currently ignored. |
min.time |
Only intervals that have lower borders larger than this value will be included in the resulting data frame. |
A data frame containing the start and end times of the
intervals specified by the x
argument. Additionally the interval
length, interval mid-point and a factor variable of the intervals themselves.
split_data ped_info
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## create interval information from cut points
int_info(c(1, 2.3, 5))
## extract interval information used to create ped object
tdf <- data.frame(time=c(1, 2.3, 5), status=c(0, 1, 0))
ped <- split_data(Surv(time, status)~., data=tdf, id="id", max.end=TRUE)
int_info(ped)
## extract interval information of ped that was used to fit the model
data("veteran", package="survival")
vet_ped <- split_data(Surv(time, status)~age, data=veteran, cut=seq(0, 500, by=100))
vet_pam <- pamm(ped_status ~ s(tend, k=3), data=vet_ped)
int_info(vet_pam)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.