Learn R Programming

esvis (version 0.2.0)

qtile_es: Compute effect sizes by quantile bins

Description

Returns a data frame with the estimated effect size by the provided percentiles. Currently, the effect size is equivalent to Cohen's d, but future development will allow this to vary.

Usage

qtile_es(formula, data, ref_group = NULL, qtiles = seq(0, 1, 0.33))

Arguments

formula

A formula of the type out ~ group where out is the outcome variable and group is the grouping variable. Note the grouping variable must only include only two groups.

data

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

ref_group

Optional character vector (of length 1) naming the reference group to be plotted on the x-axis. Defaults to the highest scoring group.

qtiles

The percentiles to split the data by and calculate effect sizes. Essentially, this is the binning argument. Defaults to seq(0, 1, .33), which splits the distribution into thirds (lower, middle, upper). Any sequence is valid, but it is recommended the bins be even. For example seq(0, 1, .1) would split the distributions into deciles.

Examples

Run this code
# NOT RUN {
# Compute effect sizes (Cohen's d) by default quantiles
qtile_es(reading ~ condition, star)

# Compute Cohen's d by quintile
qtile_es(reading ~ condition, 
		star, 
		qtiles = seq(0, 1, .2))

# Report effect sizes only relative to regular-sized classrooms
qtile_es(reading ~ condition, 
		star, 
		ref_group = "reg",
		qtiles = seq(0, 1, .2))
# }

Run the code above in your browser using DataLab