hedg_g {esvis} | R Documentation |
Compute Hedges' g
This function calculates effect sizes in terms of Hedges' g, also
called the corrected (for sample size) effect size. See
coh_d
for the uncorrected version. Also see
Lakens (2013)
for a discussion on different types of effect sizes and their
interpretation. Note that missing data are removed from the calculations of
the means and standard deviations.
Description
Compute Hedges' g
This function calculates effect sizes in terms of Hedges' g, also
called the corrected (for sample size) effect size. See
coh_d
for the uncorrected version. Also see
Lakens (2013)
for a discussion on different types of effect sizes and their
interpretation. Note that missing data are removed from the calculations of
the means and standard deviations.
Usage
hedg_g(data, formula, ref_group = NULL, keep_d = TRUE)
Arguments
data |
The data frame used for estimation - ideally structured in a tidy format. |
formula |
A formula of the type |
ref_group |
Optional. A character vector or forumla listing the
reference group levels for each variable on the right hand side of the
formula, supplied in the same order as the formula. Note that if using the
formula version, levels that are numbers, or include hyphens, spaces, etc.,
should be wrapped in back ticks (e.g.,
|
keep_d |
Logical. Should Cohen's d be reported along with
Hedge's |
Value
By default the Hedges' g for all possible pairings of the grouping factor are returned as a tidy data frame.
Examples
# Calculate Hedges' g for all pairwise comparisons
hedg_g(star, reading ~ condition)
# Report only relative to regular-sized classrooms
hedg_g(star,
reading ~ condition,
ref_group = "reg")
# Report by ELL and FRL groups for each season, compare to non-ELL students
# who were not eligible for free or reduced price lunch in the fall (using
# the formula interface for reference group referencing).
hedg_g(benchmarks,
math ~ ell + frl + season,
ref_group = ~`Non-ELL` + `Non-FRL` + Fall)
# Same thing but with character vector supplied, rather than a formula
hedg_g(benchmarks,
math ~ ell + frl + season,
ref_group = c("Non-ELL", "Non-FRL", "Fall"))