
The tailRatio package is a collection of functions for calculating, visualizing, and meta-analyzing tail ratios.
Differences in group means, variance differences, or a combination of both, can generate large imbalances in the the distributional tail regions. Such imbalances are relevant for any threshold, susceptibility, diathesis-stress, or selection models.
When the tail regions of the distribution are the focus of interest, mean differences such as Hedges g are quite uninformative. You may wish to calculate a tail ratio (TR): the relative proportion of the two groups in the region above (or below) a certain cutoff.
For a thourough discussion see Voracek, Mohr & Hagmann 2013.
tailRatiodevtools::install_github("cyplessen/tailRatio")
The plot_tail_ratio() function can plot tail ratios for two normally distributed groups.
Calculates tail ratios for 2 normally distributed variables.
library(tailRatio)
library(dplyr)
Two groups differ in intelligence, group 1 has a higher mean IQ = 115 (sd = 12) and group 2 a lower IQ = 95 (sd = 15). Above a cutoff of two standard deviations from the mean of group 1, there are 7x as many individuals from group 1 than 2!
plot_tail_ratio(area = "above",
cutoff = 2,
mean_high = 115,
sd = 12,
mean_low = 95,
sd_low = 16,
x_lab_name = "IQ",
mean_of_interest = 100)
Two populations differ in their depression scores. Group 1 has a higher score (mean = 10, sd = 3) and group 2 a lower score (mean = 7, sd = 3). Yet below a cutoff of 1 sd from the mean of group 1, there are 1.68x as many indiviuals from group 2 than group 1.
plot_tail_ratio(area = "below",
cutoff = 1,
mean_high = 10,
sd = 3,
mean_low = 7,
sd_low = 3,
x_lab_name = "Depression",
mean_of_interest = 10)
If you simply want to calculate the tail ratios without visualizing them you can use the calculate_tail_ratio() function.
calculate_tail_ratio(area = "below",
cutoff = 2,
mean_high = 100,
sd = 15,
mean_low = 85,
sd_low = 15)
The synthesize_tail_ratios() function synthesizes tail ratios for multiple effect sizes using both fixed effect and random effects models. It outputs tail ratios at 1, 2, and 3 standard deviations below the mean of the reference group (group 1).
ggplot2
grid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.