Learn R Programming

StratifiedSampling (version 0.4.1)

sys_devillepi2: Second order inclusion probabilities of Deville's systematic

Description

This function returns the second order inclusion probabilities of Deville's systematic.

Usage

sys_devillepi2(pik)

Value

A matrix of second order inclusion probabilities.

Arguments

pik

A vector of inclusion probabilities

References

Deville, J.-C. (1998), Une nouvelle méthode de tirage à probabilité inégales. Technical Report 9804, Ensai, France.

Chauvet, G. (2012), On a characterization of ordered pivotal sampling, Bernoulli, 18(4):1320-1340

Examples

Run this code
set.seed(1)
N <- 30
n <- 4
pik <- as.vector(inclprob(runif(N),n))
PI <- sys_devillepi2(pik)
#image(as(as.matrix(PI),"sparseMatrix"))

pik <- c(0.2,0.5,0.3,0.4,0.9,0.8,0.5,0.4)
PI <- sys_devillepi2(pik)
#image(as(as.matrix(PI),"sparseMatrix"))

Run the code above in your browser using DataLab