# \donttest{
data(mtcars)
mtcars$am <- factor(mtcars$am)
mtcars$cyl <- factor(mtcars$cyl)
# Rank Biserial Correlation
# =========================
# Two Independent Samples ----------
(rb <- rank_biserial(mpg ~ am, data = mtcars))
# Same as:
# rank_biserial("mpg", "am", data = mtcars)
# rank_biserial(mtcars$mpg[mtcars$am=="0"], mtcars$mpg[mtcars$am=="1"])
# More options:
rank_biserial(mpg ~ am, data = mtcars, mu = -5)
print(rb, append_CLES = TRUE)
# One Sample ----------
rank_biserial(wt ~ 1, data = mtcars, mu = 3)
# same as:
# rank_biserial("wt", data = mtcars, mu = 3)
# rank_biserial(mtcars$wt, mu = 3)
# Paired Samples ----------
dat <- data.frame(Cond1 = c(1.83, 0.5, 1.62, 2.48, 1.68, 1.88, 1.55, 3.06, 1.3),
Cond2 = c(0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29))
(rb <- rank_biserial(Pair(Cond1, Cond2) ~ 1, data = dat, paired = TRUE))
# same as:
# rank_biserial(dat$Cond1, dat$Cond2, paired = TRUE)
interpret_rank_biserial(0.78)
interpret(rb, rules = "funder2019")
# Rank Epsilon Squared
# ====================
rank_epsilon_squared(mpg ~ cyl, data = mtcars)
# Kendall's W
# ===========
dat <- data.frame(cond = c("A", "B", "A", "B", "A", "B"),
ID = c("L", "L", "M", "M", "H", "H"),
y = c(44.56, 28.22, 24, 28.78, 24.56, 18.78))
(W <- kendalls_w(y ~ cond | ID, data = dat, verbose = FALSE))
interpret_kendalls_w(0.11)
interpret(W, rules = "landis1977")
# }
Run the code above in your browser using DataLab