







































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Effect size for ANOVA. Description. Functions to compute effect size measures for ANOVAs, such as Eta- (η), Omega- (ω) and Epsilon-.
Typology: Study Guides, Projects, Research
1 / 79
This page cannot be seen from the preview
Don't miss anything!
Type Package
Title Indices of Effect Size and Standardized Parameters
Version 0.7.
Maintainer Mattan S. Ben-Shachar matanshm@post.bgu.ac.il
Description Provide utilities to work with indices of effect size and standardized parameters for a wide variety of models (see list of supported models using the function 'insight::supported_models()'), allowing computation of and conversion between indices such as Cohen's d, r, odds, etc.
License GPL-
URL https://easystats.github.io/effectsize/
BugReports https://github.com/easystats/effectsize/issues/
Depends R (>= 3.4)
Imports bayestestR (>= 0.12.1), insight (>= 0.17.0), parameters (>= 0.18.0), performance (>= 0.9.0), datawizard (>= 0.4.1), stats, utils
Suggests correlation (>= 0.8.0), see (>= 0.6.9), afex, BayesFactor, biglm, boot, brms, car, covr, emmeans, gamm4, knitr, lavaan, lm.beta, lme4, lmerTest, MASS, mediation, mgcv, pscl, rmarkdown, rms, rstanarm, rstantools, spelling, testthat, tidymodels
VignetteBuilder knitr
Encoding UTF-
Language en-US
RoxygenNote 7.2.
Config/testthat/edition 3
Config/testthat/parallel true
NeedsCompilation no
2 R topics documented:
Author Mattan S. Ben-Shachar [aut, cre] (https://orcid.org/0000-0002-4287-4801, @mattansb), Dominique Makowski [aut] (https://orcid.org/0000-0001-5375-9967, @Dom_Makowski), Daniel Lüdecke [aut] (https://orcid.org/0000-0002-8895-3206, @strengejacke), Indrajeet Patil [aut] (https://orcid.org/0000-0003-1995-6531, @patilindrajeets), Brenton M. Wiernik [aut] (https://orcid.org/0000-0001-9560-6336, @bmwiernik), Ken Kelley [ctb], David Stanley [ctb], Jessica Burnett [rev] (https://orcid.org/0000-0002-0896-5099), Johannes Karreth [rev] (https://orcid.org/0000-0003-4586-7153)
Repository CRAN
Date/Publication 2022-05-26 13:20:02 UTC
R topics documented:
chisq_to_phi......................................... 3 cles............................................. 7 cohens_d.......................................... 9 d_to_cles.......................................... 13 d_to_r............................................ 15 effectsize.BFBayesFactor.................................. 16 effectsize_API........................................ 19 effectsize_CIs........................................ 20 effectsize_deprecated.................................... 23 equivalence_test.effectsize_table.............................. 24 eta2_to_f2.......................................... 26 eta_squared......................................... 27 format_standardize..................................... 33 F_to_eta2.......................................... 34 hardlyworking........................................ 38 interpret........................................... 38 interpret_bf......................................... 40 interpret_cohens_d..................................... 41 interpret_cohens_g..................................... 43 interpret_direction...................................... 44 interpret_ess......................................... 44 interpret_gfi......................................... 45 interpret_icc......................................... 48 interpret_kendalls_w.................................... 49 interpret_oddsratio..................................... 50 interpret_omega_squared.................................. 51 interpret_p.......................................... 52 interpret_pd......................................... 53
4 chisq_to_phi
chisq, n, nrow, ncol, ci = 0.95, alternative = "greater", adjust = FALSE, ... )
chisq_to_normalized( chisq, n, nrow, ncol, p, ci = 0.95, alternative = "greater", ... )
chisq_to_pearsons_c( chisq, n, nrow, ncol, ci = 0.95, alternative = "greater", ... )
phi_to_chisq(phi, n, ...)
Arguments
chisq The Chi-squared statistic. n Total sample size. nrow, ncol The number of rows/columns in the contingency table. ci Confidence Interval (CI) level alternative a character string specifying the alternative hypothesis; Controls the type of CI returned: "greater" (default) or "less" (one-sided CI), or "two.sided" (default, two-sided CI). Partial matching is allowed (e.g., "g", "l", "two"...). See One-Sided CIs in effectsize_CIs. adjust Should the effect size be bias-corrected? Defaults to FALSE. ... Arguments passed to or from other methods. p Vector of expected values. See stats::chisq.test(). phi The Phi statistic.
chisq_to_phi 5
Details
These functions use the following formulae:
φ =
χ^2 /n
Cramer′sV = φ/
min(nrow, ncol) − 1
P earson′sC =
χ^2 /(χ^2 + n)
χN ormalized = w ×
q 1 − q Where q is the smallest of the expected probabilities.
For adjusted versions of phi and V, see Bergsma, 2013.
Value
A data frame with the effect size(s), and confidence interval(s). See cramers_v().
Confidence (Compatibility) Intervals (CIs)
Unless stated otherwise, confidence (compatibility) intervals (CIs) are estimated using the non- centrality parameter method (also called the "pivot method"). This method finds the noncentrality parameter ("ncp") of a noncentral t, F, or χ^2 distribution that places the observed t, F, or χ^2 test statistic at the desired probability point of the distribution. For example, if the observed t statistic is 2.0, with 50 degrees of freedom, for which cumulative noncentral t distribution is t = 2.0 the. quantile (answer: the noncentral t distribution with ncp = .04)? After estimating these confidence bounds on the ncp, they are converted into the effect size metric to obtain a confidence interval for the effect size (Steiger, 2004).
For additional details on estimation and troubleshooting, see effectsize_CIs.
CIs and Significance Tests
"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 - α)% confidence interval contains all of the parameter values for which p > α 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 pro- vided clear evidence against a parameter value of 0 (same as with any other value in the interval),
cles 7
7.8521, n = sum(Smoking_ASD), nrow = 1, ncol = 3, p = c(0.015, 0.010, 0.975) )
cles Estimate Common Language Effect Sizes (CLES)
Description
cohens_u3(), p_superiority(), and p_overlap() give only one of the CLESs.
Usage
cles( x, y = NULL, data = NULL, mu = 0, ci = 0.95, alternative = "two.sided", parametric = TRUE, verbose = TRUE, iterations = 200, ... )
common_language( x, y = NULL, data = NULL, mu = 0, ci = 0.95, alternative = "two.sided", parametric = TRUE, verbose = TRUE, iterations = 200, ... )
cohens_u3(...)
p_superiority(...)
p_overlap(...)
8 cles
Arguments
x A formula, a numeric vector, or a character name of one in data. y A numeric vector, a grouping (character / factor) vector, a or a character name of one in data. Ignored if x is a formula. data An optional data frame containing the variables. mu a number indicating the true value of the mean (or difference in means if you are performing a two sample test). ci Confidence Interval (CI) level alternative 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. parametric Use parametric estimation (see cohens_d()) or non-parametric estimation (see rank_biserial()). verbose Toggle warnings and messages on or off. iterations The number of bootstrap replicates for computing confidence intervals. Only applies when ci is not NULL and parametric = FALSE. ... Arguments passed to or from other methods. When x is a formula, these can be subset and na.action.
Details
These measures of effect size present group differences in probabilistic terms:
For unequal group sizes, it is recommended to use the non-parametric based CLES (parametric = FALSE).
Value
A data frame containing the common language effect sizes (and optionally their CIs).
Confidence Intervals (CIs)
For parametric CLES, the CIs are transformed CIs for Cohen’s d (d_to_cles()). For non-parametric (parametric = FALSE) CLES, the CI of Pr(superiority) is a transformed CI of the rank-biserial cor- relation (rb_to_cles()), while for Cohen’s U3 and the Overlap coefficient the confidence intervals are bootstrapped (requires the boot package).
10 cohens_d
Usage
cohens_d( x, y = NULL, data = NULL, pooled_sd = TRUE, mu = 0, paired = FALSE, ci = 0.95, alternative = "two.sided", verbose = TRUE, ... )
hedges_g( x, y = NULL, data = NULL, pooled_sd = TRUE, mu = 0, paired = FALSE, ci = 0.95, alternative = "two.sided", verbose = TRUE, ... )
glass_delta( x, y = NULL, data = NULL, mu = 0, ci = 0.95, alternative = "two.sided", verbose = TRUE, ... )
Arguments
x A formula, a numeric vector, or a character name of one in data. y A numeric vector, a grouping (character / factor) vector, a or a character name of one in data. Ignored if x is a formula. data An optional data frame containing the variables. pooled_sd If TRUE (default), a sd_pooled() is used (assuming equal variance). Else the mean SD from both groups is used instead.
cohens_d 11
mu a number indicating the true value of the mean (or difference in means if you are performing a two sample test). paired If TRUE, the values of x and y are considered as paired. This produces an effect size that is equivalent to the one-sample effect size on x - y. ci Confidence Interval (CI) level alternative 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. verbose 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.
Details
Set pooled_sd = FALSE for effect sizes that are to accompany a Welch’s t-test (Delacre et al, 2021).
Value
A data frame with the effect size ( Cohens_d, Hedges_g, Glass_delta) and their CIs (CI_low and CI_high).
Confidence (Compatibility) Intervals (CIs)
Unless stated otherwise, confidence (compatibility) intervals (CIs) are estimated using the non- centrality parameter method (also called the "pivot method"). This method finds the noncentrality parameter ("ncp") of a noncentral t, F, or χ^2 distribution that places the observed t, F, or χ^2 test statistic at the desired probability point of the distribution. For example, if the observed t statistic is 2.0, with 50 degrees of freedom, for which cumulative noncentral t distribution is t = 2.0 the. quantile (answer: the noncentral t distribution with ncp = .04)? After estimating these confidence bounds on the ncp, they are converted into the effect size metric to obtain a confidence interval for the effect size (Steiger, 2004).
For additional details on estimation and troubleshooting, see effectsize_CIs.
CIs and Significance Tests
"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 - α)% confidence interval contains all of the parameter values for which p > α 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 pro- vided 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 α level (Rafi & Greenland, 2020; Schweder
d_to_cles 13
cohens_d(wt ~ 1, data = mtcars)
cohens_d(wt ~ 1, data = mtcars, mu = 3) hedges_g(wt ~ 1, data = mtcars, mu = 3)
data(sleep)
cohens_d(Pair(extra[group == 1], extra[group == 2]) ~ 1, data = sleep)
cohens_d(Pair(extra[group == 1], extra[group == 2]) ~ 1, data = sleep, mu = -1) hedges_g(Pair(extra[group == 1], extra[group == 2]) ~ 1, data = sleep)
interpret_cohens_d(-1.48, rules = "cohen1988") interpret_hedges_g(-1.48, rules = "sawilowsky2009") interpret_glass_delta(-1.48, rules = "gignac2016")
interpret(d, rules = "sawilowsky2009")
d_to_cles(1.48)
print(d, append_CLES = TRUE)
d_to_cles Convert Standardized Mean Difference to Common Language Effect Sizes
Description
Convert Standardized Mean Difference to Common Language Effect Sizes
Usage
d_to_cles(d)
14 d_to_cles
rb_to_cles(rb)
Arguments
d, rb A numeric value of Cohen’s d / rank-biserial correlation or the output from cohens_d() / rank_biserial().
Details
This function use the following formulae for Cohen’s d:
P r(superiority) = Φ(d/
Cohen′sU 3 = Φ(d)
Overlap = 2 × Φ(−|d|/2)
And the following for the rank-biserial correlation:
P r(superiority) = (rrb + 1)/ 2
Value
A list of Cohen's U3, Overlap, Pr(superiority), a numeric vector of Pr(superiority), or a data frame, depending on the input.
Note
These calculations assume that the populations have equal variance and are normally distributed.
References
See Also
cohens_d(), rank_biserial() Other convert between effect sizes: d_to_r(), eta2_to_f2(), odds_to_probs(), oddsratio_to_riskratio()
16 effectsize.BFBayesFactor
Value
Converted index.
References
See Also
Other convert between effect sizes: d_to_cles(), eta2_to_f2(), odds_to_probs(), oddsratio_to_riskratio()
Examples
r_to_d(0.5) d_to_oddsratio(1.154701) oddsratio_to_r(8.120534)
d_to_r(1) r_to_oddsratio(0.4472136, log = TRUE) oddsratio_to_d(1.813799, log = TRUE)
effectsize.BFBayesFactor Effect Size
Description
This function tries to return the best effect-size measure for the provided input model. See details.
Usage
effectsize(model, type = NULL, verbose = TRUE, test = NULL, ...)
effectsize(model, ...)
effectsize(model, type = NULL, ...)
effectsize(model, type = NULL, verbose = TRUE, ...)
effectsize.BFBayesFactor 17
Arguments
model An object of class htest, or a statistical model. See details. type The effect size of interest. See details. verbose Toggle warnings and messages on or off. test The indices of effect existence to compute. Character (vector) or list with one or more of these options: "p_direction" (or "pd"), "rope", "p_map", "equivalence_test" (or "equitest"), "bayesfactor" (or "bf") or "all" to compute all tests. For each "test", the corresponding bayestestR function is called (e.g. rope() or p_direction()) and its results included in the summary output. ... Arguments passed to or from other methods. See details.
Details
Value
A data frame with the effect size (depending on input) and and its CIs (CI_low and CI_high).
effectsize_API 19
effectsize(anova_table) effectsize(anova_table, type = "epsilon")
effectsize_API effectsize API
Description
Read the Support functions for model extensions vignette.
Usage
.es_aov_simple( aov_table, type = c("eta", "omega", "epsilon"), partial = TRUE, generalized = FALSE, ci = 0.95, alternative = "greater", verbose = TRUE, include_intercept = FALSE )
.es_aov_strata( aov_table, DV_names, type = c("eta", "omega", "epsilon"), partial = TRUE, generalized = FALSE, ci = 0.95, alternative = "greater", verbose = TRUE, include_intercept = FALSE )
.es_aov_table( aov_table, type = c("eta", "omega", "epsilon"), partial = TRUE, generalized = FALSE, ci = 0.95, alternative = "greater", verbose = TRUE, include_intercept = FALSE )
20 effectsize_CIs
Arguments
aov_table Input data frame type Which effect size to compute? partial, generalized, ci, alternative, verbose See eta_squared(). include_intercept Should the intercept ((Intercept)) be included? DV_names A character vector with the names of all the predictors, including the grouping variable (e.g., "Subject").
effectsize_CIs Confidence (Compatibility) Intervals
Description
More information regarding Confidence (Compatibiity) Intervals and how they are computed in effectsize.
Confidence (Compatibility) Intervals (CIs)
Unless stated otherwise, confidence (compatibility) intervals (CIs) are estimated using the non- centrality parameter method (also called the "pivot method"). This method finds the noncentrality parameter ("ncp") of a noncentral t, F, or χ^2 distribution that places the observed t, F, or χ^2 test statistic at the desired probability point of the distribution. For example, if the observed t statistic is 2.0, with 50 degrees of freedom, for which cumulative noncentral t distribution is t = 2.0 the. quantile (answer: the noncentral t distribution with ncp = .04)? After estimating these confidence bounds on the ncp, they are converted into the effect size metric to obtain a confidence interval for the effect size (Steiger, 2004).
For additional details on estimation and troubleshooting, see effectsize_CIs.
CIs and Significance Tests
"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 - α)% confidence interval contains all of the parameter values for which p > α 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 pro- vided 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 α 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).