buildFamilyNetwork_Fam: Build Family Name-Level Family Networks

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/buildFamilyNetwork_Fam.R

Description

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.

Usage

1
buildFamilyNetwork_Fam(data, lastName, middleName, area = NULL, graph = TRUE)

Arguments

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.

Details

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.

Value

Either an igraph object or edge list (as data.table) with two columns containing ego and alter ids.

Author(s)

Michael Davidson mwdavidson@ucsd.edu

References

Cruz, C., Labonne, J. & Querubin, P. 2016. Politician Family Networks and Electoral Outcomes.

See Also

buildFamilyNetwork_Ind, buildFamilyNetwork_Community

Examples

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)

mwdavids/familyNetworks documentation built on May 23, 2019, 10:56 a.m.