Description Usage Arguments Value Note Examples
Compute joint inclusion probabilities for Sampford's method of PPS sampling
1 | sampfordpi(sizes,n)
|
sizes |
A vector of the sizes of the units in the population |
n |
The sample size |
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.
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.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.