Learn R Programming

pps (version 1.0)

sampford: Sampford's PPS sampling method

Description

Use Sampford's method to select a PPS sample of units

Usage

sampford(size,n)

Arguments

size

A vector of the sizes of the units in the population

n

The sample size

Value

Returns the indices of the units that were selected in the sample

Examples

Run this code
# NOT RUN {
size <- c(9,2,5,17,4,21,15,7,4,11,23,23,14)
sampleindices <- sampford(size,4)
# }

Run the code above in your browser using DataLab