Learn R Programming

esvis (version 0.2.0)

hedg_g: 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(formula, data, ref_group = NULL, tidy = TRUE)

Arguments

formula

A formula of the type out ~ group where out is the outcome variable and group is the grouping variable. Note this variable can include any arbitrary number of groups.

data

The data frame that the data in the formula come from.

ref_group

Optional. If the name of the reference group is provided (must be character and match the grouping level exactly), only the estimates corresponding to the given reference group will be returned.

tidy

Logical. Should the data be returned in a tidy data frame? (see Wickham, 2014). If false, effect sizes returned as a vector.

Value

By default the Hedges' d for all possible pairings of the grouping factor are returned as a tidy data frame.

Examples

Run this code
# NOT RUN {
# Calculate Hedges' g for all pairwise comparisons
hedg_g(reading ~ condition, star) 

# Report only relative to regular-sized classrooms
hedg_g(reading ~ condition, 
		star, 
		ref_group = "reg")

# Return a vector instead of a data frame
hedg_g(reading ~ condition, 
		star, 
		ref_group = "reg", 
		tidy = FALSE)
# }

Run the code above in your browser using DataLab