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.
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
#>
