Description Usage Arguments Value Author(s) References Examples
Given a vector of counts for a group and a vector of counts for a reference group, computes the standard error of the mean ridit for the group.
1 | seridit(v, ref)
|
v |
same as |
ref |
same as |
standard error of mean ridit
Eric Bohlman
Fleiss, J.,L., (1981), Statistical Methods for Rates and Proportions. New York: John Wiley & Sons, p. 154
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 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)
# Result is approximately standard normal
(meanridit(trump, obama) - 0.5) / seridit(trump, obama)
## The function is currently defined as
function (v, ref)
{
N <- sum(ref)
n <- sum(v)
term1 <- (n + 1)/N
term2 <- 1/(N * (N + n - 1))
term3 <- sum((ref + v)^3)/(N * (N + n) * (N + n - 1))
(1/(2 * sqrt(3 * n))) * sqrt(1 + term1 + term2 - term3)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.