inclusionProb {simFrame} | R Documentation |
Get the first-order inclusion probabilities from a vector of probability weights.
inclusionProb(prob, size)
prob |
a numeric vector of non-negative probability weights. |
size |
a non-negative integer giving the sample size. |
A numeric vector of the first-order inclusion probabilities.
This is a faster C++ implementation of
inclusionprobabilities
from package sampling
.
Andreas Alfons
setup
, "SampleSetup"
pweights <- sample(1:5, 25, replace = TRUE) inclusionProb(pweights, 10)