Calculate the percentate of votes in which parties voted the same

votesame(x, ...)

# S3 method for rollcall
votesame(x, order.x = NULL, ...)

# S3 method for voteList
votesame(x, order.x = NULL, ...)

Arguments

x

A rollcall or voteList object.

...

Other parameters passed on.

order.x

Character matrix of legislator names. This is used to re-order legislator (or party) columns, if desired.

Value

A matrix of voting similarities

Methods (by class)

  • rollcall: Votesame for rollcall object

  • voteList: Votesame for voteList object

Examples

votesame(examplevotes)
#> Verdonk D66 CDA PVV VVD SGP PvdA #> Verdonk 1.0000000 0.5573770 0.5245902 0.7540984 0.7868852 0.5901639 0.5409836 #> D66 0.5573770 1.0000000 0.8032787 0.4754098 0.6065574 0.5737705 0.8524590 #> CDA 0.5245902 0.8032787 1.0000000 0.4426230 0.6393443 0.7049180 0.8852459 #> PVV 0.7540984 0.4754098 0.4426230 1.0000000 0.7377049 0.5409836 0.4262295 #> VVD 0.7868852 0.6065574 0.6393443 0.7377049 1.0000000 0.7049180 0.6229508 #> SGP 0.5901639 0.5737705 0.7049180 0.5409836 0.7049180 1.0000000 0.6885246 #> PvdA 0.5409836 0.8524590 0.8852459 0.4262295 0.6229508 0.6885246 1.0000000 #> GL 0.5409836 0.8196721 0.6229508 0.3934426 0.5245902 0.6557377 0.7377049 #> SP 0.5409836 0.6885246 0.5901639 0.3934426 0.4590164 0.5573770 0.6721311 #> PvdD 0.4754098 0.7213115 0.5901639 0.3606557 0.4590164 0.5573770 0.7049180 #> CU 0.4754098 0.7868852 0.8852459 0.3934426 0.5901639 0.7213115 0.8360656 #> GL SP PvdD CU #> Verdonk 0.5409836 0.5409836 0.4754098 0.4754098 #> D66 0.8196721 0.6885246 0.7213115 0.7868852 #> CDA 0.6229508 0.5901639 0.5901639 0.8852459 #> PVV 0.3934426 0.3934426 0.3606557 0.3934426 #> VVD 0.5245902 0.4590164 0.4590164 0.5901639 #> SGP 0.6557377 0.5573770 0.5573770 0.7213115 #> PvdA 0.7377049 0.6721311 0.7049180 0.8360656 #> GL 1.0000000 0.8360656 0.8688525 0.7049180 #> SP 0.8360656 1.0000000 0.8032787 0.6065574 #> PvdD 0.8688525 0.8032787 1.0000000 0.6721311 #> CU 0.7049180 0.6065574 0.6721311 1.0000000