Learn R Programming

stratallo (version 2.1.0)

nopt: Minimum Sample Size Allocation in Stratified Sampling Schemes

Description

[Stable]

User function that determines fixed strata sample sizes that minimize total sample size, under assumed level of the variance of the stratified pi-estimator of the total and optional one-sided upper bounds imposed on strata sample sizes. The algorithm used by nopt() is described in Wójciak (2022). The allocation computed is valid for all stratified sampling schemes for which the variance of the stratified pi-estimator is of the form: $$D(x_1,...,x_H) = a^2_1/x_1 + ... + a^2_H/x_H - b,$$ where \(H\) denotes total number of strata, \(x_1, ..., x_H\) are the strata sample sizes, and \(b\), \(a_w > 0\) do not depend on \(x_w, w = 1, ..., H\).

Usage

nopt(D, a, b, M = NULL)

Value

Numeric vector with optimal sample allocation in strata.

Arguments

D

(number)
variance equality constraint value. A strictly positive scalar.

a

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

b

(number)
parameter \(b\) of variance function \(D\).

M

(numeric or NULL)
upper bounds constraints optionally imposed on strata sample sizes. If different than NULL, it is then required that D >= sum(a/M) - b > 0. Strictly positive numbers.

Details

The nopt() function computes: $$argmin n(x_1,...,x_H) = x_1 + ... + x_H,$$ under the equality constraint imposed on the variance: $$a^2_1/x_1 + ... + a^2_H/x_H - b = D.$$ Optionally, the following set of one-sided inequality constraints can be added: $$x_w <= M_w, w = 1,...,H,$$ where \(D > 0\) is a given number and \(M_w > 0, w = 1, ..., H\), are the upper bounds imposed on sample sizes in strata.

References

Wójciak, W. (2022), Minimum sample size allocation in stratified sampling under constraints on variance and strata sample sizes, tools:::Rd_expr_doi("10.48550/arXiv.2204.04035")

See Also

rna_onesided(), dopt().

Examples

Run this code
a <- c(3000, 4000, 5000, 2000)
M <- c(100, 90, 70, 80)
nopt(1017579, a = a, b = 579, M = M)

Run the code above in your browser using DataLab