intlen | R Documentation |
This function calculates the optimal interval length for regularizing irregular longitudinal data based on the given subject ID and time columns.
intlen(data, subject_col, time_col)
data |
A data frame containing the irregular longitudinal data. |
subject_col |
The column name for unique subject IDs. |
time_col |
The column name for time points. |
The function calculates the optimal interval length based on the observed range of time points and the average number of measurements per subject.
Computed preferred interval length.
sdata <- sdata[1:100,]
intlen(sdata, "subject_id", "time")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.