Support {TeachingSampling}R Documentation

Sampling Support for Fixed Size Without Replacement Sampling Designs

Description

Creates a matrix containing every possible sample under fixed sample size designs

Usage

Support(N, n, ID=FALSE)

Arguments

N Population size
n Sample size
ID By default FALSE, a vector of values (numeric or string) identifying each unit in the population

Details

A support is defined as the set of samples such that for any sample in the support, all the permutations of the coordinates of the sample are also in the support

Value

The function returns a matrix of binom{N}{n} rows and n columns. Each row of this matrix corresponds to a possible sample

Author(s)

Hugo Andrés Gutiérrez Rojas hugogutierrez@usantotomas.edu.co

References

Till'e, Y. (2006), Sampling Algorithms. Springer
Guti'errez, H. A. (2009), Estrategias de muestreo: Dise~no de encuestas y estimaci'on de par'ametros. Editorial Universidad Santo Tom'as

See Also

Ik

Examples

# Vector U contains the label of a population
U <- c("Yves", "Ken", "Erik", "Sharon", "Leslie")
N <- length(U)
n <- 2
# The support for fixed size without replacement sampling designs
# Under this context, there are ten (10) possibles samples
Support(N,n)
# The same support, but labeled
Support(N,n,ID=U)
# y is the variable of interest
y<-c(32,34,46,89,35)
# The following output is very useful when checking 
# the design-unbiasedness of an estimator
Support(N,n,ID=y)

[Package TeachingSampling version 0.7.6 Index]