#' Obtain Ten Berge and Socan's (2004) mu3
#'
#' Obtain Ten Berge and Socan's (2004) mu3.
#'
#' The original formula and the formula of psych's tenberge() are different.
#' There is a high possibility that the original formula is incorrect and psych's
#' version is correct. According to Equation (4) of the original article, mu
#' should increase monotonically (e.g., mu4>=mu3), but if the original formula is
#' followed, it may decrease in some cases. The formula of the original paper is
#' 2h, but changing it to 2^h solves this problem. This function follow the latter
#' interpretation.
#'
#' @author Eunseong Cho, \email{bene@kw.ac.kr}
#' @param data a dataframe or a matrix (unidimensional)
#' @export mu3
#' @references Ten Berge, J. M. F., & Zegers, F. E. (1978). A series of lower
#' bounds to the reliability of a test. Psychometrika, 43(4), 575-579.
#' @examples mu3(Graham1)
mu3 <- function(data) {
m <- get_cov(data)
n <- nrow(m)/(nrow(m) - 1)
off <- m
diag(off) <- 0
numerator <- sum(off) +
sqrt(sum(off^2) +
sqrt(sum(off^4) +
sqrt(n * sum(off^8))))
mu3 <- numerator/sum(m)
class(mu3) <- c("mu3")
return(mu3)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.