to_id {HQM} | R Documentation |
Creates a data frame with only one entry per individual from a data frame with time dependent data. The resulting data frame focusses on the event time and the last observed marker value.
to_id(data_set)
data_set |
A data frame of time dependent data points. Missing values are allowed. |
The function to_id
uses a data frame of time dependent marker data to create a smaller data frame with only one entry per individual, the last observed marker value and the event time. Note that the column indicating the individuals must have the name id
. Note also that this data frame is similar to pbc2.id
from the JM
package with the difference that the last observed marker value instead of the first one is captured.
A data frame with only one entry per individual.
data_set.id = to_id(pbc2)