split_data_multistate: Split data to obtain recurrent event data in PED format

View source: R/split-data.R

split_data_multistateR Documentation

Split data to obtain recurrent event data in PED format

Description

Currently, the input data must be in start-stop notation for each spell and contain a colum that indicates the spell (event number).

Usage

split_data_multistate(
  formula,
  data,
  transition = character(),
  cut = NULL,
  max_time = NULL,
  event = 1L,
  min_events = 1L,
  timescale = c("gap", "calendar"),
  ...
)

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. The left hand-side can be in start-stop-notation. This, however, is only used to create left-truncated data and does not support the full functionality.

data

Either an object inheriting from data frame or in case of time-dependent covariates a list of data frames (of length 2), 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.

transition

A character indicating the column in data that indicates the event/episode number for recurrent events.

cut

Split 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.

event

The value that encodes the occurrence of an event in the data set.

min_events

Minimum number of events for each event number.

timescale

Defines the timescale for the recurrent event data transformation. Defaults to "gaptime".

...

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

See Also

survSplit


adibender/pammtools documentation built on Feb. 27, 2024, 8:40 a.m.