srs: Stratified simple random sampling

Description Usage Arguments Value See Also Examples

Description

Stratified simple random sampling (SRS) using permanent random numbers. Can also be used for non-stratified SRS using a dummy stratum taking the same value for each object.

Usage

1
srs(df, stratid, nsamp, prn)

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.

Value

Copy of the input data frame together with the boolean variable sampled.

See Also

samp, pps, transformprn.

Examples

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

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