calc_attina_index: Calculating Attina's Index of Agreement

Description Usage Arguments Examples

View source: R/attina_index.R

Description

This function allows you to easily calculate Attina´s Index of Agreement for a given vote.

Usage

1
calc_attina_index(votecounts, rescale = FALSE)

Arguments

votecounts

A vector containing the number or share of votes for yes, no and abstain in any given order. If a vector of a shorter length than 3 is given, the count/frequency of the missing vote option(s) is assumed to be 0.

rescale

Default: FALSE. If TRUE the result gets rescaled from its former range of -33.333 to 100 to a range of 0 to 1. A value of 0.25 now represents that 50% of the values were casted for one of the options.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Examples of using calc_attina_index() :

test_attina <- c(15, 2, 5)

test_attina_shorter <- c(15,2)

test_attina_longer <- c(15,2,5,6)

calc_attina_index(test_attina)

calc_attina_index(test_attina_shorter)

calc_attina_index(test_attina_longer)

RStelzle/rstfuns documentation built on Oct. 3, 2020, 4:06 p.m.