
Create Households from Household Members
Source:R/all_generics.R, R/methods-ReplicaStructure.R
createFromMembers.RdExecutes the household-construction workflow for a
ReplicaStructure.
Usage
createFromMembers(object, mask, id_offset)
# S4 method for class 'ReplicaStructure'
createFromMembers(object, mask, id_offset)Arguments
- object
A
ReplicaStructureobject.- mask
Logical vector identifying agents eligible for household generation.
- id_offset
Integer household-ID offset.
Value
A list containing:
- object
Updated
ReplicaStructureobject.- id_offset
Updated household identifier offset.
Details
Depending on the household definition, this method may:
Create single-adult households.
Create couples.
Group children.
Match adults and children.
Create household records.
Adult households are generated first.
If children are present, sibling groups are created and matched to the adult groups.
The resulting households are stored in the
households slot.