* This was suggested by David Matheson (from SPSS) (to select 100 from each group). compute ran1 = uniform(1). rank variables = ran1 by group / rank into ran2. select if (ran2 le 100). execute.