Skip to contents

Share of votes each legislator casts with their own party's majority. With unity_votes_only = TRUE only roll calls where the two largest parties' majorities oppose each other count (the CQ convention). Ties within a party leave that roll call undefined for its members. Mirrors morie.fn.agpar.

Usage

morie_party_unity(vote_matrix, party_id, unity_votes_only = FALSE)

Arguments

vote_matrix

Binary vote matrix (1 = yea, 0 = nay, NA = missing), legislators in rows.

party_id

Party label per legislator.

unity_votes_only

Restrict to party-unity votes.

Value

List with unity, by_party, n_votes_scored, n.

References

Poole KT, Rosenthal H (1997). Congress: A Political-Economic History of Roll Call Voting. Oxford University Press. Rice SA (1925). The behavior of legislative groups: a method of measurement. Political Science Quarterly 40(1), 60-72.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_party_unity(V, V)
#> $unity
#> [1] 1 0 0 0 0 0 0 0
#> 
#> $by_party
#> $by_party$`1`
#> [1] 1
#> 
#> $by_party$`2`
#> [1] 0
#> 
#> $by_party$`3`
#> [1] 0
#> 
#> $by_party$`4`
#> [1] 0
#> 
#> $by_party$`5`
#> [1] 0
#> 
#> $by_party$`6`
#> [1] 0
#> 
#> $by_party$`7`
#> [1] 0
#> 
#> $by_party$`8`
#> [1] 0
#> 
#> 
#> $n_votes_scored
#> [1] 1 1 1 1 1 1 1 1
#> 
#> $n
#> [1] 8
#>