rna_prior: RNA in version that uses prior information about violations

View source: R/algorithms_1sided.R

rna_priorR Documentation

RNA in version that uses prior information about violations

Description

[Experimental]

This is the version of the RNA that makes use of additional information about strata for which the allocation can possibly be violated. For all other strata allocation will not be violated.

Usage

rna_prior(
  total_cost,
  A,
  bounds = NULL,
  check = NULL,
  check_violations = .Primitive(">="),
  details = FALSE
)

Arguments

total_cost

(number)
total cost c of the survey. A strictly positive scalar.

A

(numeric)
population constants A_1,\ldots,A_H. Strictly positive numbers.

bounds

(numeric or NULL)
optional lower bounds m_1,\ldots,m_H, or upper bounds M_1,\ldots,M_H, or NULL to indicate that there is no inequality constraints in the optimization problem considered. If not NULL, the bounds is to be treated either as:

  • lower bounds, if check_violations = .Primitive("<="). In this case, it is required that total_cost >= sum(unit_costs * bounds),
    or

  • upper bounds, if check_violations = .Primitive(">="). In this case, it is required that total_cost <= sum(unit_costs * bounds).

check

(integer)
strata indices for which the allocation can possible be violated. For other strata allocation cannot be violated.

check_violations

(function)
2-arguments binary operator function that allows the comparison of values in atomic vectors. It must either be set to .Primitive("<=") or .Primitive(">="). The first of these choices causes that bounds are treated as lower bounds and then rna() function performs the LRNA algorithm. The latter option causes that bounds are treated as upper bounds, and then rna() function performs the RNA algorithm. This argument is ignored when bounds is set to NULL.

details

(flag)
should detailed information about strata assignments (either to take-Neyman or take-bound), values of set function s and number of iterations be added to the output?

Note

this coded was not extensively tested.


wwojciech/stratallo documentation built on Dec. 24, 2024, 10:43 p.m.