binned_es {esvis}R Documentation

Calculate binned effect sizes

Description

Calculate binned effect sizes

Usage

binned_es(
  data,
  formula,
  ref_group = NULL,
  qtile_groups = 3,
  es = "g",
  rename = TRUE
)

Arguments

data

The data frame used for estimation - ideally structured in a tidy format.

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. Additional variables can be included with + to produce separate estimates by the secondary or tertiary variables of interest (e.g., out ~ group + characteristic1 + characteristic2).

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., ref_group = ~ Active + `Non-FRL`, or ref_group = ~`8`). When in doubt, it is safest to use the back ticks, as they will not interfere with anything if they are not needed. See examples below for more details.

qtile_groups

The number of quantile bins to split the data by and calculate effect sizes. Defaults to 3 bins (lower, middle, upper).

es

The effect size to calculate. Currently the only options are "d" or "g".

rename

Logical. Should the column names be relabeled according to the reference and focal groups. Defaults to TRUE.

Value

A data frame with the corresponding effect sizes.


[Package esvis version 0.3.1 Index]