Skip to contents

Adjusts survey household and person data so unrelated householders are handled consistently. Removes unrelated persons from household size and returns updated tables.

Usage

adjust_unrelated_survey(households, persons, days, settings)

Arguments

persons

data.table. Person data. Columns:

  • person_id: Person ID (character or integer).

  • hh_id: Household ID (character or integer).

  • relationship: Relationship to householder (character).

  • vehicle: Vehicle driver status (integer).

  • employment: Employment status (integer).

days

data.table. Day-level survey data. Columns:

  • person_id: Person ID (character or integer).

settings

list. Pipeline settings object.

Value

list. Adjusted household and person tables (households, persons).

Details

In most travel surveys, unrelated householders (e.g., roommates, nonrelatives) are not included in trip diaries, so they must be excluded from household size and related calculations. This function identifies unrelated persons as those present in the person table but not in the day table, removes them from household size, and adjusts vehicle counts and other attributes to reflect the reduced household size. The adjustment brings survey data structure into agreement with analytical treatment, so expansion and weighting avoid bias from their inclusion or exclusion.

  • income_broad: Household income category (integer).

Examples

## Not run:
# households <- ... # load household data
# persons <- ... # load person data
# days <- ... # load day data
# settings <- ... # load pipeline settings
# adj <- adjust_unrelated_survey(households, persons, days, settings)
## End(Not run)