Peg household weights to person weights
force_balance_pums_weights.RdAdjusts household weights (WGTP) in PUMS data so that each household's WGTP matches the mean person weight (PWGTP) for that household. Use to ensure household and person weights are consistent for expansion and reporting.
Value
data.table. PUMS data with WGTP pegged to mean PWGTP for each household. Same schema as input.
Details
Calculates mean person weight (PWGTP) for each household (SERIALNO).
Sets household weight (WGTP) to this mean for all records in the household.
Checks for weight skew after adjustment using
check_weight_skew().Returns a copy; does not modify by reference.
See also
check_weight_skew
Other weighting adjustment:
adjust_pums_to_reference(),
adjust_ref_counts_dataset(),
adjust_target_to_study_zones(),
adjust_unrelated_per_wts(),
adjust_unrelated_pums(),
blend_initial_weights(),
calc_alpha(),
calc_initial_weights(),
calc_uwe()
Examples
## Not run:
pums <- data.table(SERIALNO = 1, SPORDER = 1, NP = 2, WGTP = 100, PWGTP = 50)
force_balance_pums_weights(pums)
#> Recalculating WGTP
#> Skew between HH/PER weights after pegging HH weights to person weights: -100% -- sum(NP*WGTP): 100, sum(PWGTP): 50
#> Index: <SPORDER>
#> SERIALNO SPORDER NP WGTP PWGTP
#> <num> <num> <num> <num> <num>
#> 1: 1 1 2 50 50
## End(Not run)