automatically get mean and stdev of groups 05-16-2014d1449

2014-08-29

automatically get mean and stdev of groups 05-16-2014d1449
Summary statistics by group
SummaryStatisticsByGroup


If there are rows in a table, and some of the rows are part of the same group as specified by a value in one of the columns, then I often like to make a new row for this group for the mean (and the standard deviation). This code will take in a table, and then find the average and the standard deviation based on grouping according to one of the attributes of each sample/object.


I wrote some Java code to do this
C:\Users\kurtw_000\Documents\kurt\storage\DR\2014\05-22-2014d1052\Summary statistics by group\Sandbox


SAS can do something like this

proc means data=GradeBySection min max median; ##the information you need

by Section; # the grouping variable

var Score; # the information of the variable you want

class Status Year; # the sub-grouping variable



jmp can get similar statistics for groups



R appears to have many ways of getting summary statistics by group