getPips {BalancedSampling} | R Documentation |
Inclusion probabilities proportional-to-size
Description
Computes the first-order inclusion probabilties from a vector of positive numbers, for a probabilitiy proportional-to-size design.
Usage
getPips(x, n)
Arguments
x |
A vector of positive numbers |
n |
The wanted sample size |
Value
A vector of inclusion probabilities proportional-to-size
Examples
## 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)
[Package BalancedSampling version 2.0.6 Index]