irregclst1 {ILRCM}R Documentation

Convert Irregular Longitudinal Data to Regular Intervals and Perform Clustering using including Repeated Responses (IRS) method

Description

This function takes irregular longitudinal data and converts it into regularly spaced intervals using linear interpolation. It then computes the relative change in the response variable between consecutive time points, clusters the data based on these changes, and provides various visualizations of the process.

Usage

irregclst1(data, subject_id_col, time_col, response_col, rel, interval_length)

Arguments

data

A data frame containing the irregular longitudinal data.

subject_id_col

A character string representing the name of the column with the subject IDs.

time_col

A character string representing the name of the column with time values.

response_col

A character string representing the name of the column with the response values.

rel

Relative change method such as SRC, CARC and SWRC.

interval_length

A numeric value indicating the length of the regular intervals to which the time values should be converted.

Details

The irregclst1 function handles irregular longitudinal data by:

Visualizations of the data include plots for both the original irregular data and the regularized data, as well as histograms of time distributions and relative change trends.

Value

A list containing:

Author(s)

author name

References

Reference

See Also

seealso

Examples

##

data(sdata)
#' #Using relative change method: Simple relative change (SRC)
fit1 <- irregclst1(sdata, "subject_id", "time", "response", rel="SRC", interval_length = 3)
fit1$regular_data #for showing the regularized data in long format
fit1$regular_data_wide #for showing the regularized data in wide format
fit1$cluster_data #dataset consisting clusters for different time points
fit1$merged_data #for showing the regularized data in wide format with final cluster
fit1$plot_regular #For plotting regularized longitudinal data
fit1$plot_irregular #For plotting irregular longitudinal data
fit1$plot_change #For plotting relative change
fit1$histogram_irregular #histogram for time of irregular data
fit1$histogram_regular #histogram for time of regular data
#Using relative change method: Cumulative average relative change (CARC)
fit2 <- irregclst1(sdata, "subject_id", "time", "response", rel="CARC", interval_length = 3)
fit2$regular_data #for showing the regularized data in long format
fit2$regular_data_wide #for showing the regularized data in wide format
fit2$cluster_data #dataset consisting clusters for different time points
fit2$merged_data #for showing the regularized data in wide format with final cluster
fit2$plot_regular #For plotting regularized longitudinal data
fit2$plot_irregular #For plotting irregular longitudinal data
fit2$plot_change #For plotting relative change
fit2$histogram_irregular #histogram for time of irregular data
fit2$histogram_regular #histogram for time of regular data
#Using relative change method: Weighted sum relative change (WSRC)
fit3 <- irregclst1(sdata, "subject_id", "time", "response", rel="WSRC", interval_length = 3)
fit3$regular_data #for showing the regularized data in long format
fit3$regular_data_wide #for showing the regularized data in wide format
fit3$cluster_data #dataset consisting clusters for different time points
fit3$merged_data #for showing the regularized data in wide format with final cluster
fit3$plot_regular #For plotting regularized longitudinal data
fit3$plot_irregular #For plotting irregular longitudinal data
fit3$plot_change #For plotting relative change
fit3$histogram_irregular #histogram for time of irregular data
fit3$histogram_regular #histogram for time of regular data

##

[Package ILRCM version 0.1.0 Index]