SamplePPS {capm}R Documentation

Sampling with probability proportional to size and with replacement

Description

Select Primary Sampling Units (PSU) with probability proportional to size and with replacement.

Usage

SamplePPS(psu.ssu = NULL, psu = NULL, write = FALSE, ...)

Arguments

psu.ssu

data.frame with all PSU. First column contains PSU unique identifiers. Second column contains numeric PSU sizes.

psu

the number of PSU to be selected.

write

logical. If TRUE, a *.csv file containing the PSU and their Secondary Sampling Units (SSU) is writed in the current working directory.

...

further arguments passed to write.table function.

Value

data.frame. First column contains the selected PSU identifiers, coerced by as.character, to avoid scientific notation in case the identifiers be large numbers of class numeric. Second column contain PSU sizes, a variable needed for second stage sampling with SampleSystematic.

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

SampleSystematic.

Examples

data(psu_ssu)

# Take a sample of 10 PSU.
SamplePPS(psu.ssu = psu_ssu, psu = 10, write = FALSE)


[Package capm version 0.14.0 Index]