help for shuffle8

Shuffle a list of items (Stata 8)

shuffle8 list , [ num noisily ]


shuffle8 randomly sorts the specified items (words, numbers).

Note: shuffle8 is slow if the number of items is large (>100). shuffle for Stata 9 is much faster (see ssc describe shuffle).


num specifies that list be treated as numlist (see help numlist).

noisily displays the sorted list.


. set seed 23897

. shuffle8 a b c, noisily c a b

. shuffle8 1/10, num noisily 7 8 4 9 2 5 6 1 10 3

. shuffle8 she said "my cat is black", noisily said "my cat is black" she

Saved Results


r(list) shuffled list


Ben Jann, ETH Zurich, jann@soz.gess.ethz.ch

Also see