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

Description Usage Arguments Value See Also Examples

Description

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

Usage

1
split_data(formula, data, cut = NULL, ..., max.end = FALSE)

Arguments

formula

a model formula

data

a data frame

cut

the vector of timepoints to cut at

...

Further arguments passed to survSplit

max.end

logical. Should the last interval span until the last observed censoring or event time (if larger than the largest specified cut point).

Value

A data frame class ped in piece-wise exponential data format.

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/pamm documentation built on May 14, 2019, 5:22 p.m.