meanridit {ridittools} | R Documentation |
Compute mean ridit of group given reference group
Description
Compute mean ridit for a group given a reference group
Usage
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
# 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)
}
[Package ridittools version 0.1 Index]