Description Usage Arguments Details Value References See Also Examples
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.
1 2 |
psu.ssu |
|
su |
|
N |
|
write |
logical. If |
... |
further arguments passed to |
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).
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.
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.