Pik: Inclusion Probabilities for Fixed Size Without Replacement...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Pik.r

Description

Computes the first-order inclusion probability of each unit in the population given a fixed sample size design

Usage

1
Pik(p, Ind)

Arguments

p

A vector containing the selection probabilities of a fixed size without replacement sampling design. The sum of the values of this vector must be one

Ind

A sample membership indicator matrix

Details

The inclusion probability of the kth unit is defined as the probability that this unit will be included in a sample, it is denoted by π_k and obtained from a given sampling design as follows:

π_k=∑_{s\ni k}p(s)

Value

The function returns a vector of inclusion probabilities for each unit in the finite population.

Author(s)

Hugo Andres Gutierrez Rojas hagutierrezro@gmail.com

References

Sarndal, C-E. and Swensson, B. and Wretman, J. (1992), Model Assisted Survey Sampling. Springer.
Gutierrez, H. A. (2009), Estrategias de muestreo: Diseno de encuestas y estimacion de parametros. Editorial Universidad Santo Tomas.

See Also

HT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Vector U contains the label of a population of size N=5
U <- c("Yves", "Ken", "Erik", "Sharon", "Leslie")
N <- length(U)
# The sample size is n=2
n <- 2
# The sample membership matrix for fixed size without replacement sampling designs
Ind <- Ik(N,n)
# p is the probability of selection of every sample. 
p <- c(0.13, 0.2, 0.15, 0.1, 0.15, 0.04, 0.02, 0.06, 0.07, 0.08)
# Note that the sum of the elements of this vector is one
sum(p)
# Computation of the inclusion probabilities
inclusion <- Pik(p, Ind)
inclusion
# The sum of inclusion probabilities is equal to the sample size n=2
sum(inclusion)

Example output

[1] 1
     [,1] [,2] [,3] [,4] [,5]
[1,] 0.58 0.34 0.48 0.33 0.27
[1] 2

TeachingSampling documentation built on April 22, 2020, 1:05 a.m.