Description Usage Arguments Value References Examples
Convert an N\times M vote matrix into an N\times N vote profile correlation matrix of N voters following Newman (2001).
1 | net_newman(V)
|
V |
N\times M vote matrix with yes: 1 and no: 0. |
N\times N adjacency matrix of voter-to-voter vote profile correlation for yes votes with normalization following Newman (2001).
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.