filter_prd: Filter dyad-year data to include just politically relevant dyads
Description
filter_prd() filters a dyad-year data frame to just those that
are "politically relevant." This is useful for discarding unnecessary (and unwanted)
observations that just consume space in memory.
Usage
filter_prd(data)
Arguments
data
a dyad-year data frame (either "directed" or "non-directed")
Value
filter_prd() takes a dyad-year data frame, assuming it has columns for
major power status and contiguity type, calculates whether the dyad is "politically
relevant", and subsets the data frame to just those observations.
Details
"Political relevance" can be calculated a few ways. Right now, the function
considers only "direct" contiguity and Correlates of War major power status. You can employ
maximalist definitions of "direct contiguity" to focus on just the land-contiguous. This function
is inclusive of any type of contiguity relationship.
It will not take much effort to generalize this, though.
References
Weede, Erich. 1976. "Overwhelming preponderance as a pacifying condition among
contiguous Asian dyads." Journal of Conflict Resolution 20: 395-411.
Lemke, Douglas and William Reed. 2001. "The Relevance of Politically Relevant Dyads."
Journal of Conflict Resolution 45(1): 126-144.
# NOT RUN {# }# NOT RUN {# just call `library(tidyverse)` at the top of the your scriptlibrary(magrittr)
cow_ddy %>% add_contiguity() %>% add_cow_majors() %>% filter_prd()
# }# NOT RUN {# }