Hi,
I would like to randomly select (without replacement) 5% of my data, and
keep all the data that were not selected. I believe this rules out the
Stata "sample" command, because that discards the 95% of observations that
were not selected.
In other analyses I have used the very useful "swor" command (which allows
the option of keeping non-selected observations). However, now I want to
randomly select 5% (not an absolute count) of my observations, by an ID
variable, so 5% of each ID get selected. Swor seems to only allow an
absolute count to be selected. Is there another option that allows me to
randomly sample a certain percentage, while keeping all the observations
in the dataset?
Thanks in advance,
-Karoline Mortensen
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/