HTS Weighting Manual
Welcome, Weighter!
This manual is a narrative guide to RSG’s HTS weighting workflow. It pairs runnable code with plain-language explanations so analysts can trace how inputs become analysis-ready weights. Code that generates tables and figures are interspersed throughout the code that generates the weights, so technical reviewers can see exactly what changed and why.
As a fully annotated version of RSG’s weighting “scripts,” or implementation of the weighting tools (RSG’s hts.weighting package) and configuration (.yaml settings), this workbook can be used in any of these three ways:
- Run it end-to-end to reproduce RSG’s delivered weights by executing
quarto render manualin terminal from the repository root. - Step into individual
.qmdchapters inmanual/using an IDE like Positron or RStudio to edit or debug code. - Read the rendered Quarto manual on GitHub Pages for detailed context, explanations, and visual QAQC of the weighting implementation.
What’s in Here
This manual is organized into three parts:
Part 1: Configuration
This section mirrors some of the content found in the root of the repository (e.g., README.md, USAGE.md, and INSTALL.md), while the introduction chapter provides additional context on the weighting methodology and intended audience.
Introduction: Overview of the HTS weighting methodology, its audience, and prerequisites.
Open chapterInstallation: Step-by-step guide to installing and setting up the
hts.weightingtoolkit.
Open chapterConfiguration: Detailed instructions for configuring the
hts.weightingpipeline using YAML schemas.
Open chapterUsage: Guide on running
hts.weightingpipeline via Quarto.
Open chapter
Part 2: Workflow
This section contains the core chapters that document each step of the weighting process, from data preparation to final weight adjustments.
Geographic Data Preparation: Prepares geographic data by aligning survey inputs, Census controls, and study zones for consistent analysis.
Open chapterTarget Data Preparation: Constructs demographic and geographic control totals from ACS/PUMS data for weighting targets.
Open chapterSurvey Data Preparation: Cleans, imputes, and formats HTS survey data for integration with PopulationSim.
Open chapterRound 1 Weighting: Demographic Calibration: Generates initial household weights to align survey data with Census targets while minimizing variance.
Open chapterRound 2 Weighting: Day-Pattern Adjustment: Adjusts weights for day-pattern reporting biases across different diary methods.
Open chapterRound 3 Weighting: Trip Weight Adjustment: Refines trip-level weights to address reporting biases and ensure accurate trip-type representation.
Open chapter
Part 3: Reference
This section includes supplementary materials to support understanding and implementation of the weighting process.
Glossary of Terms: Terminology used throughout the workbook
Open glossaryConfiguration Schema Documentation: Reference manual for configuration parameters
Open referenceFunction Reference:
hts.weightingfunction arguments, returns, examples
Browse reference (redirects to pkgdown site)