Inclusion probabilities

Description

Get the first-order inclusion probabilities from a vector of probability weights.

Usage

1
inclusionProb(prob, size)

Arguments

prob

a numeric vector of non-negative probability weights.

size

a non-negative integer giving the sample size.

Value

A numeric vector of the first-order inclusion probabilities.

Note

This is a faster C++ implementation of inclusionprobabilities from package sampling.

Author(s)

Andreas Alfons

See Also

setup, "SampleSetup"

Examples

1
2
pweights <- sample(1:5, 25, replace = TRUE)
inclusionProb(pweights, 10)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.