When sampling with replacement (like ordinary bootstrap), each draw is done independently, and in each draw every point has equal probability of being drawn. When sampling without replacement (random permutation), all possible sequences (permutations) have equal probability of occurring. E.g., if the data is 1:2, then (1, 2) has the same probability of occurring as (2, 1).
Andy From: tom soyer > > Hi, > > I looked up the help file on sample(), but didn't find the > info I was looking for. > > When sample() is used to resample from a distribution, e.g., > bootstrap, how does it do it? Does it use an uniform > distribution, e.g., runif(), or something else? And, when the > help file says:"sample(x) generates a random permutation of > the elements of x (or 1:x)", would I be correct if I > translate the statement as follows: it means that the order > of sequence, which was generated from a uniform distribution, > would look like a random normal distribution. > > Thanks, > > Tom > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > > ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}} ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
