pps | R Documentation |
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).
pps_probabilities(size, n)
pps_draw(x, method = "brewer", sort = TRUE)
## S3 method for class 'prob_pps'
print(x, ...)
size |
|
n |
|
x |
object of class |
method |
|
sort |
|
... |
additional arguments. |
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.
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.
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 \pi
pswor,
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.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.