SamplePPS: Sampling with probability proportional to size and with...

Description Usage Arguments Value References See Also Examples

View source: R/SamplePPS.R

Description

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

Usage

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

http://oswaldosantos.github.io/capm

See Also

SampleSystematic.

Examples

1
2
3
4
data(city)

# Take a sample of 10 PSU.
SamplePPS(psu.ssu = city[, c("track_id", "hh")], psu = 10, write = FALSE)

capm documentation built on May 29, 2017, 12:34 p.m.

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