Prepare microdata inputs for assembly
prepare.RdPrepares data inputs to pass to assemble. Harmonizes common variables for the specified donor and recipient surveys, imputes PUMA for donor records, and samples location variables for recipient records.
Usage
prepare(
donor,
recipient,
respondent,
implicates = 1,
collapse = FALSE,
ncores = getOption("fusionData.cores")
)Arguments
- donor
Character. Donor survey identifier (e.g.
"RECS_2015").- recipient
Character. Recipient (ACS) survey identifier (e.g.
"ACS_2015").- respondent
Character. Desired respondent level of microdata. Either
"household"or"person".- implicates
Integer. Number of PUMA implicates to return for the donor microdata.
- collapse
Logical. Should rows be collapsed and weighting factors aggregated when there are multiple imputations of the same household-PUMA?
- ncores
Integer. Number of physical CPU cores used for parallel computation.
Value
A list of length two containing output data frames specific to donor and recipient output, respectfully. Can be passed to assemble.