Sample entire groups defined by a categorical attribute.
In sampling theory, this design is known as cluster sampling
(also called one-stage cluster sampling or sampling by groups).
The groups are assumed to be pre-defined in the data; this function
does not infer groups with clustering algorithms such as k-means.