sampfordpi: Joint inclusion probabilities for Sampford's PPS sampling...

Description Usage Arguments Value Note Examples

View source: R/pps.r

Description

Compute joint inclusion probabilities for Sampford's method of PPS sampling

Usage

1
sampfordpi(sizes,n)

Arguments

sizes

A vector of the sizes of the units in the population

n

The sample size

Value

Returns a matrix with the inclusion probability pi(i) for each unit i in the population and with the joint inclusion probability pi(i,j) of units i and j in position (i,j) in the matrix, where i and j are not equal. Note that the size of the matrix is NxN, where N is the population size.

Note

The function sampford can be used to select a sample using Sampford's method. See the user's guide, pps-ug.pdf, for more information.

Examples

1
2
3
sizes <- c(9,2,5,17,4,21,15,7,4,11,23,23,14)
piij <- sampfordpi(sizes,4)
weights <- 1/diag(piij)  # the weights one would use for estimation

Example output



pps documentation built on Jan. 17, 2021, 9:06 a.m.

Related to sampfordpi in pps...