create_statedays: Create state-days from state system membership data

View source: R/create_statedays.R

create_statedaysR Documentation

Create state-days from state system membership data

Description

create_statedays() allows you to create state-day data from either the Correlates of War (CoW) state system membership data or the Gleditsch-Ward (gw) system membership data. The function leans on internal data provided in the package.

Usage

create_statedays(system = "cow", mry = TRUE)

Arguments

system

a character specifying whether the user wants Correlates of War state-years ("cow") or Gleditsch-Ward ("gw") state-years. Correlates of War is the default.

mry

optional, defaults to TRUE. If TRUE, the function extends the script beyond the most recent system membership updates to include observation to the most recently concluded calendar year. For example, the Gleditsch-Ward data extend to the end of 2017. When mry == TRUE, the function returns more recent years (e.g. 2018, 2019) under the assumption that states alive at the end of 2017 are still alive today. Use with some care.

Value

create_statedays() takes state system membership data provided by either Correlates of War or Gleditsch-Ward and returns a simple state-day data frame.

Author(s)

Steven V. Miller

References

Miller, Steven V. 2019. “Create Country-Year and (Non)-Directed Dyad-Year Data With Just a Few Lines in R” http://svmiller.com/blog/2019/01/create-country-year-dyad-year-from-country-data/

Examples



# CoW is default, will include years beyond 2016 (most recent CoW update)
create_statedays()

# Gleditsch-Ward, include most recent years
create_statedays(system="gw")

# Gleditsch-Ward, don't include most recent years
create_statedays(system="gw", mry=FALSE)




peacesciencer documentation built on March 31, 2023, 8:37 p.m.