Skip to contents

pre-process data into long and wide formats that fit functions in this R package

Usage

PreprocessData(dat = dat)

Arguments

dat

a data frame containing the data in the model

Value

A list containing the following components:

id_wideA vector of subjects ID in wide format
dA vector of observed recurrent events for subjects of interest
ZA vector of time-independent corvariates in wide format
censor_wideA vector of censoring time (longest follow up time) in wide format
id_longA vector of subjects ID in long format
time_longA vector of long format time for events (excluding censoring time)
censor_longA vector of censoring time (longest follow up time) in long format
Z_longA vector of time-independent corvariates in long format