Skip to contents

Constructs a crosswalk table mapping detailed and followup income bins to broad bins for harmonization.

Usage

get_income_broad_xwalk(value_labels, settings, max_income_bin = Inf)

Arguments

value_labels

data.table with required columns:

  • variable — variable name

  • value — bin code

  • label — bin label Rows: one per bin.

settings

list. Project settings for bin mapping.

max_income_bin

integer. Maximum income bin. Default: Inf.

Value

data.table with columns:

  • income_detailed — detailed bin

  • income_followup — followup bin

  • income_broad — broad bin

  • lower — lower bound

  • upper — upper bound

  • detailed_label — label for detailed bin

  • followup_label — label for followup bin Rows: one per bin mapping.

Details

  • Extracts lower and upper bounds for each bin from value_labels.

  • Joins detailed and followup bins to form a unified crosswalk.

  • Checks for duplicates and missing bins; errors if found.

  • Returns a copy; does not modify by reference.