Learn R Programming

stratallo (version 3.0.1)

optcost: Minimum-Cost Allocation in Stratified Sampling

Description

[Stable]

Computes stratum sample sizes that minimize the total survey cost for a given target variance of a stratified estimator, optionally subject to one-sided upper bounds on the stratum sample sizes. Specifically, the function solves the following optimization problem:

Minimize $$c(x_1,\ldots,x_H) = \sum_{h=1}^H c_h x_h$$ over \(\mathbb R_+^H\), subject to $$\sum_{h=1}^H \frac{A^2_h}{x_h} - A_0 = V,$$ $$x_h \leq M_h, \qquad h = 1,\ldots,H,$$ where \(A_0,\, A_h > 0,\, c_h > 0,\, M_h > 0,\, h = 1,\ldots,H\), and \(V > \sum_{h=1}^H \frac{A^2_h}{M_h} - A_0\), are given numbers.

The upper-bound constraints \(x_h \leq M_h\) are optional. If they are not imposed, it is only required that \(V > 0\).

Usage

optcost(V, A, A0, M = NULL, unit_costs = 1)

Value

A numeric vector containing the optimal sample allocation for each stratum.

Arguments

V

(number)
parameter \(V\) in the variance constraint. If upper bounds are imposed (M is not NULL), it must satisfy V > sum(A^2/M) - A_0. Otherwise, V > 0.

A

(numeric)
population constants \(A_1,\ldots,A_H\). All values must be strictly positive.

A0

(number)
population constant \(A_0\).

M

(numeric or NULL)
optional upper bounds \(M_1,\ldots,M_H\) on the stratum sample sizes. If no upper bounds are imposed, set M = NULL.

unit_costs

(numeric)
costs \(c_1,\ldots,c_H\) of surveying one element in each stratum. Strictly positive values. May also be of length 1, in which case the value is recycled to match the length of bounds.

Details

The allocation is computed using the LRNA algorithm, described in WojciakLRNA;textualstratallo.

The solution is valid for stratified sampling designs in which the variance \(V_{st}\) of the stratified estimator can be expressed as $$V_{st} = \sum_{h=1}^H \frac{A^2_h}{x_h} - A_0,$$ where \(H\) is the number of strata, \(x_1,\ldots,x_H\) are the stratum sample sizes, and \(A_0,\, A_h > 0\) do not depend on \(x_h\).

References

WojciakLRNAstratallo

See Also

rna(), opt().

Examples

Run this code
A <- c(3000, 4000, 5000, 2000)
M <- c(100, 90, 70, 80)
x <- optcost(1017579, A = A, A0 = 579, M = M)
x

Run the code above in your browser using DataLab