Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/inclusionProb.R
Get the first-order inclusion probabilities from a vector of probability weights.
1 | 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
1 2 | pweights <- sample(1:5, 25, replace = TRUE)
inclusionProb(pweights, 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.