conv_race | R Documentation |
Convert race to factor
conv_race(vec, pacific = "asian")
vec |
a character vector of races to be converted to a factor |
pacific |
whether to consider "Asian or Pacific Islander" as part of the "Native Hawaiian or Pacific islander" level or part of the "Asian" level. |
2005-2007 NSQIP PUFs included a race called "Asian or Pacific islander". Later PUFs split these into "Asian" and
"Native Hawaiian or Pacific islander". In order to combine PUFs, a decision must be made as to which group to assign
"Asian or Pacific islander" to. To assign them to "Asian", pacific
should be set to "asian". To assign them to
"Native Hawaiian or Pacific islander", pacific
should be set to "hawaiian".
a factor vector
x <- c("White","Black or African American","Asian or Pacific Islander")
nsqipr:::conv_race(x)
x
x <- c("White","Black or African American","Asian or Pacific Islander")
nsqipr:::conv_race(x, pacific = "hawaiian")
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.