Computes the ratio of two means (also known as the "response ratio"; RR) of
variables on a ratio scale (with an absolute 0). Pair with any reported
stats::t.test()
.
means_ratio(
x,
y = NULL,
data = NULL,
paired = FALSE,
adjust = TRUE,
log = FALSE,
ci = 0.95,
alternative = "two.sided",
verbose = TRUE,
...
)
A data frame with the effect size (Means_ratio
or
Means_ratio_adjusted
) and their CIs (CI_low
and CI_high
).
A numeric vector, or a character name of one in data
.
Any missing values (NA
s) are dropped from the resulting vector.
x
can also be a formula (see stats::t.test()
), in which case y
is
ignored.
An optional data frame containing the variables.
If TRUE
, the values of x
and y
are considered as paired.
The correlation between these variables will affect the CIs.
Should the effect size be bias-corrected? Defaults to TRUE
;
Advisable for small samples.
Should the log-ratio be returned? Defaults to FALSE
.
Normally distributed and useful for meta-analysis.
Confidence Interval (CI) level
a character string specifying the alternative hypothesis;
Controls the type of CI returned: "two.sided"
(default, two-sided CI),
"greater"
or "less"
(one-sided CI). Partial matching is allowed (e.g.,
"g"
, "l"
, "two"
...). See One-Sided CIs in effectsize_CIs.
Toggle warnings and messages on or off.
Arguments passed to or from other methods. When x
is a formula,
these can be subset
and na.action
.
Confidence intervals are estimated as described by Lajeunesse (2011 & 2015) using the log-ratio standard error assuming a normal distribution. By this method, the log is taken of the ratio of means, which makes this outcome measure symmetric around 0 and yields a corresponding sampling distribution that is closer to normality.
"Confidence intervals on measures of effect size convey all the information
in a hypothesis test, and more." (Steiger, 2004). Confidence (compatibility)
intervals and p values are complementary summaries of parameter uncertainty
given the observed data. A dichotomous hypothesis test could be performed
with either a CI or a p value. The 100 (1 - \(\alpha\))% confidence
interval contains all of the parameter values for which p > \(\alpha\)
for the current data and model. For example, a 95% confidence interval
contains all of the values for which p > .05.
Note that a confidence interval including 0 does not indicate that the null
(no effect) is true. Rather, it suggests that the observed data together with
the model and its assumptions combined do not provided clear evidence against
a parameter value of 0 (same as with any other value in the interval), with
the level of this evidence defined by the chosen \(\alpha\) level (Rafi &
Greenland, 2020; Schweder & Hjort, 2016; Xie & Singh, 2013). To infer no
effect, additional judgments about what parameter values are "close enough"
to 0 to be negligible are needed ("equivalence testing"; Bauer & Kiesser,
1996).
The Means Ratio ranges from 0 to \(\infty\), with values smaller than 1 indicating that the second mean is larger than the first, values larger than 1 indicating that the second mean is smaller than the first, and values of 1 indicating that the means are equal.
Lajeunesse, M. J. (2011). On the meta‐analysis of response ratios for studies with correlated and multi‐group designs. Ecology, 92(11), 2049-2055. tools:::Rd_expr_doi("10.1890/11-0423.1")
Lajeunesse, M. J. (2015). Bias and correction for the log response ratio in ecological meta‐analysis. Ecology, 96(8), 2056-2063. tools:::Rd_expr_doi("10.1890/14-2402.1")
Hedges, L. V., Gurevitch, J., & Curtis, P. S. (1999). The meta-analysis of response ratios in experimental ecology. Ecology, 80(4), 1150–1156. tools:::Rd_expr_doi("10.1890/0012-9658(1999)080[1150:TMAORR]2.0.CO;2")
Other standardized differences:
cohens_d()
,
mahalanobis_d()
,
p_superiority()
,
rank_biserial()
x <- c(1.83, 0.50, 1.62, 2.48, 1.68, 1.88, 1.55, 3.06, 1.30)
y <- c(0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29)
means_ratio(x, y)
means_ratio(x, y, adjust = FALSE)
means_ratio(x, y, log = TRUE)
# The ratio is scale invariant, making it a standardized effect size
means_ratio(3 * x, 3 * y)
Run the code above in your browser using DataLab