Predict sex and maybe country from a name.
Usage
predict_demographics(given, family = NULL, country = NULL,
source = "all", dir = tempdir(), ssa_source = "national",
full_country = FALSE, verbose = TRUE)Arguments
- given
A vector of given (first) names. Case sensitive for all but
wgnd.- family
A vector of family (last; sur) names. Only used in
fbto adjust country predictions. Case sensitive.- country
A vector of 2-letter country codes. Only used in
wgndto givesex_in_country_wgnd.- source
A vector specify which source(s) to use:
World Gender Name Dictionary (
wgnd)Facebook Hack (
fb)Skydeck Censuses (
skydeck)
Defaults to
allto return all.- dir
Directory in which to save original and prepared names data.
- ssa_source
Source of USSSA data; passed to
get_baby_names.- full_country
Logical; if
TRUE, a column for each country will be returned for sourcefb, each containing a probability for that country. Otherwise, only the most likely country is returned in apredicted_countrycolumn.- verbose
Logical; if
FALSE, will not show status messages.