Description Usage Arguments Value References Examples
Polarization measure calculation from an N\times 1 vector of voter ideology and an N\times 1 vector of voter party affiliation.
1 | pol_measure(ideology, party, method, exclude = NULL)
|
ideology |
N\times 1 vector of voter ideology. |
party |
N\times 1 vector of voter party affiliation. |
method |
Polarization measure. μ_s is the mean ideology of party s, P is the number of parties, ρ_s is the discrepancy between the maximum value and the minimum value of party s members' ideology, \barμ is the mean ideology of the entire set of individuals, and N_s is the number of members of party s.
|
exclude |
A vector of party labels to be excluded (e.g. party label for an independent member). |
Polarization measure.
Esteban, Joan-Maria, and Debraj Ray. "On the measurement of polarization." Econometrica: Journal of the Econometric Society (1994): 819-851.
Rehm, Philipp, and Timothy Reilly. "United we stand: Constituency homogeneity and comparative party polarization." Electoral Studies 29.1 (2010): 40-53.
McCarty, Nolan, Keith T. Poole, and Howard Rosenthal. Polarized America: The dance of ideology and unequal riches. MIT Press, 2016.
Poole, Keith T., et al. "Scaling roll call votes with wnominate in R." Journal of Statistical Software 42.14 (2011): 1-21.
Zeileis, Achim, Christian Kleiber, and Simon Jackman. "Regression models for count data in R." Journal of statistical software 27.8 (2008): 1-25.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Calculate the four versions of party polarization measures after generating
## a vote matrix with 1000 votes in a two party legislature consisting of 100 legislators.
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
rc <- pscl::rollcall(V)
wn_result <- wnominate::wnominate(rc,polarity=c(1),dims=1)
ideology <- wn_result$legislators$coord1D
pol_value <- matrix(0,4,1)
for (i in 1:4){
pol_value[i,1] <- pol_measure(ideology, party, i)
}
## Measure the party polarization level of the 110th U.S. Senate
## using the range measure after excluding independent members with party label 328.
res <- Rvoteview::voteview_search(chamber = "Senate", congress = c(110))
rc <- Rvoteview::voteview_download(res$id)
pol_value <- pol_measure(as.numeric(rc$legis.data$dim1), rc$legis.data$party_code, 'range', 328)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.