toridit: Compute ridit scores for group

Description Usage Arguments Value Author(s) References Examples

View source: R/toridit.R

Description

Computes the vector of ridit scores corresponding to a vector of counts or proportions.

Usage

1

Arguments

v

vector of counts or proportions

Value

vector of ridit scores

Author(s)

Eric Bohlman

References

Fleiss, J.,L., (1981), Statistical Methods for Rates and Proportions. New York: John Wiley & Sons, p. 152

Examples

1
2
3
4
5
6
7
8
9
# PolitiFact ratings for Barack Obama in order of increasing truthfulness (8 Mar 2018)
toridit(c(9, 71, 70, 161, 165, 123)) # counts
toridit(c(.02, .12, .12, .27, .28, .21)) # proportions

## The function is currently defined as
function (v)
{
    (cumsum(v) - 0.5 * v)/sum(v)
  }

Example output

[1] 0.007512521 0.074290484 0.191986644 0.384808013 0.656928214 0.897328881
[1] 0.009803922 0.078431373 0.196078431 0.387254902 0.656862745 0.897058824
function (v) 
{
    (cumsum(v) - 0.5 * v)/sum(v)
}

ridittools documentation built on May 1, 2019, 6:30 p.m.