An internal function that implements the recursive Neyman optimal allocation
algorithms, rna
and lrna
, described in Wesołowski et al. (2021) and
Wójciak (2022) respectively. The rna_onesided()
should not be used
directly. Instead, user function dopt()
or nopt()
should be used.
The rna_onesided()
function computes:
$$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 optionally, under either
$$x_w <= M_w, w = 1,...,H, (Case I)$$
or
$$x_w >= m_w, w = 1,...,H, (Case II)$$
where \(H\) denotes total number of strata, \(x_1, ..., x_H\) are the
strata sample sizes, and \(m_w > 0\) and \(M_w > 0, w = 1, ..., H\) are
lower and upper bounds respectively, optionally imposed on samples sizes in
strata.
User of rna_onesided()
can choose whether the inequality constraints will
be added to the optimization problem or not. This is achieved with the proper
use of bounds
and upper
arguments of the function. In case of no
inequality constraints to be added, bounds
must be specified as NULL
(default).
If any bounds should be imposed on sample strata sizes, user must specify
these with bounds
argument.
For the Case I of the upper bounds, upper
flag must be set to TRUE
(default) and then the rna_onesided()
performs the rna
.
For the Case II of lower bounds, upper
flag must be set to FALSE
and then
the rna_onesided()
performs the lrna
algorithm.
The upper
flag is ignored when bounds
is NULL
.
rna_onesided(n, a, bounds = NULL, upper = TRUE, assignments = FALSE)
Numeric vector with optimal sample allocations in strata or list
with optimal sample allocations in strata and strata assignments (if
assignments
is TRUE
).
(number
)
total sample size. A strictly positive scalar.
(numeric
)
parameters \(a_1, ..., a_H\) of variance function
\(D\). Strictly positive numbers.
(numeric
or NULL
)
optional one-sided lower or upper
bounds constraints imposed on strata sample sizes. If bounds
is not
NULL
, it is required that n <= sum(bounds)
in case of upper = TRUE
,
and n >= sum(bounds)
, in case of upper = FALSE
. Strictly positive
numbers.
(flag
)
should values of bounds
be treated as one-sided
upper bounds constraints (default)? Otherwise, they are treated as lower
bounds.
(flag
)
should information about strata assignments
(either to take-Neyman or take-bound) be added to the output?
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")
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")
Sarndal, C.-E., Swensson, B., and Wretman, J. (1992), Model Assisted Survey Sampling, New York, NY: Springer.
dopt()
, nopt()
, sga()
, sgaplus()
, coma()
, rnabox()
.
a <- c(3000, 4000, 5000, 2000)
bounds <- c(100, 90, 70, 80)
rna_onesided(n = 190, a = a, bounds = bounds)
Run the code above in your browser using DataLab