inclprob: Inclusion Probabilities

View source: R/RcppExports.R

inclprobR Documentation

Inclusion Probabilities

Description

Computes first-order inclusion probabilities from a vector of positive numbers.

Usage

inclprob(x, n)

Arguments

x

vector of positive numbers.

n

sample size (could be a positive real value).

Details

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.

Value

A vector of inclusion probabilities proportional to x and such that the sum is equal to the value n.

Author(s)

Raphael Jauslin raphael.jauslin@unine.ch

See Also

inclusionprobabilities

Examples


x <- runif(100)
pik <- inclprob(x,70)
sum(pik)


StratifiedSampling documentation built on Oct. 26, 2022, 5:09 p.m.