Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Resampling a vector with replacement


From   Osei Kuffour Wiafe <okwiafe@gmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Resampling a vector with replacement
Date   Fri, 2 Mar 2012 18:25:19 +1000

Hi guys,
Can anyone help me with a code to take a number of samples from a
range of vectors? I have two (100x1) vectors of returns on equity and
bonds over the last 100 years. I'm hoping to withdraw say 1000 samples
of 50 observation in each, with replacement from each of the vectors
and save them.(in the same worksheet or elsewhere, not too important
at this point)!
Could anyone help me out?
Thanks!
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index