This function predicts the gender of a first name given a year or range of
years in which the person was born. The prediction can use one of several
data sets suitable for different time periods or geographical regions. See
the package vignette for suggestions on using this function with multiple
names and for a discussion of which data set is most suitable for your
research question. When using certains methods, the genderdata
data
package is required; you will be prompted to install it if it is not already
available.
gender(name, years = c(1932, 2012), method = "ssa", certainty = TRUE)gender(name, years = c(1932, 2012), method = "ssa", certainty = TRUE)
c(1880, 1900)
. If no value is specified, then for the ssa
method it will use the period 1932 to 2"ssa"
method looks up names based from the
U.S. Social Security Administration baby name data. (This method is based
on an implementation by Cameron Blevin"male"
and "female"
for proportions above 0.5
,
"either"
for proportions that are exactly 0.5
, and NA
for combinations of names and years for which a gender cannot be predicted
using the given method.install_genderdata_package()
.gender("madison", method = "demo", years = 1985)
gender("madison", method = "demo", years = c(1900, 1985))
# SSA method
gender("madison", method = "demo", years = c(1900, 1985))
# IPUMS method
gender("madison", method = "ipums", years = 1860)
Run the code above in your browser using DataLab