Learn R Programming

metaviz (version 0.4.0)

wineq_gini: Lorenz curves for the comparison of study weight concentration of fixed-effect and random-effects models

Description

Creates two Lorenz curves within the same coordinate system that correspond to the study weight concentration in a fixed-effect and a random-effects model, respectively, based on the same data.

Usage

wineq_gini(x, type = "FEM_REM", col = FALSE, tables = TRUE, seed = NULL)

Value

Two Lorenz curves are plotted in the same coordinate system accompanied by a table of statistical information.

Arguments

x

metafor rma.uni object conducted with method “FE” or “REML” (the chosen method of the input model makes no difference in the resulting plot)

type

determines which Lorenz curves are shown. The default “FEM_REM” shows Lorenz curves for both the fixed-effect and random-effects models, “FEM” shows only the fixed-effect Lorenz curve and “REM” shows only the random-effects Lorenz curve.

col

boolean argument that determines whether Lorenz curves are colored by model or not.

tables

boolean argument that determines whether a large table with lots of statistical information is plotted below the coordinate system (“TRUE”) or whether a small table with information only on the Gini indices is shown within the coordinate system (“FALSE”)

seed

numeric argument that is used to set a random seed in order to provide reproducible bootstrapped Gini index confidence intervals. If seed == NULL the Gini index confidence intervals will vary slightly between instances of plotting.

Author

Verena Pilar <[email protected]>

Details

The function wineq_gini creates a plot containing two Lorenz curves (Lorenz, 1905) which represent the concentration of weights among the studies within a fixed-effect model and random-effects model, respectively. An adjoined table provides descriptive statistics about the study weights, as well as Gini indices which correspond to the Lorenz curves (Gini, 1912; Tran et al, 2021). The Gini quotient quantifies the discrepancy between the two Lorenz curves, is directly related to heterogeneity and serves as an effect size for cross-metaanalytic comparisons.

References

Gini, C. (1912). Variabilità e mutabilità (Variability and Mutability). C. Cuppini, Bologna, 156.

Lorenz,M.O. (1905). Methods of measuring the concentration of wealth. Pub. Am. Stat. Assoc. 9, 209–219. https://doi.org/10.2307/2276207

Tran, U. S., Lallai, T., Gyimesi, M., Baliko, J., Ramazanova, D., & Voracek, M. (2021). Harnessing the fifth element of distributional statistics for psychological science: A practical primer and shiny app for measures of statistical inequality and concentration. Frontiers in Psychology, 12, 716164.

Examples

Run this code
library(metafor)

# Calculating a random-effects model based on the mozart data
mozart_r <- rma(yi = d,
                sei = se,
                data = mozart,
                method = "REML")

# using a rma.uni model as input
if (FALSE) {
wineq_gini(x = mozart_r, seed = 123)
}

# Plotting the wineq gini plot based on the mozart data
# using a matrix as input
if (FALSE) {
wineq_gini(x = mozart[, c("d", "se")], seed = 123)
}

Run the code above in your browser using DataLab