split_data: Function to transform data without time-dependent covariates...

Description Usage Arguments See Also Examples

View source: R/split-data.R

Description

Function to transform data without time-dependent covariates into piece-wise exponential data format

Usage

1
split_data(formula, data, cut = NULL, max_time = NULL, ...)

Arguments

formula

A two sided formula with a Surv object on the left-hand-side and covariate specification on the right-hand-side (RHS). The RHS can be an extended formula, which specifies how TDCs should be transformed using specials concurrent and cumulative.

data

Either an object inheriting from data frame or in case of time-dependent covariates a list of data frames, where the first data frame contains the time-to-event information and static covariates while the second (and potentially further data frames) contain information on time-dependent covariates and the times at which they have been observed.

cut

Break points, used to partition the follow up into intervals. If unspecified, all unique event times will be used.

max_time

If cut is unspecified, this will be the last possible event time. All event times after max_time will be administratively censored at max_time.

...

Further arguments passed to the data.frame method and eventually to survSplit

See Also

survSplit

Examples

1
2
3
4
5
6
data("veteran", package="survival")
head(veteran)
ped <- split_data(Surv(time, status)~trt + age, data=veteran,
   cut=c(0, 100, 400), id="id")
head(ped)
class(ped) # class ped (piece-wise exponential data)

adibender/ped documentation built on Dec. 16, 2019, 12:33 a.m.