Learn R Programming

stratallo (version 2.1.0)

dopt_upper: Algorithms for Optimum Sample Allocation in Stratified Sampling Under Under One-Sided Upper Bounds Constraints

Description

[Stable]

Internal functions that implement the optimal sample allocation algorithms: sga, sgaplus and coma. Functions from this family compute: $$argmin D(x_1,...,x_H) = a^2_1/x_1 + ... + a^2_H/x_H - b,$$ under the equality constraint imposed on total sample size: $$x_1 + ... + x_H = n,$$ and upper bounds constraints imposed on strata sample sizes: $$x_w <= M_w, w = 1,...,H.$$ Here, \(H\) denotes total number of strata, \(x_1, ..., x_H\) are the strata sample sizes, and \(n > 0\), \(b\), \(a_w > 0\), \(M_w > 0, w = 1, ..., H\) are given numbers.
The sga(), sgaplus() and coma() are internal implementations of the algorithms in subject, and hence, users should not use any of these functions directly. Instead, the dopt() should be used.

Usage

sga(n, a, M)

sgaplus(n, a, M)

coma(n, a, M)

Value

Numeric vector with optimal sample allocations in strata.

Arguments

n

(number)
total sample size. A strictly positive scalar.

a

(numeric)
parameters \(a_1, ..., a_H\) of variance function \(D\). Strictly positive numbers.

M

(numeric)
upper bounds constraints imposed on strata sample sizes. It is required that n <= sum(M). Strictly positive numbers.

Functions

  • sga: implementation of the Stenger-Gabler type algorithm SGa, described in Wesołowski et al. (2021) and in Stenger and Gabler (2005).

  • sgaplus: implementation of the modified Stenger-Gabler type algorithm, described in Wójciak (2019) as Sequential Allocation (version 1) algorithm.

  • coma: implementation of the Change of Monotonicity Algorithm, or coma, described in Wesołowski et al. (2021).

References

Wesołowski, J., Wieczorkowski, R., Wójciak, W. (2021), Optimality of the recursive Neyman allocation, Journal of Survey Statistics and Methodology, tools:::Rd_expr_doi("10.1093/jssam/smab018"), tools:::Rd_expr_doi("10.48550/arXiv.2105.14486")

Stenger, H., Gabler, S. (2005), Combining random sampling and census strategies - Justification of inclusion probabilities equal 1, Metrika, 61, 137-156

Wójciak, W. (2019), Optimal allocation in stratified sampling schemes, MSc Thesis, Warsaw University of Technology, Warsaw, Poland. http://home.elka.pw.edu.pl/~wwojciak/msc_optimal_allocation.pdf

See Also

dopt(), rna_onesided().

Examples

Run this code
a <- c(3000, 4000, 5000, 2000)
M <- c(100, 90, 70, 80)
sga(n = 190, a = a, M = M)
sgaplus(n = 190, a = a, M = M)
coma(n = 190, a = a, M = M)

Run the code above in your browser using DataLab