View source: R/cap05-sistematica.R
| sist_selecionar_amostra | R Documentation |
Selects a systematic sample of size n from a population of size N,
handling both the integer-interval case and the non-integer-interval
case (with the correction constant k*), following the selection
rules of Section 5.2 of the course notes (Examples 5.1-5.2). In the
non-integer case, the first selected element is r; from the second
element onward, k* is added on top of the regular step k
(i.e. element i for i >= 2 equals (i-1)*k + k* plus r), exactly as
illustrated in Example 5.2.
sist_selecionar_amostra(N, n, r = NULL, semente = NULL, ...)
N |
Population size. |
n |
Desired sample size. |
r |
Optional random start (an integer between 1 and |
semente |
Optional integer seed for reproducibility. The user's global random state is saved and restored, so calling this function does not affect subsequent unrelated random draws. |
... |
Ignored (see package overview on tolerated extra arguments). |
A sampling_result object with the selected element positions
(1:N).
sist_selecionar_amostra(N = 2000, n = 80, r = 8)
sist_selecionar_amostra(N = 2000, n = 75, r = 26)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.