View source: R/ctDiscretiseData.R
ctDiscretiseData | R Documentation |
Extends and rounds timing information so equal intervals, according to specified timestep, are achieved. NA's are inserted in other columns as necessary, any columns specified by TDpredNames or TIpredNames have zeroes rather than NA's inserted (because some estimation routines do not tolerate NA's in covariates).
ctDiscretiseData(
dlong,
timestep,
timecol = "time",
idcol = "id",
TDpredNames = NULL,
TIpredNames = NULL
)
dlong |
Long format data |
timestep |
Positive real value to discretise |
timecol |
Name of column containing absolute (not intervals) time information. |
idcol |
Name of column containing subject id variable. |
TDpredNames |
Vector of column names of any time dependent predictors |
TIpredNames |
Vector of column names of any time independent predictors |
long format ctsem data.
long <- ctDiscretiseData(dlong=ctstantestdat, timestep = .1,
TDpredNames=c('TD1'),TIpredNames=c('TI1','TI2','TI3'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.