SampleSystematic {capm} | R Documentation |
Simple and stratified systematic sampling
Description
Select sampling units using simple or stratified systematic samplin. In the context of two-stage cluster sampling, select Secondary Sampling Units (SSU) in one or more Primary Sampling Units (PSU), using systematic sampling.
Usage
SampleSystematic(psu.ssu = NULL, su = NULL, N = NULL,
write = FALSE, ...)
Arguments
psu.ssu |
|
su |
|
N |
|
write |
logical. If |
... |
further arguments passed to |
Details
When N
is defined, psu.ssu
is ignored. If N
has one element, su
must too and the result is a simple systematic selection. If N
has more than one element, su
must have the same number of elements and each oredered pair represent an strata. Thus, when N has more than one element, the result is a stratified sampling with systematic selection within each strata (see examples).
Value
A matrix
. For the second stage in a two-stage cluster sampling, the names of columns are the identifiers of selected psu, coerced by as.character
to avoid scientific notation in case the identifiers be of class
numeric
. The rows correspond to the selected SSU within each PSU. For simple systematic sampling, the rows correspond to the selected sampling units. For stratified sampling, each column represent an strata and the rows correspond to the selected sampling units in each strata.
References
Levy P and Lemeshow S (2008). Sampling of populations: methods and applications, Fourth edition. John Wiley and Sons, Inc.
Baquero, O. S., Marconcin, S., Rocha, A., & Garcia, R. D. C. M. (2018). Companion animal demography and population management in Pinhais, Brazil. Preventive Veterinary Medicine.
http://oswaldosantos.github.io/capm
See Also
Examples
data(psu_ssu)
## Two-stage cluster sampling
selected_psu <- SamplePPS(psu.ssu = psu_ssu, psu = 10)
# Take a systematic sampling of 5 SSU within each selected PSU.
SampleSystematic(selected_psu, 5, write = FALSE)
## Simple systematic sampling
SampleSystematic(su = 5, N = 100)
## Stratified systematic sampling
SampleSystematic(su = c("urban" = 50, "rural" = 10),
N = c("urban" = 4000, "rural" = 150))