The by varlist: construct is reviewed, showing how it can be used to tackle a variety of problems with group structure. These range from simply doing some calculations for each of several groups of observations to doing more advanced manipulations making use of the fact that with this construct, subscripts and the built-ins _n and _N are all interpreted within groups. A fairly complete tutorial on numerical evaluation of true and false conditions is included.
No takes yet. Share an insight, caveat, or question.
Nicholas J. Cox (2002) studied this question.
Synapse has enriched 5 related papers. Consider them for comparative context: