Skip to contents

Imputes household income where missing or 'prefer not to answer', using survey and household variables. Use for cleaning and expanding income data.

Usage

impute_income_pnta(
  households,
  persons,
  value_labels,
  impute_vars = NULL,
  settings
)

Arguments

households

data.table. Household records to impute.

persons

data.table. Person records for household context.

value_labels

data.table. Value labels for variables.

impute_vars

character vector, optional. Variables for imputation model.

settings

list. Settings object with configs.

Value

data.table. Household IDs, imputed income, and labels.

Details

  • Prepares household and person data for imputation.

  • Uses model variables and ACS reference for prediction.

  • Handles missing block group GEOIDs and reference levels.

  • Returns data.table with imputed income and labels.

  • Assumes input is a data.table and value labels are complete.

  • Model form:

    • income_estimation ~ f_0_24999 + f_25000_49999 + f_50000_74999 + f_1000000_199999 + f_200000_plus + own_home + single_family_home + nonwadult_n + child_n + ft_grad_n + pt_grad_n + ft_bachelors_n + pt_bachelors_n + ft_no_college_n + pt_no_college_n + head_under_35_n + head_65_plus_n

Settings

  • report_dir (direct): directory for report output.

  • outputs_dir (direct): directory for imputation output.

Examples

## Not run:
impute_income_pnta(households, persons, value_labels)
#> Error in impute_income_pnta(households, persons, value_labels): argument "settings" is missing, with no default