Coordinates the generation of synthetic households from a synthetic population.
Details
A ReplicaGrouper object manages one or more
ReplicaStructure objects and applies household
generation algorithms across user-defined population groups.
The class is responsible for:
Managing the synthetic population.
Coordinating household generation workflows.
Applying household-generation rules within geographic or demographic groups.
Assigning household identifiers.
Producing household-level summary tables.
Household generation typically proceeds as follows:
Create a
ReplicaGrouper.Create one or more
ReplicaStructureobjects.Register the household types using
renew.Execute household generation using
enhance.
During execution:
The synthetic population is partitioned according to
group_by.Households are generated independently within each group.
Household identifiers are assigned.
Household-level summary tables are generated.
Results are returned as:
A synthetic population containing household IDs.
A synthetic household table.
Slots
df_synth_popSynthetic population stored as a
data.table.group_byCharacter vector specifying the variables used to partition the synthetic population during household generation.
Typical examples include:
"neighb_code""sa2_code"Geographic or administrative identifiers
target_columnCharacter string identifying the column containing household-position classifications such as
"Parent","Child"or"SingleAdult".household_typesList of
ReplicaStructureobjects used during household generation.
Examples
if (FALSE) { # \dontrun{
hg <- ReplicaGrouper(
df_synth_pop = pop,
group_by = "neighb_code"
)
hg <- renew(
hg,
hh
)
result <- enhance(
hg
)
} # }
