Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: Resampling a vector with replacement

From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Resampling a vector with replacement
Date   Fri, 2 Mar 2012 09:08:45 +0000

Worksheet here presumably means dataset. Vector may mean vector
although I guess you really mean variable. On using Stata terminology
for maximum clarity see e.g.

Stata's commands for sampling with replacement fall mostly under the
heading of bootstrapping. However, bootstrap sampling from time
series, as here, is difficult to do without messing up the dependence
structure or invalidating any commands that depend on a prior -tsset-
or -xtset-.


On Fri, Mar 2, 2012 at 8:25 AM, Osei Kuffour Wiafe <[email protected]> wrote:

> 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)!
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index