Who are You? Bayesian Prediction of Racial Category Using Surname, First Name, Middle Name, and Geolocation
Convert between state names, postal abbreviations, and FIPS codes
Preflight census data
Census Data download function.
Census geo API helper functions
Census helper function.
Census helper function.
Pre-process vector of names to match census style. Internal function
Legacy data formatting function.
Census API function.
Census API URL assembler.
Multilevel Census data download function.
Surname probability merging function.
Surname probability merging function.
Internal model fitting functions
Race prediction function.
Collapsed Gibbs sampler for hWRU. Internal function
Variable vector into chunks.
Preflight for name data
Predicts individual race/ethnicity using surname, first name, middle name, geolocation, and other attributes, such as gender and age. The method utilizes Bayes' Rule (with optional measurement error correction) to compute the posterior probability of each racial category for any given individual. The package implements methods described in Imai and Khanna (2016) "Improving Ecological Inference by Predicting Individual Ethnicity from Voter Registration Records" Political Analysis <DOI:10.1093/pan/mpw001> and Imai, Olivella, and Rosenman (2022) "Addressing census data problems in race imputation via fully Bayesian Improved Surname Geocoding and name supplements" <DOI:10.1126/sciadv.adc9824>. The package also incorporates the data described in Rosenman, Olivella, and Imai (2023) "Race and ethnicity data for first, middle, and surnames" <DOI:10.1038/s41597-023-02202-2>.