Create adjustment factors to match expansion data to target year
create_ie_adjustment_data.RdCreate adjustment factors to align initial expansion data with target year using ACS and PUMS data. Use when expansion and target years differ in weighting pipelines.
Value
data.table with columns:
PUMA— PUMA identifier n_pums_yr— PUMS year household count ref_count_yr— ACS year household count adj_factor— adjustment factor Rows: one per PUMA. Keys: ( PUMA).
Details
Fetches ACS and PUMS data for specified years.
Calculates adjustment factors at PUMA level for households.
Handles household and person study units; errors if unsupported.
Returns a copy; does not modify by reference.
Assumes valid ACS/PUMS years and study unit type.
Settings
acs_year (direct): ACS reference year. Default from settings.
pums_year (direct): PUMS target year. Default from settings.
acs_dataset (direct): ACS dataset name. Default from settings.
study_unit (direct): Study unit type. Default from settings.
See also
fetch_pumsscripts/weighting/expansion_adjustment.R
Other weighting pipeline:
aggregate_targets(),
calc_day_weights(),
calc_linked_trip_weights(),
calc_person_weights(),
calc_sample_plan_counts(),
calc_tour_weights(),
calc_trip_weights(),
create_target_update_table(),
format_income_bins(),
get_day_groups(),
get_income_broad(),
get_income_broad_xwalk(),
prepare_zone_groups(),
update_daypat_seed(),
update_daypat_targets(),
update_income_broad_labels(),
update_rate_report(),
update_targets()
Examples
## Not run:
settings <- list(acs_year = 2019, pums_year = 2020, acs_dataset = "acs5", study_unit = "household")
create_ie_adjustment_data(settings)
#> Error in get("pops_dir", settings): object 'pops_dir' not found
## End(Not run)