An update to gsample is available from SSC. To install the update, type

Code:
. ssc install gsample, replace
Since the latest update of moremata is required, you may also want to type

Code:
. ssc install moremata, replace
Main changes:
  • new alt option: The default algorithm for simple random sampling without replacement (SRSWOR) used by gsample is not very fast. The alt option now provides an alternative algorithm that is typically much faster. The new algorithm has not been made the new default for reasons of backward compatibility.
  • new rround option applies random-rounding of non-integer sample sizes across strata
  • new nowarn option allows repetitions in case of unequal probability sampling without replacement (UPSWOR)
  • new nopreserve option prevents gsample from restoring the original data if an error occurs
ben