Description Usage Arguments Details Value Note References See Also Examples
General a small sample of size M out of a huge population of size N.
1 2 3 |
N |
The size of the population. |
M |
The sample size. |
seed |
A |
HSEL.bigz generates a sample of size M from a population of size N, with space complexity linear in M.
rejsample is similar to HSEL.bigz, but implemented using direct rejection through unique.
sample1 generates one number of 0 to N-1 using simple rejection and urand.bigz.
For HSEL.bigz and rejsample, a bigz vector of length N, between 1 and N.
For sample1, a bigz integer, between 0 and N-1.
rejsample can be very slow when M is large.
Jarmo Ernvall and Olli Nevalainen. 1982. An Algorithm for Unbiased Random Sampling. THE COMPUTER JOURNAL, VOL. 25, NO. 1, 45–47
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.