mean_sd function

Compute means, standard deviations and confidence intervals by sub-groups