Usage
prepare_data(x, y, col.id = NULL, col.status = NULL, col.age = NULL,
col.age.event = NULL, covariates = NULL, interval = 1,
verbose = FALSE)
Arguments
x
A path to the table with follow-up oservations (longitudinal study). Formats: csv, sas7bdat
y
A path to the table with vital statistics (mortality). File formats: csv, sas7bdat
col.id
A name of column containing subject ID.
This ID should be the same in both longdat and vitstat tables.
If not provided, the first column in the x and y will be used by default.
col.status
A name of the column containing status variable (0/1 which indicate alive/dead).
If not provided - then the column #2 from the vital statistics dataset will be used.
col.age
A name of age column (also called 't1').
If not provided then the 3rd column from the longitudinal dataset (x) will be used.
col.age.event
A name of 'event' column.
The event column indicates a time when the even occured (e.g. system failure).
If not provided then the 3rd column from the vital statistics dataset will be used.
covariates
A list of covariates.
If covariates not provided, then all columns from longitudinal table having index > 3 will be used as covariates.
interval
A number of breaks between observations for discrete model. Default = 1 unit of time.
verbose
A verbosing output indicator. Default=FALSE.