getPips | R Documentation |
Computes the first-order inclusion probabilties from a vector of positive numbers, for a probabilitiy proportional-to-size design.
getPips(x, n)
x |
A vector of positive numbers |
n |
The wanted sample size |
A vector of inclusion probabilities proportional-to-size
## Not run:
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);
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.