Skip to contents

Compatibility wrapper around enemdu_indicator_table().

Usage

enemdu_survey_tabulate(
  data,
  indicator_id,
  group_vars = NULL,
  registry = enemdu_indicator_registry(),
  value = NULL,
  ids = "upm",
  strata = "estrato",
  weight = NULL,
  survey_type = NULL,
  domain_level = NULL,
  domain_var = NULL,
  strict_domain = FALSE,
  integrate_representativity = TRUE,
  household_id = "idhogar",
  hsize = "hsize",
  scale_adjustment = c("metadata", "never", "always"),
  conf_level = 0.95,
  lonely_psu = "adjust",
  sample_n_min = 60,
  unsupported = c("row", "skip", "error"),
  on_error = c("error", "row"),
  table_id = NULL
)

Arguments

data

A data frame.

indicator_id

Character vector of indicator identifiers.

group_vars

Optional character vector of grouping variables.

registry

Indicator registry. Defaults to package registry.

value

Optional value override. Use NULL, a single value for a single indicator, a named vector/list keyed by indicator_id, or a vector with the same length as indicator_id.

ids

Primary sampling unit variable. Defaults to "upm".

strata

Strata variable. Defaults to "estrato".

weight

Optional weight variable override. If NULL, uses registry weights through enemdu_indicator_estimate().

survey_type

Optional ENEMDU survey type.

domain_level

Optional domain level.

domain_var

Optional domain variable.

strict_domain

Logical. If TRUE, blocks domains outside design scope.

integrate_representativity

Logical. If TRUE, appends domain and representativity metadata.

household_id

Household identifier for household-scale adjustment.

hsize

Household-size variable.

scale_adjustment

One of "metadata", "never" or "always".

conf_level

Confidence level.

lonely_psu

Option passed to survey.lonely.psu.

sample_n_min

Minimum sample threshold.

unsupported

What to do with unsupported estimator types: "row", "skip" or "error".

on_error

What to do with estimation errors: "error" or "row".

table_id

Optional stable table identifier.

Value

A tibble in long format.