Validates whether a requested domain is a design domain for the selected ENEMDU survey type. Domains outside the design scope are not automatically forbidden, but they are classified as analysis domains requiring precision evaluation and clear reporting.
Usage
enemdu_validate_domain_scope(
survey_type,
domain_level = NULL,
domain_var = NULL,
group_vars = NULL,
domain_registry = enemdu_domain_registry(),
domain_variable_registry = enemdu_domain_variable_registry(),
strict = FALSE,
emit = TRUE
)Arguments
- survey_type
One of
"mensual","trimestral"or"anual".- domain_level
Optional domain level, for example
"nacional","urbano_rural","ciudad_5","provincia_24","canton"or"subpoblacion_sociodemografica".- domain_var
Optional variable name used for the domain.
- group_vars
Optional grouping variables. When
domain_levelis not supplied, the function tries to infer domain levels from these variables.- domain_registry
Domain registry. Defaults to package registry.
- domain_variable_registry
Domain-variable registry. Defaults to package registry.
- strict
Logical. If
TRUE, errors when the requested domain is not a design domain.- emit
Logical. If
TRUE, emits an informative message.