Skip to contents

Compute achieved precision for several indicators under a two- or three-stage cluster allocation. This is the inverse of n_multi_cluster().

Usage

prec_multi_cluster(targets, ...)

# Default S3 method
prec_multi_cluster(
  targets,
  ...,
  domains = NULL,
  stage_cost = NULL,
  plan = NULL
)

# S3 method for class 'svyplan_cluster'
prec_multi_cluster(targets, ...)

Arguments

targets

For the default method, a non-empty data frame with one row per indicator. It must contain n and psu_size. Include ssu_size for a three-stage design. Cluster homogeneity and indicator columns follow the schema used by n_multi_cluster(). For svyplan_cluster methods, an allocation returned by n_multi_cluster().

...

Additional arguments passed to methods. Unused arguments are rejected.

domains

Optional character vector naming domain columns in targets.

stage_cost

Optional per-stage costs to retain for a later round trip to n_multi_cluster(). Costs do not enter the precision calculation.

plan

Optional svyplan() profile providing design metadata.

Value

A svyplan_prec object with per-indicator cluster precision in $detail.

Examples

targets <- data.frame(
  name = c("stunting", "anemia"),
  p = c(0.30, 0.10),
  n = c(60, 60),
  psu_size = c(12, 12),
  delta_psu = c(0.02, 0.05)
)
prec_multi_cluster(targets)
#> Multi-indicator sampling precision
#>  name     .se .moe .cv       
#>  stunting NA  NA   0.06287848
#>  anemia   NA  NA   0.13919411