powered by
Computes the first-order inclusion probabilties from a vector of positive numbers, for a probabilitiy proportional-to-size design.
getPips(x, n)
A vector of inclusion probabilities proportional-to-size
A vector of positive numbers
The wanted sample size
if (FALSE) { set.seed(12345); N = 1000; n = 100; x = matrix(runif(N * 2), ncol = 2); prob = getPips(x[, 1], n); s = lpm2(prob, x); plot(x[, 1], x[, 2]); points(x[s, 1], x[s, 2], pch = 19); }
Run the code above in your browser using DataLab