SLCARE requires the input datset have a specific format.
We will illustrate the format with the SLCARE_simdat from
the SLCARE package.
library(SLCARE)
packageVersion("SLCARE")
#> [1] '1.0.0'
data("SLCARE_simdat", package = "SLCARE")
head(SLCARE_simdat)
#> ID time event x1 x2
#> 1 UOM054 65 1 0 0.5555556
#> 2 UOM054 940 1 0 0.5555556
#> 3 UOM054 2420 1 0 0.5555556
#> 4 UOM054 2475 1 0 0.5555556
#> 5 UOM054 2650 1 0 0.5555556
#> 6 UOM054 3830 1 0 0.5555556Dataset SLCARE_simdat consists of 5 columns. We can
devide the 5 columns into 4 parts:
- Column 1
ID: Subjects identification - Column 2
time: Time for recurrent event and censoring time (which usually represent the longest follow up time) - Column 3
event: Recurrent event indicator. A value of1represents the recurrent event is recorded; a value of0represents censoring. - Columns 4-5
x1andx2: time independent corvariates.
Input datset should have the same format as
SLCARE_simdat. Specifically, column 1-3 must be
ID, time and event, and they must
in the same order. Input datset can have as many corvariates as you
need. They should be placed from column 4 which locates after
ID, time and event.