zclean_longitudinal.Rdcleans longitudinal data. similar to collapse_df_reps(method = "clean") except that zscores below clean_thresh (z_thresh) but above a lower threshold (z_thresh_2) are sitll counted if a previous sample from that person scored above z_thresh.
zclean_longitudinal(
z_min,
z_mean,
sample_list,
z_thresh = 3.5,
z_thresh2 = 2,
show_progress = TRUE
)minimum zscore from collapse_df_reps(method = "min")
mean zscore from collapse_df_reps(method = "mean")
named list. each list element name is patient ID (e.g. 123456). Each list element containcs a character vector of patient+timepoint labels in order. (e.g. 123456_t1, 123456_t2, 123456_t3).
if z > z_thresh, take mean
if z_thresh2 < z < z_thresh, take mean if previous timepoint z > z_thresh, otherwise set to zero. If z < z_thresh, set to zero.
logical indicating whether or not to show progress bar