| alg_1sided | R Documentation |
Functions implementing selected optimum allocation algorithms for solving the optimum sample allocation problem, formulated as follows:
Minimize
f(x_1,\ldots,x_H) = \sum_{h=1}^H \frac{A^2_h}{x_h}
over \mathbb R_+^H, subject to
\sum_{h=1}^H c_h x_h = c,
and either
x_h \leq M_h, \qquad h = 1,\ldots,H,
or
x_h \geq m_h, \qquad h = 1,\ldots,H,
where
c > 0,\, c_h > 0,\, A_h > 0,\, m_h > 0,\, M_h > 0,\, h = 1,\ldots,H,
are given numbers.
The following is a list of all available algorithms along with the functions that implement them:
RNA - rna(),
LRNA - rna(),
SGA - sga(),
SGAPLUS - sgaplus(),
COMA - coma().
See the documentation of a specific function for details.
The inequality constraints are optional. The user can choose whether and how they are imposed in the optimization problem, depending on the chosen algorithm:
Lower bounds m_1, \ldots, m_H can be specified only for the LRNA
algorithm (by setting cmp = .Primitive("<=") for rna()).
Upper bounds M_1, \ldots, M_H are supported by all other algorithms.
Simultaneous constraints (both lower and upper bounds) are not supported by these functions.
The costs c_1, \ldots, c_H of surveying one element in a stratum
can be specified by the user only for the RNA and LRNA algorithms.
For the remaining algorithms, these costs are fixed at 1, i.e.,
c_h = 1,\, h = 1,\ldots,H.
rna(
total_cost,
A,
bounds = NULL,
unit_costs = 1,
cmp = .Primitive(">="),
details = FALSE
)
sga(total_cost, A, M)
sgaplus(total_cost, A, M)
coma(total_cost, A, M)
total_cost |
(
|
A |
( |
bounds |
(
See also |
unit_costs |
( |
cmp |
( The value of this argument has no effect if |
details |
( |
M |
( |
If no inequality constraints are imposed, the allocation is given by the Neyman allocation:
x_h = \frac{A_h}{\sqrt{c_h}} \frac{c}{\sum_{i=1}^H A_i \sqrt{c_i}},
\qquad h = 1,\ldots,H.
For the stratified \pi-estimator of the population total under
stratified simple random sampling without replacement design, the
parameters of the objective function f are
A_h = N_h S_h, \qquad h = 1,\ldots,H,
where N_h denotes the size of stratum h and S_h is the
standard deviation of the study variable in stratum h.
A numeric vector of optimum sample allocations in strata. In the case
of rna() only, the return value may also be a list containing the
optimum allocations and strata assignments.
rna(): Implements the Recursive Neyman Algorithm (RNA) and its counterpart,
the Lower Recursive Neyman Algorithm (LRNA), designed for the optimum
allocation problem with one-sided lower-bound constraints.
The RNA is described in \insertCiteWWW;textualstratallo, whereas the LRNA
is introduced in \insertCiteWojciakLRNA;textualstratallo.
sga(): The Stenger-Gabler (SGA) algorithm, as proposed by
\insertCiteSG;textualstratallo and described in
\insertCiteWWW;textualstratallo.
This algorithm solves the optimum allocation problem with one-sided
upper-bound constraints. It assumes unit costs are constant and equal to 1,
i.e., c_h = 1,\, h = 1,\ldots,H.
sgaplus(): A modified Stenger-Gabler-type algorithm, described in
\insertCiteWojciakMsc;textualstratallo, implemented as the
Sequential Allocation (version 1) algorithm.
This algorithm solves the optimum allocation problem with one-sided
upper-bound constraints. It assumes unit costs are constant and equal to 1,
i.e., c_h = 1,\, h = 1,\ldots,H.
coma(): The Change of Monotonicity Algorithm (COMA), described in
\insertCiteWWW;textualstratallo, solves the optimum allocation problem
with one-sided upper-bound constraints. It assumes unit costs are constant
and equal to 1, i.e., c_h = 1,\, h = 1,\ldots,H.
These functions are optimized for internal use and should typically not
be called directly by users. Use opt() or optcost() instead.
WojciakLRNAstratallo
\insertRefWWWstratallo
\insertRefWojciakMscstratallo
\insertRefSGstratallo
\insertRefSarndalstratallo
opt(), optcost(), rnabox().
A <- c(3000, 4000, 5000, 2000)
m <- c(50, 40, 10, 30) # lower bounds
M <- c(100, 90, 70, 80) # upper bounds
rna(total_cost = 190, A = A, bounds = M)
rna(total_cost = 190, A = A, bounds = m, cmp = .Primitive("<="))
rna(total_cost = 300, A = A, bounds = M)
sga(total_cost = 190, A = A, M = M)
sgaplus(total_cost = 190, A = A, M = M)
coma(total_cost = 190, A = A, M = M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.