Learn R Programming

ILRCM (version 0.2.0)

intlen: Preferred Interval Length for Regularizing Irregular Longitudinal Data

Description

This function calculates the optimal interval length for regularizing irregular longitudinal data based on the given subject ID and time columns.

Usage

intlen(data, subject_col, time_col)

Value

Computed preferred interval length.

Arguments

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.

Details

The function calculates the optimal interval length based on the observed range of time points and the average number of measurements per subject.

Examples

Run this code
sdata <- sdata[1:100,]
intlen(sdata, "subject_id", "time")

Run the code above in your browser using DataLab