discretize: Discretizing longitudinal data

Description Usage Arguments Details Value

Description

discretize breaks longitudinal data into equivalent time intervals using the last observed visit leading up to each new interval.

Usage

1
discretize(dataset, date, startdate, stopdate, outcome, range)

Arguments

dataset

Longitudinal data set to be discretized in data.frame format.

date

Covariate name for date variable.

startdate

Covariate name for the date started from for discretization.

stopdate

Covariate name for the date ending from for discretization.

outcome

Covariate name for whether an event or censoring occurs. Must be one of the following: death, ltfu, eofu, transfer

range

Length in days of each interval

Details

In addition to breaking longitudinal data into equally spaced time intervals, the code will return a data frame with the number of visits observed in the interval leading up to the current interval and within the current interval, the most recent visit observed leading up to the current interval, and the next visit expected.

Value

discretize returns a data.frame with the discretized data and variables corresponding to the visits conducted.


tranlm/lrecCompare documentation built on May 31, 2019, 7:44 p.m.