Reduce per-scheme weights to the admin levels that must be hidden
get_min_admin_wght.RdFor each weighting scheme in `wght_list`, returns the unique admin levels that carry a non-zero-weighted indicator missing data (per `un_available_vars`). Schemes where no weighted indicator is missing return `NULL`.
Value
A named list mirroring `wght_list`'s names. Each element is either a character vector of admin levels to hide, or `NULL` if the scheme is unaffected.
See also
Other weights:
get_all_weights_combs(),
get_rand_weights()
Examples
unavail <- tibble::tibble(
var_code = "ind_b",
admin_level = "admin1"
)
wghts <- list(
scheme_x = tibble::tibble(
var_code = c("ind_a", "ind_b"),
weight = c(0.5, 0.5)
),
scheme_y = tibble::tibble(
var_code = c("ind_a", "ind_b"),
weight = c(1, 0)
)
)
get_min_admin_wght(unavail, wghts)
#> $scheme_x
#> [1] "admin1"
#>
#> $scheme_y
#> NULL
#>