means_ratio | R Documentation |
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,
...
)
x , y |
A numeric vector, or a character name of one in |
data |
An optional data frame containing the variables. |
paired |
If |
adjust |
Should the effect size be adjusted for small-sample bias?
Defaults to |
log |
Should the log-ratio be returned? Defaults to |
ci |
Confidence Interval (CI) level |
alternative |
a character string specifying the alternative hypothesis;
Controls the type of CI returned: |
verbose |
Toggle warnings and messages on or off. |
... |
Arguments passed to or from other methods. When |
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.
A data frame with the effect size (Means_ratio
or
Means_ratio_adjusted
) and their CIs (CI_low
and CI_high
).
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).
see
The see
package contains relevant plotting functions. See the plotting vignette in the see
package.
The small-sample bias corrected response ratio reported from this function is derived from Lajeunesse (2015).
Lajeunesse, M. J. (2011). On the meta-analysis of response ratios for studies with correlated and multi-group designs. Ecology, 92(11), 2049-2055. \Sexpr[results=rd]{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. \Sexpr[results=rd]{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. \Sexpr[results=rd]{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()
,
repeated_measures_d()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.