bemanian_beyer {ndi} | R Documentation |
Local Exposure and Isolation metric based on Bemanian & Beyer (2017)
Description
Compute the aspatial Local Exposure and Isolation (Bemanian & Beyer) metric of a selected racial/ethnic subgroup(s) and U.S. geographies.
Usage
bemanian_beyer(
geo_large = "county",
geo_small = "tract",
year = 2020,
subgroup,
subgroup_ixn,
omit_NAs = TRUE,
quiet = FALSE,
...
)
Arguments
geo_large |
Character string specifying the larger geographical unit of the data. The default is counties |
geo_small |
Character string specifying the smaller geographical unit of the data. The default is census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the racial/ethnic subgroup(s). See Details for available choices. |
subgroup_ixn |
Character string specifying the racial/ethnic subgroup(s) as the interaction population. If the same as |
omit_NAs |
Logical. If FALSE, will compute index for a larger geographical unit only if all of its smaller geographical units have values. The default is TRUE. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the aspatial Local Exposure and Isolation (LEx/Is) metric of selected racial/ethnic subgroups and U.S. geographies for a specified geographical extent (e.g., the entire U.S. or a single state) based on Bemanian & Beyer (2017) doi:10.1158/1055-9965.EPI-16-0926. This function provides the computation of LEx/Is for any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the aspatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
LEx/Is is a measure of the probability that two individuals living within a specific smaller geography (e.g., census tract) of either different (i.e., exposure) or the same (i.e., isolation) racial/ethnic subgroup(s) will interact, assuming that individuals within a smaller geography are randomly mixed. LEx/Is is standardized with a logit transformation and centered against an expected case that all races/ethnicities are evenly distributed across a larger geography. (Note: will adjust data by 0.025 if probabilities are zero, one, or undefined. The output will include a warning if adjusted. See logit
for additional details.)
LEx/Is can range from negative infinity to infinity. If LEx/Is is zero then the estimated probability of the interaction between two people of the given subgroup(s) within a smaller geography is equal to the expected probability if the subgroup(s) were perfectly mixed in the larger geography. If LEx/Is is greater than zero then the interaction is more likely to occur within the smaller geography than in the larger geography, and if LEx/Is is less than zero then the interaction is less likely to occur within the smaller geography than in the larger geography. Note: the exponentiation of each LEx/Is metric results in the odds ratio of the specific exposure or isolation of interest in a smaller geography relative to the larger geography.
Larger geographies available include state geo_large = "state"
, county geo_large = "county"
, and census tract geo_large = "tract"
levels. Smaller geographies available include, county geo_small = "county"
, census tract geo_small = "tract"
, and census block group geo_small = "block group"
levels. If a larger geographical area is comprised of only one smaller geographical area (e.g., a U.S county contains only one census tract), then the LEx/Is value returned is NA.
Value
An object of class 'list'. This is a named list with the following components:
lexis
An object of class 'tbl' for the GEOID, name, and LEx/Is at specified smaller census geographies.
lexis_data
An object of class 'tbl' for the raw census values at specified smaller census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute LEx/Is.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Isolation of non-Hispanic Black vs. non-Hispanic white populations
## of census tracts within Georgia, U.S.A., counties (2020)
bemanian_beyer(geo_large = "county", geo_small = "tract", state = "GA",
year = 2020, subgroup = "NHoLB", subgroup_ixn = "NHoLW")
## End(Not run)