##
data(sdata)
sdata <- sdata[1:100,]
#' #Using relative change method: Simple relative change (SRC)
fit1 <- irr(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 <- irr(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 <- irr(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
##
Run the code above in your browser using DataLab