nk {TeachingSampling} | R Documentation |
Sample Selection Indicator for With Replacement Sampling Designs
Description
The function returns a matrix of binom(N+m-1)(m)
rows and N
columns. Creates a matrix of values (0, if the unit does not belongs to a specified sample, 1, if the unit is selected once in the sample; 2, if the unit is selected twice in the sample, etc.) for every possible sample under fixed sample size designs with replacement
Usage
nk(N, m)
Arguments
N |
Population size |
m |
Sample size |
Value
The function returns a matrix of binom(N+m-1)(m)
rows and N
columns. The k
th column corresponds to the sample
selection indicator, of the k
th unit, to a possible sample.
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
Examples
# Vector U contains the label of a population of size N=5
U <- c("Yves", "Ken", "Erik", "Sharon", "Leslie")
N <- length(U)
m <- 2
# The sample membership matrix for fixed size without replacement sampling designs
nk(N,m)