sist_selecionar_amostra: Select a systematic sample

View source: R/cap05-sistematica.R

sist_selecionar_amostraR Documentation

Select a systematic sample

Description

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.

Usage

sist_selecionar_amostra(N, n, r = NULL, semente = NULL, ...)

Arguments

N

Population size.

n

Desired sample size.

r

Optional random start (an integer between 1 and k, inclusive). If NULL, one is drawn uniformly at random.

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).

Value

A sampling_result object with the selected element positions (1:N).

Examples

sist_selecionar_amostra(N = 2000, n = 80, r = 8)
sist_selecionar_amostra(N = 2000, n = 75, r = 26)

sampleone documentation built on Oct. 13, 2026, 5:07 p.m.