Given a matrix (d) of time courses (each row is an individual and each column is a time point) and a confidence interval (ci) this will calculate the mean, median, confidence intervals and a vector of values for creating patches.
timecourse_stats(d, ci)List with the following elements:
stats$ub_ci vector of confidence interval upper bound
stats$lb_ci vector of confidence interval lower bound
stats$mean vector of mean values
stats$median vector of median values
matrix of responses (each row an individual and each column a time point)
confidence interval in percent (eg, 95)