Get the first-order inclusion probabilities from a vector of probability weights.
inclusionProb(prob, size)
a numeric vector of non-negative probability weights.
a non-negative integer giving the sample size.
A numeric vector of the first-order inclusion probabilities.
setup
, "'>SampleSetup"
# NOT RUN {
pweights <- sample(1:5, 25, replace = TRUE)
inclusionProb(pweights, 10)
# }
Run the code above in your browser using DataLab