intlen: Preferred Interval Length for Regularizing Irregular...

View source: R/intlen.R

intlenR Documentation

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)

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.

Value

Computed preferred interval length.

Examples

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


ILRCM documentation built on Aug. 12, 2025, 1:08 a.m.

Related to intlen in ILRCM...