Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Sampling with replacement or bootstrapping in Mata


From   Michael Manti <mmanti@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Sampling with replacement or bootstrapping in Mata
Date   Thu, 03 Nov 2005 18:36:57 -0500

What's the canonical way to sample with replacement from a vector in Mata? I'm trying to implement a bootstrap procedure. I've looked at jumble(), but that samples without replacement, and I'd prefer to avoid calling out to Stata proper if I can. I assume that scaling the results from uniform() in some fashion and using them as subscripts is the way to go, but I can't quite work out what the code should be.

Thanks!

Michael Manti
mmanti@mac.com
*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index