inclprob | R Documentation |
Computes first-order inclusion probabilities from a vector of positive numbers.
inclprob(x, n)
x |
vector of positive numbers. |
n |
sample size (could be a positive real value). |
The function is implemented in C++ so that it can be used in the code of other C++ functions. The implementation is based on the function inclusionprobabilities
of the package sampling.
A vector of inclusion probabilities proportional to x
and such that the sum is equal to the value n
.
inclusionprobabilities
x <- runif(100)
pik <- inclprob(x,70)
sum(pik)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.