net_newman: Vote profile correlation matrix converter

Description Usage Arguments Value References Examples

View source: R/net_newman.R

Description

Convert an N\times M vote matrix into an N\times N vote profile correlation matrix of N voters following Newman (2001).

Usage

1

Arguments

V

N\times M vote matrix with yes: 1 and no: 0.

Value

N\times N adjacency matrix of voter-to-voter vote profile correlation for yes votes with normalization following Newman (2001).

References

Newman, Mark EJ. "Scientific collaboration networks. II. Shortest paths, weighted networks, and centrality." Physical review E 64.1 (2001): 016132.

Porter, Mason A., et al. "A network analysis of committees in the US House of Representatives." Proceedings of the National Academy of Sciences 102.20 (2005): 7057-7062.

Examples

1
2
3
4
5
6
7
## Generate a vote matrix with 1000 votes in a two party legislature consisting of 100 members
party <- rbind(matrix(1,50,1),matrix(2,50,1))
vote_data <- pol_simul(party = party, M = 1000, partyMean = c(-1,1), partySD = c(.5,.5))
V <- vote_data$votes

## Sum up vote profile correlation matrices for yes and no votes respectively
A <- net_newman(V) + net_newman(!V)

ysohn/polarization documentation built on Jan. 1, 2021, 1:46 p.m.