Skip to contents

Blends initial weights for ABS and NPS samples using calculated alpha values. Ensures total weights match reference counts after blending.

Usage

blend_initial_weights(seed, alpha_dt)

Arguments

seed

data.table. Survey data with initial_weight column.

alpha_dt

data.table. Blending factors by invitation.

Value

data.table. Survey data with blended initial_weight column.

Details

  • Joins alpha values to seed data by invitation.

  • Multiplies initial weights by alpha for each group.

  • Checks that total weights match expected reference counts.

  • Returns a copy; does not modify by reference.

See also

calc_alpha calc_initial_weights scripts/040_initial_expansion.R

Other weighting adjustment: adjust_pums_to_reference(), adjust_ref_counts_dataset(), adjust_target_to_study_zones(), adjust_unrelated_per_wts(), adjust_unrelated_pums(), calc_alpha(), calc_initial_weights(), calc_uwe(), force_balance_pums_weights()

Examples

## Not run:
# seed <- ... # survey data with initial_weight
# alpha_dt <- data.table(invitation = c("ABS", "NPS"), alpha = c(0.5, 0.5))
# blend_initial_weights(seed, alpha_dt)
## End(Not run)