meanridit: Compute mean ridit of group given reference group

Description Usage Arguments Value Author(s) References Examples

View source: R/meanridit.R

Description

Compute mean ridit for a group given a reference group

Usage

1
meanridit(v, ref)

Arguments

v

Vector of counts or proportions

ref

Vector of counts or proportions to use as reference group

Value

The group's mean ridit

Author(s)

Eric Bohlman

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# PolitiFact ratings in order of increasing truthfulness (8 Mar 2018)
obama <- c(9, 71, 70, 161, 165, 123)
trump <- c(77, 169, 114, 78, 60, 24)
# Probability that a random Trump statement is at least as truthful as a random Obama statement
meanridit(trump, obama)

## The function is currently defined as
function (v, ref)
{
    sum(to.ridit(ref) * v)/sum(v)
  }

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