SamplePPS: Probability proportional to size sampling with replacement

Description Usage Arguments Value References See Also Examples

Description

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

Usage

1

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.

http://oswaldosantos.github.io/capm

See Also

SampleSystematic.

Examples

1
2
3
4
5
# Load data with PSU identifiers and sizes.
data(psu.ssu)

# Take a sample of 10 PSU with probability proportional to size with replacement.
(selected.psu <- SamplePPS(psu.ssu, 10, write = FALSE))


Search within the capm package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.