The stratallo package provides algorithms for computing optimum sample
allocations in stratified sampling designs. The implemented methods
solve several classical optimization problems arising in survey design
using exact analytical algorithms, rather than relying on numerical
approximations.
The package supports a variety of practical constraints, including lower and upper bounds on stratum sample sizes, cost constraints, and multi-domain precision control.
Installation
install.packages("stratallo") # Development version # install.packages("remotes") remotes::install_github("wwojciech/stratallo")
User functions
The package provides three main user functions for solving optimum allocation problems:
| Function | Description |
|---|---|
opt() |
Optimum allocation with a fixed total sample size. |
optcost() |
Minimum-cost allocation under a variance constraint. |
dopt() |
Multi-domain optimum allocation with controlled precision. |
The package also includes several helper functions:
| Function | Description |
|---|---|
var_st() |
Computes the value of the variance of the stratified |