pinc: Inclusion probabilities in a PIps design

Description Usage Arguments Details Value Examples

View source: R/pinc.R

Description

Compute the inclusion probabilities to be used in a PIps design with sample size equal to n.

Usage

1
pinc(n, x)

Arguments

n

a positive integer indicating the desired sample size.

x

a positive numeric vector giving the values of the auxiliary variable.

Details

The inclusion probabilities are calculated as n x_k / t_x and corrected, if necessary, to ensure that they are smaller or equal than one.

Value

A numeric vector giving the inclusion probability of each element.

Examples

1
2
x<- 1 + sort( rgamma(100, shape=4/9, scale=108) )
pinc(n=30,x)

optimStrat documentation built on Nov. 11, 2020, 5:07 p.m.