pps: Stratified probability-proportional-to-size sampling

Description Usage Arguments Value See Also Examples

Description

Stratified probability-proportional-to-size (PPS) sampling using permanent random numbers. Can also be used for non-stratified PPS using a dummy stratum taking the same value for each object.

Usage

1
pps(df, stratid, nsamp, prn, size)

Arguments

df

Data frame containing the elements to sample from.

stratid

Variable in df containing the strata.

nsamp

Variable in df containing the sample sizes.

prn

Variable in df containing the permanent random numbers.

size

Variable in df containing the size measure.

Value

Copy of the input data frame together with the boolean variable sampled, as well as a numeric variable lambda containing the estimated first-order inclusion probabilities.

See Also

samp, srs, transformprn.

Examples

1
pps(df=ExampleData, nsamp="nsamp", stratid="stratum", prn="prn", size="size")

kirajcg/prnsamplr documentation built on May 17, 2019, 3:12 a.m.