Learn R Programming

simFrame (version 0.5.0)

inclusionProb: Inclusion probabilities

Description

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

Usage

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.

See Also

setup, "SampleSetup"

Examples

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

Run the code above in your browser using DataLab