Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/buildFamilyNetwork_Fam.R
This function produces a family-level marriage network following the rules of name inheritance used in the Philippines. These rules were employed by Cruz, Labonne, and Querubin (2016) to construct family networks where family names are the nodes and marriages are the Edges.
1 | buildFamilyNetwork_Fam(data, lastName, middleName, area = NULL, graph = TRUE)
|
data |
A data frame with individuals on the rows and attributes on the columns. |
lastName |
Character string corresponding to the column in data of last names. |
middleName |
Character string corresponding to the column in data of middle names. |
area |
Character string corresponding to the name of a vector in data that distinguishes an area within which network ties should be drawn. Vector is coerced to factor. Default is NULL. |
graph |
Logical. Should an igraph object be produced. If false, an edge list is returned. Default is TRUE. |
This function constructs family networks, with family names serving as nodes in the network, following the naming convention first exploited by Cruz, Labonne, and Querubin (2016). See their paper for details on the inheritance rules that make this possible.
Either an igraph object or edge list (as data.table) with two columns containing ego and alter ids.
Michael Davidson mwdavidson@ucsd.edu
Cruz, C., Labonne, J. & Querubin, P. 2016. Politician Family Networks and Electoral Outcomes.
buildFamilyNetwork_Ind
,
buildFamilyNetwork_Community
1 2 3 4 5 6 7 8 | # Load provided sample data
data(CARASI)
# Build the network producing an Igraph object
buildFamilyNetwork_Fam(data = CARASI, lastName = "lastName", middleName = "middleName", area = "BARANGAY", graph = TRUE)
# Build the network producing an edge list
buildFamilyNetwork_Fam(data = CARASI, lastName = "lastName", middleName = "middleName", area = "BARANGAY", graph = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.