Adjust targets to client zones
adjust_target_to_study_zones.RdAdjusts target data to client zones using a PUMA-to-client zone crosswalk. Use when PUMA targets must be allocated to client zones for weighting and reporting.
Arguments
- puma_targets
data.table. Required columns:
puma_id <character/integer> — PUMA identifier
h_total
— total households in PUMA p_total
— total persons in PUMA Additional columns: household and person targets (e.g., h_* and p_* fields) Rows: one per PUMA. Keys: (puma_id). Modified by reference: no (returns copy).
- puma_crosswalk
data.table with required columns:
puma_id <character/integer> — PUMA identifier
client_zone
— client zone name client_zone_id
— client zone identifier prop_hh
— proportion of PUMA households in zone prop_per
— proportion of PUMA persons in zone Rows: one per mapping. Keys: (puma_id, client_zone_id). Modified by reference: no (returns copy).
- settings
list. Must include:
force_balance_hh_weights
study_unit
Value
data.table. Aggregated client zone targets. Columns:
client_zone_id
— client zone identifier h_total
— total households in zone p_total
— total persons in zone Additional columns: household and person targets (e.g., h_* and p_* fields) Rows: one per client zone. Keys: (client_zone_id). Modified by reference: no (returns copy).
Details
Merges PUMA targets with crosswalk, scaling by household/person proportion.
Aggregates targets to client zones, excluding out-of-region areas.
Checks that new target sums match or are less than original PUMA targets.
Reports and trims PUMAs extending outside the study region.
Returns a copy; does not modify by reference.
Settings
force_balance_hh_weights (direct): Whether to balance household weights. Default from config/settings.json.
study_unit (direct): Study unit type. Default from config/settings.json.
See also
#' adjust_pums_to_reference, adjust_reference_to_target
Other weighting adjustment:
adjust_pums_to_reference(),
adjust_ref_counts_dataset(),
adjust_unrelated_per_wts(),
adjust_unrelated_pums(),
blend_initial_weights(),
calc_alpha(),
calc_initial_weights(),
calc_uwe(),
force_balance_pums_weights()