impute_race: Impute Race to Categorical Variables After wru::predict_race

View source: R/impute_race.R

impute_raceR Documentation

Impute Race to Categorical Variables After wru::predict_race

Description

If you want to pass age, sex, and party, pass it exactly as in wru so that the ellipsis captures it. Detailed documentation will follow soon.

Usage

impute_race(
  df,
  census,
  state = "sSitusState",
  surname = "szNameLast",
  county = "county_fips",
  tract = "census_tract",
  block = "census_block",
  id = "lVoterUniqueID",
  keep_probs = FALSE,
  ...
)

Arguments

df

Dataframe prepped for wru::predict_race.

census

Census object.

state

State variable.

surname

Surname variable.

county

County variable.

tract

Tract variable.

block

Block variable.

id

ID variable.

keep_probs

Whether to keep the underlying probabilities generating the classification.

...

Other arguments to be passed to wru::predict_race.


sysilviakim/Kmisc documentation built on Jan. 28, 2023, 10:58 a.m.