
Generate Multiple Margin Tables from a Synthetic Population
Source:R/fn_utils-extractors.R
get_margin_frames_from_synthetic_population.RdCreates a collection of marginal distributions from a synthetic population.
Details
This function is useful when multiple margin tables are required for:
Validation.
Iterative proportional fitting (IPF).
Statistical reporting.
For each entry in margin_names, the function computes
the corresponding marginal distribution and returns the
collection as a named list.
This utility is commonly used when preparing inputs for IPF workflows and validating synthetic populations against known marginals.
Examples
if (FALSE) { # \dontrun{
margins <- get_margin_frames_from_synthetic_population(
population,
list(
"gender",
"age_group"
)
)
} # }