sampling: Sampling with probability proportional to size (pps without...

ppsR Documentation

Sampling with probability proportional to size (pps without replacement)

Description

Methods to compute the first-order sample inclusion probabilities (given a measure of size) and sampling mechanisms to draw samples with probabilities proportional to size (pps).

Usage

pps_probabilities(size, n)
pps_draw(x, method = "brewer", sort = TRUE)

## S3 method for class 'prob_pps'
print(x, ...)

Arguments

size

[numeric vector] measure of size.

n

[integer] sample size.

x

object of class prob_pps.

method

[character] currently only method "brewer" is implemented.

sort

[logical] indicating whether the sampled indices are sorted in ascending order (default: TRUE).

...

additional arguments.

Details

Function pps_probabilities computes the first-order sample inclusion probabilities for a given sample size n; see e.g., Särndal et al., 1992 (p. 90). The probabilities (and additional attributes) are returned as a vector, more precisely as an object of class prob_pps.

For an object of class prob_pps (inclusion probabilities and additional attributes), function pps_draw draws a pps sample without replacement and returns the indexes of the population elements. Only the method of Brewer (1963, 1975) is currently implemented.

Value

Function pps_probabilities returns the probabilities (an object of class (prob_pps).

Function pps_draw returns a pps sample of indexes from the population elements.

References

Brewer, K. W. R. (1963). A Model of Systematic Sampling with Unequal Probabilities. Australian Journal of Statistics 5, 93–105. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1467-842X.1963.tb00132.x")}

Brewer, K. W. R. (1975). A simple procedure for \pipswor, Australian Journal of Statistics 17, 166–172. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1467-842X.1975.tb00954.x")}

Särndal, C.-E., Swensson, B., Wretman, J. (1992). Model Assisted Survey Sampling, New York: Springer-Verlag.

Examples

# We are going to pretend that the workplace sample is our population.
head(workplace)

# The population size is N = 142. We want to draw a pps sample (without
# replacement) of size n = 10, where the variable employment is the measure of
# size. The first-order sample inclusion probabilities are calculated as
# follows

p <- pps_probabilities(workplace$employment, n = 10)

# Now, we draw a pps sample using Brewer's method.
pps_draw(p, method = "brewer")

robsurvey documentation built on Sept. 11, 2024, 6:35 p.m.