Package {metaConvert}


Type: Package
Title: An Automatic Suite for Estimation of Various Effect Size Measures
Version: 2.0.0
Maintainer: Corentin J. Gosling <corentin.gosling@parisnanterre.fr>
Description: Automatically estimate 14 effect size measures from a well-formatted dataset, including Cohen's d, Hedges' g, mean difference, odds ratio, risk ratio, incidence rate ratio, risk difference, number needed to treat, Pearson correlation, Fisher's z, Cronbach's alpha, intraclass correlation coefficient, and single-group proportion. Provides a two-tier quality-flag diagnostic system for input validation and post-computation plausibility checks, missing-data guidance that tells users which columns would unlock additional estimators, post-hoc correction for attenuation due to measurement error, and standalone psychometric utilities (standard error of measurement, smallest detectable change, change-score reliability). Various other functions can help, for example, removing dependency between several effect sizes, or identifying differences between two datasets. This package is mainly designed to assist in conducting a systematic review with a meta-analysis but can be useful to any researcher interested in estimating an effect size.
Imports: compareDF, metafor, estimraw, rio
License: GPL (≥ 3)
Encoding: UTF-8
LazyData: true
Depends: R (≥ 3.5.0)
Suggests: testthat (≥ 3.0.0), metaumbrella, TOSTER, esc, epiR, compute.es, meta, effectsize, MetaUtility, MASS, mvtnorm, psych, psychmeta, knitr, DT, rmarkdown
Config/testthat/edition: 3
VignetteBuilder: knitr
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-07-20 14:45:15 UTC; coren
Author: Corentin J. Gosling [aut, cre], Samuele Cortese [aut], Marco Solmi [aut], Belen Haza [aut], Eduard Vieta [aut], Richard Delorme [aut], Paolo Fusar-Poli [aut], Joaquim Radua [aut]
Repository: CRAN
Date/Publication: 2026-07-20 20:00:02 UTC

metaConvert: An R Package Dedicated to Automated Effect Size Calculations

Description

The metaConvert package automatically estimates 14 effect size measures from a well-formatted dataframe. Various other functions can help, for example, removing dependency between several effect sizes, or identifying differences between two dataframes. This package is mainly designed to assist in conducting a systematic review with a meta-analysis, but it can be useful to any researcher interested in estimating an effect size.

Overview of the package

To visualize all the types of input data that can be used to estimate the 14 effect size measures available in metaConvert, you can use the see_input_data() function.

Estimate effect sizes

To automatically estimate effect sizes directly from a dataset, you can use the convert_df() function.

Aggregate dependent effect sizes

To automatically aggregate dependent effect sizes using Borenstein's formulas, you can use the aggregate_df() function. This function can handle dependent effect sizes from multiple subgroups, or dependent effect sizes from the same participants.

Flag differences between two datasets

If pairs of data extractors have generated similar datasets that should be compared, you can use the compare_df() function.

Prepare a dataset extraction sheet

If you have not started data extraction yet, you can use the data_extraction_sheet() function to obtain a perfectly formatted data extraction sheet.

Well-formatted dataset

One of the specificities of the metaConvert package is that its core function (convert_df) does not have arguments to specify the names of the variables contained in the dataset. While this allow using a convenient automatic process in the calculations, this requires that the datasets passed to this function respect a very precise formatting (which we will refer to as well-formatted dataset).

Rather than a long description of all column names, we built several tools that help you find required information.

  1. You can use the data_extraction_sheet() function that generates an excel/csv/txt file containing all the column names available, as well as a description of the information it should contain.

  2. You can use the see_input_data() function that generates a list of all available types of input data as well as their estimated/converted effect size measures. This function also points out to the corresponding helper tables available in https://metaconvert.org

Effect size measures available

Eleven effect size measures are accepted:

Output

All the functions of the metaConvert package that are dedicated to effect size calculations (i.e., all the functions named es_from_*) return a dataframe that contain, depending on the function - some of the following columns:

info_used input data used to generate the effect size.
md value of the mean difference.
md_se standard error of the mean difference.
md_ci_lo lower bound of the 95% CI of the mean difference.
md_ci_up upper bound of the 95% CI of the mean difference.
d value of the Cohen's d.
d_se standard error of the Cohen's d.
d_ci_lo lower bound of the 95% CI of the Cohen's d.
d_ci_up upper bound of the 95% CI of the Cohen's d.
g value of the Hedges' g.
g_se standard error of the Hedges' g.
g_ci_lo lower bound of the 95% CI of the Hedges' g.
g_ci_up upper bound of the 95% CI of the Hedges' g.
r value of the correlation coefficient.
r_se standard error of the correlation coefficient.
r_ci_lo lower bound of the 95% CI of the correlation coefficient.
r_ci_up upper bound of the 95% CI of the correlation coefficient.
z value of the r-to-z transformed correlation coefficient.
z_se standard error of the r-to-z transformed correlation coefficient.
z_ci_lo lower bound of the 95% CI of the r-to-z transformed correlation coefficient.
z_ci_up upper bound of the 95% CI of the r-to-z transformed correlation coefficient.
logor value of the log odds ratio.
logor_se standard error of the log odds ratio.
logor_ci_lo lower bound of the 95% CI of the log odds ratio.
logor_ci_up upper bound of the 95% CI of the log odds ratio.
logrr value of the log risk ratio.
logrr_se standard error of the log risk ratio.
logrr_ci_lo lower bound of the 95% CI of the log risk ratio.
logrr_ci_up upper bound of the 95% CI of the log risk ratio.
logirr value of the log incidence rate ratio.
logirr_se standard error of the log incidence rate ratio.
logirr_ci_lo lower bound of the 95% CI of the log incidence rate ratio.
logirr_ci_up upper bound of the 95% CI of the log incidence rate ratio.
logvr value of the log variability ratio.
logvr_se standard error of the log variability ratio.
logvr_ci_lo lower bound of the 95% CI of the log variability ratio.
logvr_ci_up upper bound of the 95% CI of the log variability ratio.
logcvr value of the log coefficient of variation.
logcvr_se standard error of the log coefficient of variation.
logcvr_ci_lo lower bound of the 95% CI of the log coefficient of variation.
logcvr_ci_up upper bound of the 95% CI of the log coefficient of variation.
nnt number needed to treat.

Author(s)

Maintainer: Corentin J. Gosling corentin.gosling@parisnanterre.fr

Authors:


Aggregate a dataframe containing dependent effect sizes

Description

Aggregate a dataframe containing dependent effect sizes

Usage

aggregate_df(
  x,
  dependence = "outcomes",
  cor_unit = 0.8,
  agg_fact,
  es = "es",
  se = "se",
  col_mean = NA,
  col_weighted_mean = NA,
  weights = NA,
  col_sum = NA,
  col_min = NA,
  col_max = NA,
  col_fact = NA,
  na.rm = TRUE
)

Arguments

x

a dataframe that should be aggregated (must contain effect size values and standard errors).

dependence

The type of dependence in your dataframe (can be "outcomes", "times", or "subgroups"). See details.

cor_unit

The correlation between effect sizes coming from the same clustering unit. Used directly when dependence = "outcomes". When dependence = "times" the within-cluster correlation is taken from a per-row cor_unit column if present (which must be constant within each cluster), and this argument is only used as a fallback when that column is absent; dependence = "times" additionally requires a time_agg column giving the time-point of each effect size. Ignored when dependence = "subgroups".

agg_fact

A character string identifying the column name that contains the clustering units (all rows with the same agg_fact value will be aggregated together).

es

A character string identifying the column name containing the effect size values. Default is "es".

se

A character string identifying the column name containing the standard errors of the effect size. Default is "se".

col_mean

a vector of character strings identifying the column names for which the dependent values are summarized by taking their mean.

col_weighted_mean

a vector of character strings identifying the column names for which the dependent values are summarized by taking their weighted mean.

weights

The weights that will be used to estimated the weighted means.

col_sum

a vector of character strings identifying the column names for which the dependent values are summarized by taking their sum.

col_min

a vector of character strings identifying the column names for which the dependent values are summarized by taking their minimum.

col_max

a vector of character strings identifying the column names for which the dependent values are summarized by taking their maximum.

col_fact

a vector of character strings identifying the column names that are factors (different values will be separated by a "/" character).

na.rm

a logical vector indicating whether missing values should be ignored in the calculations for the col_mean, col_weighted_mean, col_sum, col_min and col_max arguments.

Details

  1. In the dependence argument, you should indicate "outcomes" if the dependence within the same clustering unit (e.g., study) is due to the presence of multiple effect sizes produced from the same participants at the same time-point (e.g., multiple outcome measures)

  2. In the dependence argument, you should indicate "times" if the dependence within the same clustering unit (e.g., study) is due to the presence of multiple effect sizes produced from the same participants at the different time-points (e.g., an RCT with several follow-up waves). This option requires a time_agg column (the time-point of each effect size) and a cor_unit column giving the within-cluster correlation (constant within each cluster; falls back to the cor_unit argument if the column is absent).

  3. In the dependence argument, you should indicate "subgroups" if the dependence within the same clustering unit (e.g., study) is due to the presence of multiple effect sizes produced by independent subgroups (e.g., one effect size for boys, and one for girls).

If you are working with ratio measures, make sure that the information on the effect size estimates (i.e., the column passed to the es argument of the function) is presented on the log scale.

Value

The object returned by the aggregate_df contains, is a dataframe containing at the very least, the aggregating factor, and the aggregated effect size values and standard errors. All columns indicated in the col_* arguments will also be included in this dataframe.

row_index the row number in the original dataset.
es the aggregated effect size value.
se the standard error of the aggregated effect size.
... any columns indicated in the col_* arguments.

Examples

res <- summary(convert_df(df.haza, measure = "d"))
aggregate_df(res, dependence = "outcomes", cor_unit = 0.8,
             agg_fact = "study_id", es = "es_crude", se = "se_crude",
             col_fact = c("outcome", "type_publication"))


Convert a “metaConvert” object to a dataframe

Description

Convert a “metaConvert” object to a dataframe

Usage

## S3 method for class 'metaConvert'
as.data.frame(x, ...)

Arguments

x

an object of class “metaConvert”

...

other arguments passed to summary.metaConvert

Details

Convenience wrapper around summary.metaConvert(x, ...).

Value

A dataframe containing the effect size results, diagnostics, and all input data columns.

See Also

summary.metaConvert

Examples

### get the full output as a dataframe
as.data.frame(convert_df(df.haza, measure = "g"))

Flag the differences between two dataframes.

Description

Flag the differences between two dataframes.

Usage

compare_df(
  df_extractor_1,
  df_extractor_2,
  ordering_columns = NULL,
  tolerance = 0,
  tolerance_type = "ratio",
  output = "html",
  file_name = "comparison.xlsx"
)

Arguments

df_extractor_1

a first dataset. Differences with the second dataset will be flagged in green.

df_extractor_2

a second dataset. Differences with the first dataset will be flagged in red.

ordering_columns

column names that should be used to re-order the two datasets before running the comparisons

tolerance

the cut-off value used to flag differences between two numeric values

tolerance_type

must be either 'difference' or 'ratio'

output

type of object returned by the function (see 'Value' section). Must be either 'wide', 'long', 'html', 'html2' or 'xlsx'.

file_name

the name of the generated file (only used when output="xlsx")

Details

This function aims to facilitate the comparison of two datasets created by blind data extractors during a systematic review. It is a wrapper of several functions from the 'compareDF' package.

Value

This function returns a dataframe composed of the rows that include a difference (all identical rows are removed). Several outputs can be requested :

  1. setting output="xlsx" returns an excel file. A message indicates the location of the generated file on your computer.

  2. setting output="html" returns an html file

  3. setting output="html2" returns an html file (only useful when the "html" command did not make the html pane appear in R studio).

  4. setting output="wide" a wide dataframe

  5. setting output="long" a long dataframe

References

Alex Joseph (2022). compareDF: Do a Git Style Diff of the Rows Between Two Dataframes with Similar Structure. R package version 2.3.3. https://CRAN.R-project.org/package=compareDF

Examples

df.compare1 = df.compare1[order(df.compare1$author), ]
df.compare2 = df.compare2[order(df.compare2$year), ]

compare_df(
  df_extractor_1 = df.compare1,
  df_extractor_2 = df.compare2,
  ordering_columns = c("author", "year")
)

Compute Smallest Detectable Change (SDC) from SEM

Description

Compute Smallest Detectable Change (SDC) from SEM

Usage

compute_sdc(sem, sem_se)

Arguments

sem

standard error of measurement

sem_se

standard error of the SEM (optional; for propagating uncertainty)

Details

Computes the smallest detectable change (SDC) from the standard error of measurement:

SDC = 1.96 \times \sqrt{2} \times SEM

The SDC represents the smallest change in scores that can be detected beyond measurement error with 95% confidence. If sem_se is provided, the uncertainty in SDC is propagated:

SDC\_se = 1.96 \times \sqrt{2} \times SEM\_se

Value

A data.frame with the SDC, its standard error and 95% CI.

References

de Vet, H. C. W., Terwee, C. B., Mokkink, L. B., & Knol, D. L. (2011). Measurement in Medicine: A Practical Guide. Cambridge University Press.

Examples

sem_res <- compute_sem(sd = 10, icc = 0.85, n_sample = 100)
compute_sdc(sem = sem_res$sem, sem_se = sem_res$sem_se)

Compute Standard Error of Measurement (SEM) from reliability and SD

Description

Compute Standard Error of Measurement (SEM) from reliability and SD

Usage

compute_sem(sd, icc, n_sample, icc_se, n_measurements = 2)

Arguments

sd

standard deviation of the PROM/test scores

icc

intraclass correlation coefficient (test-retest reliability)

n_sample

sample size (used for the SEM sampling-variance estimation). Required in BOTH variance regimes: it feeds Var(SD) in the external-icc_se delta method and the degrees of freedom of the same-sample chi-square variance, so when it is omitted the SEM standard error and CI are NA.

icc_se

standard error of the ICC (optional), on the RAW ICC scale. Note that es_from_icc under its default icc_to_es = "bonett" returns a column named icc_se on the \ln(1 - ICC) scale: that value must be converted first (raw_se = bonett_se * (1 - icc)) before being passed here (or use icc_to_es = "raw", which returns the raw-scale SE directly). When supplied, the ICC is treated as an independent external estimate; when omitted, the ICC and SD are assumed to come from the same sample (see Details).

n_measurements

number of measurement occasions or raters (k) used to estimate the ICC; default 2 (test-retest); must be >= 2. Only used when icc_se is not supplied.

Details

Computes the standard error of measurement (SEM) from a reliability coefficient and the standard deviation of scores:

SEM = SD \times \sqrt{1 - ICC}

The sampling variance of SEM is computed in one of two ways:

  1. When icc_se is supplied, the ICC is treated as an external estimate, independent of the within-sample SD, and the bivariate delta method (with zero covariance) is used:

    Var(SEM) = \frac{SD^2}{4(1 - ICC)} \times Var(ICC) + (1 - ICC) \times Var(SD)

    with Var(ICC) = icc\_se^2 and Var(SD) \approx SD^2 / (2(n-1)).

  2. When icc_se is not supplied, the ICC and SD are assumed to come from the same reliability sample, where they are strongly positively correlated. Because SEM = SD\sqrt{1 - ICC} equals the within-subject residual root-mean-square \sqrt{MSE}, and MSE / \sigma_e^2 follows a scaled chi-square with (n-1)(k-1) degrees of freedom, the exact sampling variance is

    Var(SEM) = \frac{SEM^2}{2(n-1)(k-1)}

    where k is the number of measurement occasions/raters (n_measurements, default 2 for test-retest). Treating the same-sample SD and ICC as independent (the delta method of case 1) would overestimate this variance by roughly 2-6x, so the exact form is used instead.

The 95% CI is likewise regime-specific. In the same-sample regime (case 2) the degrees of freedom df = (n - 1)(k - 1) are known, so the exact chi-square interval

[SEM \sqrt{df / \chi^2_{0.975, df}},\; SEM \sqrt{df / \chi^2_{0.025, df}}]

is returned; the symmetric Wald interval undercovers at small df (89.7% instead of 95% at n = 10, k = 2). When icc_se is supplied (case 1) the df behind the external estimate is unknown, so the Wald interval SEM \pm 1.96 \times SE, truncated at 0, is kept.

Degenerate inputs: n_measurements = 1 makes the same-sample df zero, so the SE and CI are returned as NA with a warning; an ICC > 1 is impossible and yields NA for the SEM, its SE and CI (with a warning).

Value

A data.frame with the SEM, its standard error and 95% CI.

References

Weir, J. P. (2005). Quantifying test-retest reliability using the intraclass correlation coefficient and the SEM. Journal of Strength and Conditioning Research, 19(1), 231-240.

Examples

compute_sem(sd = 10, icc = 0.85, n_sample = 100)

Automatically compute effect sizes from a well formatted dataset

Description

Automatically compute effect sizes from a well formatted dataset

Usage

convert_df(
  x,
  measure = c("d", "g", "md", "logor", "logrr", "logirr", "nnt", "rd", "r", "z", "rp",
    "zp", "logvr", "logcvr"),
  main_es = TRUE,
  es_selected = c("auto", "hierarchy", "minimum", "maximum"),
  selection_auto = c("crude", "paired", "adjusted"),
  split_adjusted = TRUE,
  format_adjusted = c("wide", "long"),
  verbose = TRUE,
  max_asymmetry = 50,
  hierarchy = "means_sd > means_se > means_ci",
  table_2x2_to_cor = "tetrachoric",
  rr_to_or = "metaumbrella",
  or_to_rr = "metaumbrella_cases",
  or_to_cor = "bonett",
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  smd_denom = "pooled",
  pre_post_to_smd = "bonett",
  r_pre_post = 0.8,
  cor_to_smd = "viechtbauer",
  unit_type = "raw_scale",
  yates_chisq = FALSE,
  pool_sd = FALSE,
  prop_to_es = "raw",
  alpha_to_es = "bonett",
  icc_to_es = "bonett",
  correct_inputs = TRUE,
  flag_options = list()
)

Arguments

x

a well formatted dataset

measure

the effect size measure that will be estimated from the information stored in the dataset. See details.

main_es

a logical variable indicating whether a main effect size should be selected when overlapping data are present. See details.

es_selected

the method used to select the main effect size when several information allows to estimate an effect size for the same association/comparison. Must be either "minimum" (the smallest effect size will be selected), "maximum" (the largest effect size will be selected) or "hierarchy" (the effect size computed from the information specified highest in the hierarchy will be selected). See details.

selection_auto

a character string giving details on the best "auto" hierarchy to use (only useful when hierarchy="auto" and measure= "d", "g" or "md"). See details.

split_adjusted

a logical value indicating whether crude and adjusted effect sizes should be presented separately. See details.

format_adjusted

presentation format of the adjusted effect sizes. See details.

verbose

a logical variable indicating whether text outputs and messages should be generated. We recommend turning this option to FALSE only after having carefully read all the generated messages.

max_asymmetry

A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds. Asymmetric CIs are only flagged, not modified (see summary.metaConvert).

hierarchy

a character string indicating the hierarchy in the information to be prioritized for the effect size calculations. See details.

table_2x2_to_cor

formula used to obtain a correlation coefficient from the contingency table. For now only 'tetrachoric' is available.

rr_to_or

formula used to convert the rr value into an odds ratio.

or_to_rr

formula used to convert the or value into a risk ratio.

or_to_cor

formula used to convert the or value into a correlation coefficient.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation.

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

smd_denom

standardizer for the standardized mean difference. "pooled" (default) uses the pooled endpoint SD (Cohen's d / Hedges' g); "glass" (alias "control") uses the control (non-experimental) endpoint SD (Glass's delta); "glass_robust" (alias "control_robust") is Glass's delta with a heteroscedasticity-consistent sampling variance. Only the endpoint means family (es_from_means_sd/se/ci) honours this argument: rows whose effect size comes from any other method (t/F, cohen_d/hedges_g, eta-squared, point-biserial r, medians/ranges, plots, ANCOVA, raw mean differences) always use the pooled-SD standardizer, and a message lists the scoping when a non-pooled value is requested ("glass_robust" additionally has a single variance form, so smd_var is ignored for it).

pre_post_to_smd

formula used to obtain a SMD from pre/post means and SD of two independent groups.

r_pre_post

pre-post correlation across the two groups (use this argument only if the precise correlation in each group is unknown). Note that when this correlation is defaulted rather than reported, the pre/post standard errors and confidence intervals are unreliable: at a true correlation of 0.3 with the default 0.8, the reported pre/post variance is about 68% too small (95% CI coverage ~0.75). Supply r_pre_post_exp/r_pre_post_nexp when available, or run a sensitivity analysis over plausible values.

cor_to_smd

formula used to convert a correlation coefficient value into a SMD.

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "value" (see es_from_pearson_r).

yates_chisq

a logical value indicating whether the Chi square has been performed using Yates' correction for continuity. Can also be given as a column of the dataset when studies differ (rows left NA use this argument).

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

prop_to_es

method used to compute the effect size from the proportion. Must be either "raw", "logit" or "freeman_tukey" (see es_from_prop_single_group).

alpha_to_es

method used to compute the effect size from Cronbach's alpha. Must be either "bonett" or "raw" (see es_from_cronbach_alpha).

icc_to_es

method used to compute the effect size from an ICC. Must be either "bonett" or "raw" (see es_from_icc).

correct_inputs

a logical value indicating whether invalid input values (negative SDs, inverted CI bounds, etc.) should be set to NA before the calculations (default TRUE). If FALSE, invalid values are only flagged in the 'es_flags' column and kept in the data.

flag_options

a named list of thresholds used by the quality flags (see summary.metaConvert for the list of options and defaults).

Details

This function automatically computes or converts between 14 effect sizes measures from any relevant type of input data stored in the dataset you pass to this function.

Input validation

Before the calculations, the input data are checked (negative sample sizes/SD/SE/p-values, inverted CI bounds, values outside their CI, asymmetric CI). By default invalid values are set to NA; issues appear in the 'es_flags' column of summary().

Effect size measures

Possible effect size measures are:

  1. Cohen's d ("d")

  2. Hedges' g ("g")

  3. mean difference ("md")

  4. (log) odds ratio ("or" and "logor")

  5. (log) risk ratio ("rr" and "logrr")

  6. (log) incidence rate ratio ("irr" and "logirr")

  7. correlation coefficient ("r")

  8. transformed r-to-z correlation coefficient ("z")

  9. partial correlation coefficient ("rp")

  10. Fisher's z of partial correlation ("zp")

  11. log variability ratio ("logvr")

  12. log coefficient of variation ("logcvr")

  13. number needed to treat ("nnt")

  14. risk difference ("rd")

Computation of a main effect size

If you enter multiple types of input data (e.g., means/sd of two groups and a student t-test value) for the same comparison i.e., for the same row of the dataset, the convert_df() function can have two behaviours. If you set:

Selection of input data for the computation of the main effect size

If you choose to estimate one main effect size (i.e., by setting main_es = TRUE), you have several options to select this main effect size. If you set:

Hierarchy

More than 70 different combinations of input data can be used to estimate an effect size. You can retrieve the effect size measures estimated by each combination of input data in the see_input_data() function and online https://metaconvert.org/input.html.

You have two options to use a hierarchy in the types of input data.

Automatic

If you select an automatic hierarchy, here are the types of input data that will be prioritized.

Crude SMD or MD (measure=c("d", "g", "md") and selection_auto="crude")
  1. User's input effect size value

  2. SMD value

  3. Means at post-test

  4. ANOVA/Student's t-test/point biserial correlation statistics

  5. Linear regression estimates

  6. Mean difference values

  7. Quartiles/median/maximum values

  8. Post-test means extracted from a plot

  9. Pre-test+post-test means or mean change

  10. Paired ANOVA/t-test statistics

  11. Odds ratio value

  12. Contingency table

  13. Correlation coefficients

  14. Phi/chi-square value

Paired SMD or MD (measure=c("d", "g", "md") and selection_auto="paired")
  1. User's input effect size value

  2. Paired SMD value

  3. Pre-test+post-test means or mean change

  4. Paired ANOVA/t-test statistics

  5. Means at post-test

  6. ANOVA/Student's t-test/point biserial correlation

  7. Linear regression estimates

  8. Mean difference values

  9. Quartiles/median/maximum values

  10. Odds ratio value

  11. Contingency table

  12. Correlation coefficients

  13. Phi/chi-square value

Adjusted SMD or MD (measure=c("d", "g", "md") and selection_auto="adjusted")
  1. User's input adjusted effect size value

  2. Adjusted SMD value

  3. Estimated marginal means from ANCOVA

  4. F- or t-test value from ANCOVA

  5. Adjusted mean difference from ANCOVA

  6. Estimated marginal means from ANCOVA extracted from a plot

Odds Ratio (measure=c("or"))
  1. User's input effect size value

  2. Odds ratio value

  3. Contingency table

  4. Risk ratio values

  5. Phi/chi-square value

  6. Correlation coefficients

  7. (Then hierarchy as for "d" or "g" option crude)

Risk Ratio (measure=c("rr"))
  1. User's input effect size value

  2. Risk ratio values

  3. Contingency table

  4. Odds ratio values

  5. Phi/chi-square value

Incidence rate ratio (measure=c("irr"))
  1. User's input effect size value

  2. Number of cases and time of disease free observation time

Correlation (measure=c("r", "z"))
  1. User's input effect size value

  2. Correlation coefficients

  3. Contingency table

  4. Odds ratio value

  5. Phi/chi-square value

  6. SMD value

  7. Means at post-test

  8. ANOVA/Student's t-test/point biserial correlation

  9. Linear regression estimates

  10. Mean difference values 11 Quartiles/median/maximum values

  11. Post-test means extracted from a plot

  12. Pre-test+post-test means or mean change

  13. Paired ANOVA/t-test

Variability ratios (measure=c("vr", "cvr"))
  1. User's input effect size value

  2. means/variability indices at post-test

  3. means/variability indices at post-test extracted from a plot

Number needed to treat (measure=c("nnt"))
  1. User's input effect size value

  2. Contingency table

  3. Odds ratio values

  4. Risk ratio values

  5. Incidence rate ratio (person-time NNT, requires baseline_rate)

  6. Phi/chi-square value

NNT values should not be pooled directly (the NNT confidence interval is disjoint when the risk difference crosses zero). You should pool RD/OR/RR values and convert the pooled estimate to NNT (Deeks, 2002; Cochrane Handbook, Chapter 15).

Risk difference (measure=c("rd"))
  1. User's input effect size value

  2. Contingency table

  3. Odds ratio values

  4. Risk ratio values

  5. Incidence rate ratio (requires baseline_rate)

  6. Phi/chi-square value

Manual

If you select a manual hierarchy, you can specify the order in which you want to use each type of input data. You can prioritize some types of input data by placing them at the begining of the hierarchy argument, and you must separate all input data with a ">" separator. For example, if you set:

Importantly, if none of the types of input data indicated in the hierarchy argument can be used to estimate the target effect size measure, the convert_df() function will automatically try to use other types of input data to estimate an effect size.

Adjusted effect sizes

Some datasets will be composed of crude (i.e., non-adjusted) types of input data (such as standard means + SD, Student's t-test, etc.) and adjusted types of input data (such as means + SE from an ANCOVA model, a t-test from an ANCOVA, etc.).

In these situations, you can decide to:

If you want to split the calculations, you can decide to present the final dataset:

Value

The convert_df() function returns a list of more than 70 dataframes (one for each function automatically applied to the dataset). These dataframes systematically contain the columns described in metaConvert-package. The list of dataframes can be easily converted to a single, calculations-ready dataframe using the summary function (see summary.metaConvert).

Examples

res <- convert_df(df.haza,
  measure = "g",
  split_adjusted = TRUE,
  es_selected = "minimum",
  format_adjusted = "long"
)
summary(res)

Data extraction sheet generator

Description

Data extraction sheet generator

Usage

data_extraction_sheet(
  measure = c("d", "g", "md", "dw", "gw", "mdw", "or", "rr", "nnt", "rd", "r", "z",
    "logvr", "logcvr", "irr", "prop"),
  type_of_measure = c("natural", "natural+converted"),
  name = "mcv_data_extraction",
  extension = c("data.frame", ".txt", ".csv", ".xlsx"),
  verbose = TRUE
)

Arguments

measure

Target effect size measure (one of the 14 available in metaConvert). Default is "all".

type_of_measure

One of "natural+converted" or "natural" (see details).

name

Name of the file created

extension

Extension of the file created. Most common are ".xlsx", ".csv" or ".txt". It is also possible to generate an R dataframe object by using the "data.frame" extension.

verbose

logical variable indicating whether some information should be printed (e.g., the location where the sheet is created when using ".xlsx", ".csv" or ".txt" extensions)

Details

This function generates, on your computer, a data extraction sheet that contains the name of columns that can be used by our tools to estimate various effect size measures.

If you select a specific measure (e.g., measure = "g"), you will be presented only with most common information allowing to estimate this measure (e.g., you will not be provided with columns for contingency tables if you request a data extraction sheet for measure = "g").

Measure

You can specify a specific effect size measures (among those available in the metaConvert-package). Doing this, the data extraction sheet will contain only the columns of the input data allowing a natural estimation of the effect size measure. For example, if you request measure="d" the data extraction sheet will not contain the columns for the contingency table since, although the convert_df function allows you to convert a contingency table into a "d", this requires to convert the "OR" that is naturally estimated from the contingency table into a "d".

This table is designed to be used in combination with tables showing the combination of input data leading to estimate each of the effect size measures (https://metaconvert.org/html/input.html)

Extension

You can export a file in various formats outside R (by indicating, for example, ".txt", ".xlsx", or ".csv") in the extension argument. You can also visualise this dataset directly in R by setting extension = "data.frame".

Value

This function returns a data extraction sheet that contains all the information necessary to estimate any effect size using the metaConvert tools.

Examples

data_extraction_sheet(measure = "md", extension = "data.frame")

Fictitious dataset 1

Description

First fictitious dataset aiming to understand how the compare_df function works. Slightly different from df.compare1

Usage

df.compare1

Format

An object of class data.frame with 5 rows and 7 columns.


Fictitious dataset 2

Description

First fictitious dataset aiming to understand how the compare_df function works. Slightly different from df.compare2

Usage

df.compare2

Format

An object of class data.frame with 6 rows and 7 columns.


Meta-analytic dataset inspired from Haza and colleagues (2024)

Description

Dataset of a meta-analysis exploring the specificity of social functioning of children with ADHD (compared to healthy controls) in case-control studies. This dataset contains: 1. several information coming from the same participants (due to the completion of multiple outcomes). 1. several information coming from the same study (due to the presence of multiple subgroups). 1. overlapping information for the same comparison 1. several information types from which a standardized mean difference can be estimated/converted

Usage

df.haza

Format

An object of class data.frame with 170 rows and 106 columns.

Source

Haza B, Gosling CJ, Conty L & Pinabiaux C (2024). Social Functioning in Children and Adolescents with ADHD: A Meta-analysis. Journal of Child Psychology and Psychiatry and Allied Disciplines.


Simulated dataset for a COSMIN-based systematic review of PROMs

Description

Simulated dataset of a systematic review evaluating measurement properties of a fictional patient-reported outcome measure (the Mental Health Wellbeing Scale, MHWS) following the COSMIN framework. Designed to demonstrate the psychometric functions of the metaConvert package.

Usage

df.psychom

Format

An object of class data.frame with 30 rows and 25 columns.

Details

The dataset contains studies reporting:

Additional columns support standalone psychometric utility functions (SEM, SDC, disattenuation, change-score reliability).


Short version of the df.haza dataset

Description

This dataset is a shoter version of the df.haza dataset.

Usage

df.short

Format

An object of class grouped_df (inherits from tbl_df, tbl, data.frame) with 37 rows and 109 columns.

Source

Haza B, Gosling CJ, Conty L & Pinabiaux C (2024). Social Functioning in Children and Adolescents with ADHD: A Meta-analysis. Journal of Child Psychology and Psychiatry and Allied Disciplines.


Disattenuate (correct for unreliability) a correlation coefficient

Description

Disattenuate (correct for unreliability) a correlation coefficient

Usage

es_disattenuate(r, r_se, reliability_x, reliability_y, n_sample)

Arguments

r

observed correlation coefficient (values outside [-1, 1] trigger a warning; the arithmetic is still applied so the inputs can be inspected)

r_se

standard error of the observed correlation. Optional: when omitted, it is derived from n_sample (see Details).

reliability_x

reliability of measure X (e.g., target PROM)

reliability_y

reliability of measure Y (e.g., comparator instrument)

n_sample

sample size. Used only to derive r_se when r_se is not supplied; otherwise unused.

Details

Corrects an observed correlation for attenuation due to measurement error in both measures, using the classical disattenuation formula (Hunter & Schmidt, 2004; Spearman, 1904):

r_c = \frac{r_{obs}}{\sqrt{rel_x \times rel_y}}

where rel_x and rel_y are reliability coefficients for the two measures (e.g., Cronbach's alpha, test-retest ICC).

The standard error of the corrected correlation is approximated as:

r_c\_se = \frac{r\_se}{\sqrt{rel_x \times rel_y}}

This approximation treats the reliabilities as known constants, so the SE and CI are a lower bound when the reliabilities are themselves estimated (Hunter & Schmidt, 2004, Ch. 3).

When r_se is not supplied, it is first obtained from the sample size as the large-sample Pearson correlation SE \sqrt{(1 - r^2)^2 / (n - 1)} (Cooper et al., 2019).

The function also provides Fisher's z transformation of the corrected correlation for use in meta-analysis, with SE(z_c) = SE(r_c) / (1 - r_c^2) (delta method). The corrected-r confidence interval is obtained by back-transforming the Fisher-z interval (\tanh), so it always lies within (-1, 1).

When the corrected correlation is extreme (|r_c| > 0.999, including the mathematically impossible |r_c| \ge 1 that inconsistent inputs produce), no meaningful Fisher's z or CI exists: the corrected-r CI and all Fisher's z outputs (z_corrected, z_corrected_se and its CI bounds) are set to NA and a warning is emitted. The corrected point estimate and its first-order standard error are always returned as computed, so the offending inputs can be inspected.

This function is typically applied to the results of summary(convert_df(..., measure = "r")):

res <- summary(convert_df(my_data, measure = "r"))
corrected <- es_disattenuate(
  r = res$es, r_se = res$se,
  reliability_x = my_data$rel_target,
  reliability_y = my_data$rel_comparator,
  n_sample = my_data$n_sample
)

Value

A data.frame with the corrected correlation and its Fisher's z transformation (with their standard errors and 95% CIs), and the attenuation factor.

References

Hunter, J. E., & Schmidt, F. L. (2004). Methods of Meta-Analysis: Correcting Error and Bias in Research Findings (2nd ed.). Sage Publications.

Spearman, C. (1904). The proof and measurement of association between two things. The American Journal of Psychology, 15(1), 72-101.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_disattenuate(r = 0.50, r_se = 0.05,
                reliability_x = 0.85, reliability_y = 0.80,
                n_sample = 100)

# Only correct for one measure's unreliability (set other to 1)
es_disattenuate(r = 0.50, r_se = 0.05,
                reliability_x = 0.85, reliability_y = 1.0,
                n_sample = 100)

Convert a 2x2 table into several effect size measures

Description

Convert a 2x2 table into several effect size measures

Usage

es_from_2x2(
  n_cases_exp,
  n_cases_nexp,
  n_controls_exp,
  n_controls_nexp,
  table_2x2_to_cor = "tetrachoric",
  reverse_2x2
)

Arguments

n_cases_exp

number of cases/events in the exposed group

n_cases_nexp

number of cases/events in the non exposed group

n_controls_exp

number of controls/no-event in the exposed group

n_controls_nexp

number of controls/no-event in the non exposed group

table_2x2_to_cor

formula used to obtain a correlation coefficient from the contingency table (see details).

reverse_2x2

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function first computes (log) odds ratio (OR), (log) risk ratio (RR) and number needed to treat (NNT) from the 2x2 table. Note that if a cell is equal to 0, we applied the typical adjustment (add 0.5) to all cells. This adjustment is used for the OR/RR only; the RD and NNT are obtained from the raw cell counts. Cohen's d (D), Hedges' g (G) and correlation coefficients (R/Z) are then estimated from the OR.

To estimate an OR, the formulas used (Box 6.4.a in the Cochrane Handbook) are:

logor = log(\frac{n\_cases\_exp / n\_cases\_nexp}{n\_controls\_exp / n\_controls\_nexp})

logor\_se = \sqrt{\frac{1}{n\_cases\_exp} + \frac{1}{n\_cases\_nexp} + \frac{1}{n\_controls\_exp} + \frac{1}{n\_controls\_nexp}}

To estimate an RR, the formulas used (Box 6.4.a in the Cochrane Handbook) are:

logrr = log(\frac{n\_cases\_exp / n\_exp}{n\_cases\_nexp / n\_nexp})

logrr\_se = \sqrt{\frac{1}{n\_cases\_exp} - \frac{1}{n\_exp} + \frac{1}{n\_cases\_nexp} - \frac{1}{n\_nexp}}

To estimate a risk difference (RD) and NNT, the formulas used are (Wen et al., 2005; Altman, 1998):

pt = \frac{n\_cases\_exp}{n\_cases\_exp + n\_controls\_exp}

pc = \frac{n\_cases\_nexp}{n\_cases\_nexp + n\_controls\_nexp}

rd = pc - pt

rd\_se = \sqrt{\frac{pt(1-pt)}{n\_exp} + \frac{pc(1-pc)}{n\_nexp}}

nnt = \frac{1}{rd}

nnt\_se = \frac{rd\_se}{rd^2}

Note that NNT confidence intervals are set to NA when the RD confidence interval crosses zero (discontinuous CI; Altman, 1998).

Direction convention. The risk difference is defined as rd = pc - pt (control risk minus exposed risk), so a POSITIVE RD means the control group has the higher risk. This is the OPPOSITE direction to the OR and RR produced from the same 2x2 table, which are exposed-over-non-exposed (an OR/RR > 1 means the exposed group has the higher risk). Consequently, for the same table, a protective exposure yields OR < 1, RR < 1 but RD > 0; keep this in mind when pooling RD alongside OR/RR, and use reverse_2x2 if you need to align the directions.

To convert the 2x2 table into a SMD, the function estimates an OR value from the 2x2 table (formula above) that is then converted to a SMD (see formula in es_from_or_se()).

To convert the 2x2 table into a correlation coefficient, For now, only the tetrachoric correlation is currently proposed

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR + RR + NNT + RD
converted effect size measure D + G + R + Z
required input data See 'Section 7. Contingency (2x2) table or proportions'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Available from www.training.cochrane.org/handbook.

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.

Sedgwick, P. (2013). What is number needed to treat (NNT)? Bmj, 347.

Altman, D. G. (1998). Confidence intervals for the number needed to treat. BMJ, 317(7168), 1309-1312.

Wen, S., Zhang, L., & Yang, B. (2005). Two approaches to incorporate clinical data uncertainty into number needed to treat. Journal of Clinical Pharmacy and Therapeutics, 30(2), 105-109.

Examples

es_from_2x2(n_cases_exp = 467, n_cases_nexp = 22087, n_controls_exp = 261, n_controls_nexp = 8761)

Convert the proportion of occurrence of a binary event in two independent groups into several effect size measures

Description

Convert the proportion of occurrence of a binary event in two independent groups into several effect size measures

Usage

es_from_2x2_prop(
  prop_cases_exp,
  prop_cases_nexp,
  n_exp,
  n_nexp,
  table_2x2_to_cor = "tetrachoric",
  reverse_prop
)

Arguments

prop_cases_exp

proportion of cases/events in the exposed group (ranging from 0 to 1)

prop_cases_nexp

proportion of cases/events in the non-exposed group (ranging from 0 to 1)

n_exp

total number of participants in the exposed group

n_nexp

total number of participants in the non exposed group

table_2x2_to_cor

formula used to obtain a correlation coefficient from the contingency table (see details).

reverse_prop

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function uses the proportions and sample size to recreate the 2x2 table, and then relies on the calculations of the es_from_2x2_sum() function.

The formulas used is to obtain the 2x2 table are

n\_cases\_exp = prop\_cases\_exp * n\_exp

n\_cases\_nexp = prop\_cases\_nexp * n\_nexp

n\_controls\_exp = (1 - prop\_cases\_exp) * n\_exp

n\_controls\_nexp = (1 - prop\_cases\_nexp) * n\_nexp

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR + RR + NNT + RD
converted effect size measure D + G + R + Z
required input data See 'Section 7. Contingency (2x2) table or proportions'
https://metaconvert.org/input.html

Examples

es_from_2x2_prop(prop_cases_exp = 0.80, prop_cases_nexp = 0.60, n_exp = 10, n_nexp = 20)

Convert a table with the number of cases and row marginal sums into several effect size measures

Description

Convert a table with the number of cases and row marginal sums into several effect size measures

Usage

es_from_2x2_sum(
  n_cases_exp,
  n_exp,
  n_cases_nexp,
  n_nexp,
  table_2x2_to_cor = "tetrachoric",
  reverse_2x2
)

Arguments

n_cases_exp

number of cases/events in the exposed group

n_exp

total number of participants in the exposed group

n_cases_nexp

number of cases/events in the non exposed group

n_nexp

total number of participants in the non exposed group

table_2x2_to_cor

formula used to obtain a correlation coefficient from the contingency table (see details).

reverse_2x2

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function uses the number of cases in both the exposed and non-exposed groups and the total number of participants exposed and non-exposed to recreate a 2x2 table. Then relies on the calculations of the es_from_2x2 function.

n\_controls\_exp = n\_exp - n\_cases\_exp

n\_controls\_nexp = n\_nexp - n\_cases\_nexp

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR + RR + NNT + RD
converted effect size measure D + G + R + Z
required input data See 'Section 7. Contingency (2x2) table or proportions'
https://metaconvert.org/input.html

Examples

es_from_2x2_sum(n_cases_exp = 10, n_exp = 40, n_cases_nexp = 25, n_nexp = 47)

Convert a F-statistic obtained from an ANCOVA model into several effect size measures.

Description

Convert a F-statistic obtained from an ANCOVA model into several effect size measures.

Usage

es_from_ancova_f(
  ancova_f,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_f
)

Arguments

ancova_f

a F-statistic from an ANCOVA (binary predictor)

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_f

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function first computes an "adjusted" Cohen's d (D), and Hedges' g (G) from the F-value of an ANCOVA (binary predictor). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate a Cohen's d the formula used is (table 12.3 in Cooper):

cohen\_d = \sqrt{ancova\_f * \frac{(n\_exp+n\_nexp)}{n\_exp*n\_nexp}} * \sqrt{1 - cov\_out\_cor^2}

To estimate other effect size measures, Calculations of the es_from_cohen_d_adj() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 18. Adjusted: ANCOVA statistics, eta-squared'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L. V., & Valentine, J. C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_ancova_f(ancova_f = 4, cov_outcome_r = 0.2, n_cov_ancova = 3, n_exp = 20, n_nexp = 20)

Convert a two-tailed p-value of an ANCOVA t-test into several effect size measures.

Description

Convert a two-tailed p-value of an ANCOVA t-test into several effect size measures.

Usage

es_from_ancova_f_pval(
  ancova_f_pval,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_f_pval
)

Arguments

ancova_f_pval

a two-tailed p-value of an F-test in an ANCOVA (binary predictor)

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_f_pval

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the p-value of an ANCOVA (binary predictor) into a t value, and then relies on the calculations of the es_from_ancova_t() function.

To convert the p-value into a t-value, the following formula is used (table 12.3 in Cooper):

df = n\_exp + n\_nexp - 2 - n\_cov\_ancova

t = | qt(ancova\_f\_pval/2, df = df) |

Then, calculations of the es_from_ancova_t() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 18. Adjusted: ANCOVA statistics, eta-squared'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_ancova_f_pval(
  ancova_f_pval = 0.05, cov_outcome_r = 0.2,
  n_cov_ancova = 3, n_exp = 20, n_nexp = 20
)

Convert an adjusted mean difference and adjusted standard deviation between two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert an adjusted mean difference and adjusted standard deviation between two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_md_ci(
  ancova_md,
  ancova_md_ci_lo,
  ancova_md_ci_up,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_md
)

Arguments

ancova_md

adjusted mean difference between two independent groups

ancova_md_ci_lo

lower bound of the covariate-adjusted 95% CI of the mean difference

ancova_md_ci_up

upper bound of the covariate-adjusted 95% CI of the mean difference

cov_outcome_r

correlation between the outcome and covariate (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean difference (MD) 95% CI into a standard error, and then relies on the calculations of the es_from_ancova_md_se function.

To convert the 95% CI into a standard error, the following formula is used (table 12.3 in Cooper):

md\_se = \frac{ancova\_md\_ci\_up - ancova\_md\_ci\_lo}{(2 * qt(0.975, n\_exp + n\_nexp - 2 - n\_cov\_ancova))}

Calculations of the es_from_ancova_md_se() are then applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 20. Adjusted: Mean difference and dispersion'
https://metaconvert.org/input.html

Examples

es_from_ancova_md_ci(
  ancova_md = 4, ancova_md_ci_lo = 2,
  ancova_md_ci_up = 6,
  cov_outcome_r = 0.5, n_cov_ancova = 5,
  n_exp = 20, n_nexp = 22
)

Convert an adjusted mean difference and adjusted standard deviation between two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert an adjusted mean difference and adjusted standard deviation between two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_md_pval(
  ancova_md,
  ancova_md_pval,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_md
)

Arguments

ancova_md

adjusted mean difference between two independent groups

ancova_md_pval

p-value (two-tailed) of the adjusted mean difference

cov_outcome_r

correlation between the outcome and covariate (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean difference (MD) p-value into a standard error, and then relies on the calculations of the es_from_ancova_md_se() function.

To convert the p-value into a standard error, the following formula is used (table 12.3 in Cooper):

t = qt(p = \frac{ancova\_md\_pval}{2}, df = n\_exp + n\_nexp - 2 - n\_cov\_ancova)

ancova\_md\_se = | \frac{ancova\_md}{t} |

Calculations of the es_from_ancova_md_se() are then applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 20. Adjusted: Mean difference and dispersion'
https://metaconvert.org/input.html

Examples

es_from_ancova_md_pval(
  ancova_md = 4, ancova_md_pval = 0.05,
  cov_outcome_r = 0.5, n_cov_ancova = 5,
  n_exp = 20, n_nexp = 22
)

Convert an adjusted mean difference and adjusted standard deviation between two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert an adjusted mean difference and adjusted standard deviation between two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_md_sd(
  ancova_md,
  ancova_md_sd,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_md
)

Arguments

ancova_md

adjusted mean difference between two independent groups

ancova_md_sd

covariate-adjusted pooled within-group standard deviation

cov_outcome_r

correlation between the outcome and covariate (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function first computes an "adjusted" Cohen's d (D), Hedges' g (G) from the adjusted mean difference (MD). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate the SE of the adjusted MD:

md\_se = ancova\_md\_sd * \sqrt{\frac{1}{n\_exp} + \frac{1}{n\_nexp}}

md\_lo = md - md\_se * qt(.975, n\_exp + n\_nexp-2-n\_cov\_ancova)

md\_up = md + md\_se * qt(.975, n\_exp + n\_nexp-2-n\_cov\_ancova)

To recover the unadjusted pooled SD (for Cohen's d, table 12.3 in Cooper):

md\_sd = \frac{ancova\_md\_sd}{\sqrt{1 - cor\_outcome\_r^2}}

To estimate the Cohen's d (table 12.3 in Cooper):

d = \frac{ancova\_md}{md\_sd}

To estimate other effect size measures, Calculations of the es_from_cohen_d_adj() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 20. Adjusted: Mean difference and dispersion'
https://metaconvert.org/input.html

Note

The standardized effect size variance assumes the covariate is balanced across groups (Cooper eq. 12.26) and treats cov_outcome_r as known; it omits the covariate-imbalance ("leverage") term of the exact ANCOVA variance, which cannot be recovered from summary statistics. In observational or otherwise covariate-imbalanced designs the standard error is therefore a lower bound (anti-conservative), while the point estimate remains unbiased. See Lai and Kelley (2012).

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Lai, K., & Kelley, K. (2012). Accuracy in parameter estimation for ANCOVA and ANOVA contrasts: Sample size planning via narrow confidence intervals. British Journal of Mathematical and Statistical Psychology, 65(2), 350-370.

Examples

es_from_ancova_md_sd(
  ancova_md = 4, ancova_md_sd = 2,
  cov_outcome_r = 0.5, n_cov_ancova = 5,
  n_exp = 20, n_nexp = 22
)

Convert an adjusted mean difference and standard error between two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert an adjusted mean difference and standard error between two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_md_se(
  ancova_md,
  ancova_md_se,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_md
)

Arguments

ancova_md

adjusted mean difference between two independent groups

ancova_md_se

covariate-adjusted standard error of the mean difference

cov_outcome_r

correlation between the outcome and covariate (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean difference (MD) standard error into a standard deviation, and then relies on the calculations of the es_from_ancova_md_sd function.

To convert the standard error into a standard deviation, the following formula is used.

ancova\_md\_sd = \frac{ancova\_md\_se}{\sqrt{1 / n_exp + 1 / n_nexp}}

Calculations of the es_from_ancova_md_sd() are then applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 20. Adjusted: Mean difference and dispersion'
https://metaconvert.org/input.html

Examples

es_from_ancova_md_se(
  ancova_md = 4, ancova_md_se = 2,
  cov_outcome_r = 0.5, n_cov_ancova = 5,
  n_exp = 20, n_nexp = 22
)

Convert means and 95% CIs of two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert means and 95% CIs of two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_means_ci(
  n_exp,
  n_nexp,
  ancova_mean_exp,
  ancova_mean_ci_lo_exp,
  ancova_mean_ci_up_exp,
  ancova_mean_nexp,
  ancova_mean_ci_lo_nexp,
  ancova_mean_ci_up_nexp,
  cov_outcome_r,
  n_cov_ancova,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_means
)

Arguments

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

ancova_mean_exp

adjusted mean of participants in the experimental/exposed group.

ancova_mean_ci_lo_exp

lower bound of the adjusted 95% CI of the mean of the experimental/exposed group

ancova_mean_ci_up_exp

upper bound of the adjusted 95% CI of the mean of the experimental/exposed group

ancova_mean_nexp

adjusted mean of participants in the non-experimental/non-exposed group.

ancova_mean_ci_lo_nexp

lower bound of the adjusted 95% CI of the mean of the non-experimental/non-exposed group.

ancova_mean_ci_up_nexp

upper bound of the adjusted 95% CI of the mean of the non-experimental/non-exposed group.

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the adjusted means 95% CI of two independent groups into a standard error, and then relies on the calculations of the es_from_ancova_means_se() function.

To convert the 95% CIs into standard errors, the following formula is used (table 12.3 in Cooper):

ancova\_mean\_se\_exp = \frac{ancova\_mean\_ci\_up\_exp - ancova\_mean\_ci\_lo\_exp}{2 * qt(0.975, df = n\_exp + n\_nexp - 2 - n\_cov\_ancova)}

ancova\_mean\_se\_nexp = \frac{ancova\_mean\_ci\_up\_nexp - ancova\_mean\_ci\_lo\_nexp}{2 * qt(0.975, df = n\_exp + n\_nexp - 2 - n\_cov\_ancova)}

Calculations of the es_from_ancova_means_se() are then applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 19. Adjusted: Means and dispersion'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_ancova_means_ci(
  n_exp = 55, n_nexp = 55, cov_outcome_r = 0.5, n_cov_ancova = 4,
  ancova_mean_exp = 25, ancova_mean_ci_lo_exp = 15, ancova_mean_ci_up_exp = 35,
  ancova_mean_nexp = 18, ancova_mean_ci_lo_nexp = 12, ancova_mean_ci_up_nexp = 24
)

Convert means and standard deviations of two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert means and standard deviations of two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_means_sd(
  n_exp,
  n_nexp,
  ancova_mean_exp,
  ancova_mean_nexp,
  ancova_mean_sd_exp,
  ancova_mean_sd_nexp,
  cov_outcome_r,
  n_cov_ancova,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_means
)

Arguments

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

ancova_mean_exp

adjusted mean of participants in the experimental/exposed group.

ancova_mean_nexp

adjusted mean of participants in the non-experimental/non-exposed group.

ancova_mean_sd_exp

adjusted standard deviation of participants in the experimental/exposed group.

ancova_mean_sd_nexp

adjusted standard deviation of participants in the non-experimental/non-exposed group.

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function first computes an "adjusted" mean difference (MD), Cohen's d (D) and Hedges' g (G) from the adjusted means and standard deviations. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

This function start by estimating the non-adjusted standard deviation of the two groups (formula 12.24 in Cooper);

mean\_sd\_exp = \frac{ancova\_mean\_sd\_exp}{\sqrt{1 - cov\_outcome\_r^2}}

mean\_sd\_nexp = \frac{ancova\_mean\_sd\_nexp}{\sqrt{1 - cov\_outcome\_r^2}}

To obtain the mean difference, the following formulas are used (authors calculations):

md = ancova\_mean\_exp - ancova\_mean\_nexp

md\_se = \sqrt{\frac{ancova\_mean\_sd\_exp^2}{n\_exp} + \frac{ancova\_mean\_sd\_nexp^2}{n\_nexp}}

md\_ci\_lo = md - md\_se * qt(.975, n\_exp+n\_nexp-2-n\_cov\_ancova)

md\_ci\_up = md + md\_se * qt(.975, n\_exp+n\_nexp-2-n\_cov\_ancova)

To obtain the Cohen's d, the following formulas are used (table 12.3 in Cooper):

mean\_sd\_pooled = \sqrt{\frac{(n\_exp - 1) * ancova\_mean\_sd\_exp^2 + (n\_nexp - 1) * ancova\_mean\_sd\_nexp^2}{n\_exp+n\_nexp-2}}

cohen\_d = \frac{ancova\_mean\_exp - ancova\_mean\_nexp}{mean\_sd\_pooled}

cohen\_d\_se = \sqrt{\frac{(n\_exp+n\_nexp)*(1-cov\_outcome\_r^2)}{n\_exp*n\_nexp} + \frac{cohen\_d^2}{2(n\_exp+n\_nexp)}}

cohen\_d\_ci\_lo = cohen\_d - cohen\_d\_se * qt(.975, n\_exp + n\_nexp - 2 - n\_cov\_ancova)

cohen\_d\_ci\_up = cohen\_d + cohen\_d\_se * qt(.975, n\_exp + n\_nexp - 2 - n\_cov\_ancova)

To estimate other effect size measures, Calculations of the es_from_cohen_d_adj() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 19. Adjusted: Means and dispersion'
https://metaconvert.org/input.html

Note

The sampling variance follows Cooper's eq. 12.26 and assumes the covariate is balanced across groups. It omits the covariate-imbalance ("leverage") term of the exact ANCOVA variance, \sigma^2_{res}\,(1/n\_exp + 1/n\_nexp + (\bar{x}\_exp-\bar{x}\_nexp)^2 / SS_x), which is not recoverable from summary statistics, and treats cov_outcome_r as known. In balanced/randomised designs the omission is negligible; in observational or otherwise covariate-imbalanced designs the standard error is a lower bound (anti-conservative), while the point estimate remains unbiased. See Lai and Kelley (2012).

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Lai, K., & Kelley, K. (2012). Accuracy in parameter estimation for ANCOVA and ANOVA contrasts: Sample size planning via narrow confidence intervals. British Journal of Mathematical and Statistical Psychology, 65(2), 350-370.

Examples

es_from_ancova_means_sd(
  n_exp = 55, n_nexp = 55,
  ancova_mean_exp = 2.3, ancova_mean_sd_exp = 1.2,
  ancova_mean_nexp = 1.9, ancova_mean_sd_nexp = 0.9,
  cov_outcome_r = 0.2, n_cov_ancova = 3
)


Convert means and adjusted pooled standard deviation of two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert means and adjusted pooled standard deviation of two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_means_sd_pooled_adj(
  ancova_mean_exp,
  ancova_mean_nexp,
  ancova_mean_sd_pooled,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_means
)

Arguments

ancova_mean_exp

adjusted mean of participants in the experimental/exposed group.

ancova_mean_nexp

adjusted mean of participants in the non-experimental/non-exposed group.

ancova_mean_sd_pooled

adjusted pooled standard deviation.

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the adjusted pooled standard deviations of two independent groups into a crude pooled standard deviation. and then relies on the calculations of the es_from_ancova_means_sd_pooled_crude() function.

To convert the adjusted pooled SD into a crude pooled SD (table 12.3 in Cooper):

mean\_sd\_pooled = \frac{ancova\_mean\_sd\_pooled}{\sqrt{1 - cov\_outcome\_r^2}}

Calculations of the es_from_ancova_means_sd_pooled_crude() are then applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 19. Adjusted: Means and dispersion'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_ancova_means_sd_pooled_adj(
  ancova_mean_exp = 98, ancova_mean_nexp = 87,
  ancova_mean_sd_pooled = 17, cov_outcome_r = 0.2,
  n_cov_ancova = 3, n_exp = 20, n_nexp = 20
)

Convert adjusted means obtained from an ANCOVA model and crude pooled standard deviation of two independent groups into several effect size measures

Description

Convert adjusted means obtained from an ANCOVA model and crude pooled standard deviation of two independent groups into several effect size measures

Usage

es_from_ancova_means_sd_pooled_crude(
  ancova_mean_exp,
  ancova_mean_nexp,
  mean_sd_pooled,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_means
)

Arguments

ancova_mean_exp

adjusted mean of participants in the experimental/exposed group.

ancova_mean_nexp

adjusted mean of participants in the non-experimental/non-exposed group.

mean_sd_pooled

crude pooled standard deviation.

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function first computes an "adjusted" mean difference (MD) and Cohen's d (D) from the adjusted means and crude pooled standard deviation of two independent groups. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate the Cohen's d:

d = \frac{ancova\_mean\_exp - ancova\_mean\_nexp\_adj}{mean\_sd\_pooled}

To estimate the mean difference:

md = ancova\_mean\_exp - ancova\_mean\_nexp\_adj

md\_se = \sqrt{\frac{n\_exp + n\_nexp}{n\_exp * n\_nexp} * (1 - cov\_outcome\_r^2) * mean\_sd\_pooled^2}

Then, calculations of the es_from_ancova_means_sd() and es_from_cohen_d_adj() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 19. Adjusted: Means and dispersion'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_ancova_means_sd_pooled_crude(
  ancova_mean_exp = 29, ancova_mean_nexp = 34,
  mean_sd_pooled = 7, cov_outcome_r = 0.2,
  n_cov_ancova = 3, n_exp = 20, n_nexp = 20
)

Convert means and standard errors of two independent groups obtained from an ANCOVA model into several effect size measures

Description

Convert means and standard errors of two independent groups obtained from an ANCOVA model into several effect size measures

Usage

es_from_ancova_means_se(
  n_exp,
  n_nexp,
  ancova_mean_exp,
  ancova_mean_nexp,
  ancova_mean_se_exp,
  ancova_mean_se_nexp,
  cov_outcome_r,
  n_cov_ancova,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_means
)

Arguments

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

ancova_mean_exp

adjusted mean of participants in the experimental/exposed group.

ancova_mean_nexp

adjusted mean of participants in the non-experimental/non-exposed group.

ancova_mean_se_exp

adjusted standard error of participants in the experimental/exposed group.

ancova_mean_se_nexp

adjusted standard error of participants in the non-experimental/non-exposed group.

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the adjusted means standard errors of two independent groups into standard deviations, and then relies on the calculations of the es_from_ancova_means_sd function.

To convert the standard errors into standard deviations, the following formula is used.

ancova\_mean\_sd\_exp = ancova\_mean\_se\_exp * \sqrt{n\_exp}

ancova\_mean\_sd\_nexp = ancova\_mean\_se\_nexp * \sqrt{n\_nexp}

Calculations of the es_from_ancova_means_sd() are then applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 19. Adjusted: Means and dispersion'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_ancova_means_se(
  n_exp = 55, n_nexp = 55,
  ancova_mean_exp = 2.3, ancova_mean_se_exp = 1.2,
  ancova_mean_nexp = 1.9, ancova_mean_se_nexp = 0.9,
  cov_outcome_r = 0.2, n_cov_ancova = 3
)

Convert a t-statistic obtained from an ANCOVA model into several effect size measures.

Description

Convert a t-statistic obtained from an ANCOVA model into several effect size measures.

Usage

es_from_ancova_t(
  ancova_t,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_t
)

Arguments

ancova_t

a t-statistic from an ANCOVA (binary predictor)

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_t

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function first computes an "adjusted" Cohen's d (D), and Hedges' g (G) from the t-value of an ANCOVA (binary predictor). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate a Cohen's d the formula used is (table 12.3 in Cooper):

cohen\_d = ancova\_t* \sqrt{\frac{(n\_exp+n\_nexp)}{n\_exp*n\_nexp}}\sqrt{1 - cov\_out\_cor^2}

To estimate other effect size measures, Calculations of the es_from_cohen_d_adj() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 18. Adjusted: ANCOVA statistics, eta-squared'
https://metaconvert.org/input.html

Note

The Cohen's d point estimate is recovered from the reported ANCOVA t (which already embeds the covariate adjustment), but its sampling variance is rebuilt from Cooper's eq. 12.26, which assumes a covariate balanced across groups and treats cov_outcome_r as known. In observational or otherwise covariate-imbalanced designs the standard error is a lower bound (anti-conservative), while the point estimate remains unbiased. See Lai and Kelley (2012).

References

Cooper, H., Hedges, L. V., & Valentine, J. C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Lai, K., & Kelley, K. (2012). Accuracy in parameter estimation for ANCOVA and ANOVA contrasts: Sample size planning via narrow confidence intervals. British Journal of Mathematical and Statistical Psychology, 65(2), 350-370.

Examples

es_from_ancova_t(ancova_t = 2, cov_outcome_r = 0.2, n_cov_ancova = 3, n_exp = 20, n_nexp = 20)

Convert a two-tailed p-value of an ANCOVA t-test into several effect size measures.

Description

Convert a two-tailed p-value of an ANCOVA t-test into several effect size measures.

Usage

es_from_ancova_t_pval(
  ancova_t_pval,
  cov_outcome_r,
  n_cov_ancova,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_ancova_t_pval
)

Arguments

ancova_t_pval

a two-tailed p-value of a t-test in an ANCOVA (binary predictor)

cov_outcome_r

correlation between the outcome and covariate(s) (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the adjusted cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_ancova_t_pval

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the p-value of an ANCOVA (binary predictor) into a t value, and then relies on the calculations of the es_from_ancova_t() function.

To convert the p-value into a t-value, the following formula is used (table 12.3 in Cooper):

df = n\_exp + n\_nexp - 2 - n\_cov\_ancova

t = | qt(ancova\_t\_pval/2, df = df) |

Then, calculations of the es_from_ancova_t() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 18. Adjusted: ANCOVA statistics, eta-squared'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_ancova_t_pval(
  ancova_t_pval = 0.05, cov_outcome_r = 0.2,
  n_cov_ancova = 3, n_exp = 20, n_nexp = 20
)

Convert a one-way independent ANOVA F-value to several effect size measures

Description

Convert a one-way independent ANOVA F-value to several effect size measures

Usage

es_from_anova_f(
  anova_f,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_anova_f
)

Arguments

anova_f

ANOVA F-value (one-way, binary predictor).

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the anova_f value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_anova_f

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the F-value (one-way, binary predictor) into a t-value, and then relies on the calculations of the es_from_student_t() function.

To convert the F-value into a t-value, the following formula is used (table 12.1 in Cooper):

student\_t = \sqrt{anova\_f}

Then, calculations of the es_from_student_t() are applied.

Important - single numerator degree of freedom only. The identity \sqrt{F} = |t| holds only when the F-test has a single numerator degree of freedom, i.e. a one-way ANOVA comparing exactly two groups (a binary predictor). Supplying an omnibus F from a factor with three or more levels (numerator df > 1) produces a meaningless effect size and is not detected by the function. In addition, \sqrt{F} discards the sign of the effect, so the generated effect sizes are always non-negative; use reverse_anova_f to encode direction.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 11. ANOVA statistics, Student's t-test, or point-bis correlation'
https://metaconvert.org/html/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_anova_f(anova_f = 2.01, n_exp = 20, n_nexp = 22)

Convert a p-value from a one-way independent ANOVA to several effect size measures

Description

Convert a p-value from a one-way independent ANOVA to several effect size measures

Usage

es_from_anova_pval(
  anova_f_pval,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_anova_f_pval
)

Arguments

anova_f_pval

p-value (two-tailed) from an ANOVA (binary predictor). If your p-value is one-tailed, simply multiply it by two.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the anova_f_pval value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_anova_f_pval

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the p-value from the F-value of an ANOVA (one-way, binary predictor) into a t-value, and then relies on the calculations of the es_from_student_t() function.

To convert the p-value into a t-value, the following formula is used (table 12.1 in Cooper):

student\_t = qt(\frac{anova\_f\_pval}{2}, df = n\_exp + n\_nexp - 2)

Then, calculations of the es_from_student_t() are applied.

As for es_from_anova_f, this conversion is valid only for an F-test with a single numerator degree of freedom (a two-group comparison): the p-value of a multi-level (numerator df > 1) omnibus F is inverted here as if it were a two-sided two-group t p-value, which is incorrect. The two-sided p-value also carries no direction, so the generated effect sizes are always non-negative; use reverse_anova_f_pval to encode the correct sign.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 11. ANOVA statistics, Student's t-test, or point-bis correlation'
https://metaconvert.org/html/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_anova_pval(anova_f_pval = 0.0012, n_exp = 20, n_nexp = 22)

Convert a standardized regression coefficient and the standard deviation of the dependent variable into several effect size measures

Description

Convert a standardized regression coefficient and the standard deviation of the dependent variable into several effect size measures

Usage

es_from_beta_std(
  beta_std,
  sd_dv,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_beta_std
)

Arguments

beta_std

a standardized regression coefficient value (binary predictor, no other covariables in the model)

sd_dv

standard deviation of the dependent variable

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_beta_std

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts a standardized linear regression coefficient (coming from a model with only one binary predictor), into an unstandardized linear regression coefficient.

sd\_dummy = \sqrt{\frac{n_exp - (n_exp^2 / (n_exp + n_nexp))}{(n_exp + n_nexp - 1)}}

unstd\_beta = beta\_std * \frac{sd\_dv}{sd\_dummy}

Calculations of the es_from_beta_unstd functions are then used.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 13. (Un-)Standardized regression coefficient'
https://metaconvert.org/input.html

References

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.

Examples

es_from_beta_std(beta_std = 0.35, sd_dv = 0.98, n_exp = 20, n_nexp = 22)

Convert an unstandardized regression coefficient and the standard deviation of the dependent variable into several effect size measures

Description

Convert an unstandardized regression coefficient and the standard deviation of the dependent variable into several effect size measures

Usage

es_from_beta_unstd(
  beta_unstd,
  sd_dv,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_beta_unstd
)

Arguments

beta_unstd

an unstandardized regression coefficient value (binary predictor, no other covariables in the model)

sd_dv

standard deviation of the dependent variable

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_beta_unstd

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function estimates a Cohen's d (D) and Hedges' g (G) from an unstandardized linear regression coefficient (coming from a model with only one binary predictor), and the standard deviation of the dependent variable. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

The formula used to obtain the Cohen's d is:

N = n\_exp + n\_nexp

sd\_pooled = \sqrt{\frac{sd\_dv^2 * (N - 1) - unstd\_beta^2 * \frac{n\_exp * n\_nexp}{N}}{N - 2}}

cohen\_d = \frac{unstd\_beta}{sd\_pooled}

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 13. (Un-)Standardized regression coefficient'
https://metaconvert.org/input.html

References

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.

Examples

es_from_beta_unstd(beta_unstd = 0.7, sd_dv = 0.98, n_exp = 20, n_nexp = 22)

Convert the number of cases and the person-time of disease-free observation in two independent groups into an incidence rate ratio (IRR)

Description

Convert the number of cases and the person-time of disease-free observation in two independent groups into an incidence rate ratio (IRR)

Usage

es_from_cases_time(
  n_cases_exp,
  n_cases_nexp,
  time_exp,
  time_nexp,
  baseline_rate,
  reverse_irr
)

Arguments

n_cases_exp

number of cases in the exposed group

n_cases_nexp

number of cases in the non-exposed group

time_exp

person-time of disease-free observation in the exposed group

time_nexp

person-time of disease-free observation in the non-exposed group

baseline_rate

incidence rate of events (per person-time) in the non-exposed group (n_cases_nexp / time_nexp is used when missing)

reverse_irr

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function estimates the incidence rate ratio from the number of cases and the person-time of disease-free observation in two independent groups.

The formula used to obtain the IRR and its standard error are (Cochrane Handbook (section 6.7.1):

logirr = log(\frac{n\_cases\_exp / time\_exp}{n\_cases\_nexp / time\_nexp)}

logirr\_se = \sqrt{\frac{1}{n\_cases\_exp} + \frac{1}{n\_cases\_nexp}}

To estimate a person-time NNT (Mayne et al., 2006), the following formulas are used:

ird = baseline\_rate \times (1 - irr)

nnt = \frac{1}{ird}

where ird is the incidence rate difference and baseline_rate is the incidence rate in the control group.

To estimate the standard error of the IRD, two formulas are used. When baseline_rate is missing:

ird\_se = \sqrt{\frac{n\_cases\_exp}{time\_exp^2} + \frac{n\_cases\_nexp}{time\_nexp^2}}

When baseline_rate is entered by users, the delta method is used:

ird\_se = baseline\_rate \times IRR \times logirr\_se

Value

This function estimates IRR and, when baseline rate information is available, NNT.

natural effect size measure IRR + NNT
converted effect size measure N/A
required input data See 'Section 5. Incidence Ratio Ratio'
https://metaconvert.org/input.html

References

Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Mayne, T. J., Whalen, E., & Rost, K. (2006). Annualized was found better than absolute risk reduction in the calculation of number needed to treat in chronic conditions. Journal of clinical epidemiology, 59(3), 217-223.

Examples

es_from_cases_time(
  n_cases_exp = 241, n_cases_nexp = 554,
  time_exp = 12.764, time_nexp = 19.743
)

Convert a chi-square value to several effect size measures

Description

Convert a chi-square value to several effect size measures

Usage

es_from_chisq(
  chisq,
  n_sample,
  n_cases,
  n_exp,
  yates_chisq = FALSE,
  reverse_chisq
)

Arguments

chisq

value of the chi-squared

n_sample

total number of participants in the sample

n_cases

total number of cases/events

n_exp

total number of participants in the exposed group

yates_chisq

logical value (or vector of length length(chisq)) indicating whether the chi-square has been performed using Yates' correction for continuity. When a vector is supplied, each row is back-transformed using its own setting. Missing values are treated as FALSE.

reverse_chisq

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts a chi-square value (with one degree of freedom) into a phi coefficient (Lipsey et al. 2001):

phi = \sqrt{\frac{chisq}{n\_sample}}

and then converts it to other effect size measures exactly as in es_from_phi() (including the correlation-based R/Z/D/G fallback with standard sampling variances when the 2x2 table cannot be reconstructed).

Note that if yates_chisq = TRUE, the chi-square value is interpreted as Yates-corrected when back-transforming to a 2x2 contingency table; this is propagated row by row when a vector is supplied.

Then, the phi coefficient is converted to other effect size measures (see es_from_phi).

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR + RR + NNT
converted effect size measure D + G + R + Z
required input data See 'Section 8. Phi or chi-square'
https://metaconvert.org/input.html

References

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.

Examples

es_from_chisq(chisq = 4.21, n_sample = 78, n_cases = 51, n_exp = 50)

Convert a p-value of a chi-square to several effect size measures

Description

Convert a p-value of a chi-square to several effect size measures

Usage

es_from_chisq_pval(
  chisq_pval,
  n_sample,
  n_cases,
  n_exp,
  yates_chisq = FALSE,
  reverse_chisq_pval
)

Arguments

chisq_pval

p-value of a chi-square coefficient

n_sample

total number of participants in the sample

n_cases

total number of cases/events

n_exp

total number of participants in the exposed group

yates_chisq

logical value (or vector of length length(chisq_pval)) indicating whether the chi-square has been performed using Yates' correction for continuity. When a vector is supplied, each row is back-transformed using its own setting. Missing values are treated as FALSE.

reverse_chisq_pval

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts a chi-square value (with one degree of freedom) into a chi-square coefficient (Section 3.12 in Lipsey et al., 2001):

chisq = qchisq(chisq\_pval, df = 1, lower.tail = FALSE)

Note that if yates_chisq = TRUE, the chi-square value is interpreted as Yates-corrected when back-transforming to a 2x2 contingency table; this is propagated row by row when a vector is supplied.

Then, the chisq coefficient is converted to other effect size measures (see es_from_chisq).

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR + RR + NNT
converted effect size measure D + G + R + Z
required input data See 'Section 8. Phi or chi-square'
https://metaconvert.org/input.html

References

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.

Examples

es_from_chisq_pval(chisq_pval = 0.2, n_sample = 42, n_exp = 25, n_cases = 13)

Convert a Cohen's d value to several effect size measures

Description

Convert a Cohen's d value to several effect size measures

Usage

es_from_cohen_d(
  cohen_d,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_d
)

Arguments

cohen_d

Cohen's d (i.e., standardized mean difference) value.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_d

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function estimates the standard error of a Cohen's d value and computes a Hedges' g (G). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate the standard error of Cohen's d, the following formula is used (formula 12.13 in Cooper):

cohen\_d\_se = \sqrt{\frac{n\_exp+n\_nexp}{n\_exp*n\_nexp} + \frac{cohen\_d^2}{2*(n\_exp+n\_nexp)}}

cohen\_d\_ci\_lo = cohen\_d - cohen\_d\_se * qt(.975, df = n\_exp+n\_nexp-2)

cohen\_d\_ci\_up = cohen\_d + cohen\_d\_se * qt(.975, df = n\_exp+n\_nexp-2)

To estimate the Hedges' g and its standard error, the following formulas are used (Hedges, 1981):

df = n\_exp + n\_nexp - 2

J = exp(\log_{gamma}(\frac{df}{2}) - 0.5 * \log(\frac{df}{2}) - \log_{gamma}(\frac{df - 1}{2}))

hedges\_g = cohen\_d * J

hedges\_g\_se = \sqrt{cohen\_d\_se^2 * J^2}

hedges\_g\_ci\_lo = hedges\_g - hedges\_g\_se * qt(.975, df = n\_exp+n\_nexp-2)

hedges\_g\_ci\_up = hedges\_g + hedges\_g\_se * qt(.975, df = n\_exp+n\_nexp-2)

To estimate the log odds ratio and its standard error, the following formulas are used (formulas 12.34-12.35 in Cooper):

logor = \frac{cohen\_d * \pi}{\sqrt{3}}

logor\_se = \sqrt{\frac{cohen\_d\_se^2 * \pi^2}{3}}

logor\_lo = logor - logor\_se * qnorm(.975)

logor\_up = logor + logor\_se * qnorm(.975)

Note that this conversion assumes that responses within the two groups follow logistic distributions.

To estimate the correlation coefficient and its standard error, various formulas can be used.

A. To estimate the 'biserial' correlation (smd_to_cor="viechtbauer"), the following formulas are used (formulas 5, 8, 13, 17, 18, 19 in Viechtbauer):

df = n\_exp + n\_nexp - 2 - n\_cov\_ancova

h = \frac{df}{n\_exp} + \frac{df}{n\_nexp}

r.pb = \frac{cohen\_d}{\sqrt{cohen\_d^2 + h}}

p = \frac{n\_exp}{n\_exp + n\_nexp}

q = 1 - p

f = dnorm(qnorm(1-p))

R = \frac{\sqrt{p*q}}{f} * r.pb

R\_var = \frac{1}{n\_exp + n\_nexp - 1} * (\frac{p*q}{f^2} - (\frac{3}{2} + (1 - \frac{p*qnorm(1-p)}{f})(1 + \frac{q*qnorm(1-p)}{f})) R^2 + R^4)

R\_se = \sqrt{R\_var}

a = \frac{\sqrt{f}}{(p*q)^\frac{1}{4}}

Z = \frac{a}{2} * \log(\frac{1+a*R}{1-a*R})

Z\_var = \frac{1}{n - 1}

Z\_se = \sqrt{Z\_var}

Z\_ci\_lo = Z - qnorm(.975) * Z\_se

Z\_ci\_up = Z + qnorm(.975) * Z\_se

R\_ci\_lo = \frac{1}{a} * tanh(\frac{Z\_lo}{a})

R\_ci\_up = \frac{1}{a} * tanh(\frac{Z\_up}{a})

Note: this Z is Jacobs & Viechtbauer's (2017) variance-stabilizing transform of the biserial correlation (with variance 1/(n-1)), which is analogous to – but NOT the same as – Fisher's atanh(R) z-transform for a Pearson correlation (the two coincide only as the effect approaches 0). It is intended for constructing the confidence interval of a single coefficient. For a meta-analysis that mixes standardized-mean-difference and genuine-correlation studies, pool on the correlation (R) scale, where biserial and product-moment correlations are directly comparable (Jacobs & Viechtbauer, 2017), rather than on this Z scale (which summary() labels "Fisher's z" for all correlation inputs).

B. To estimate the correlation coefficient according to Cooper et al. (2019) (formulas 12.40-42) and Borenstein et al. (2009) (formulas 54-56), the following formulas are used (smd_to_cor="lipsey_cooper"):

p = \frac{n\_exp}{n\_exp + n\_nexp}

R = \frac{cohen\_d}{\sqrt{cohen\_d^2 + 1 / (p * (1 - p))}}

a = \frac{(n\_exp + n\_nexp)^2}{(n\_exp*n\_nexp)}

var\_R = \frac{a^2 * cohen\_d\_se^2}{(cohen\_d^2 + a)^3}

R\_se = \sqrt{R\_var}

R\_ci\_lo = R - qt(.975, n\_exp+n\_nexp- 2) * R\_se

R\_ci\_up = R + qt(.975, n\_exp+n\_nexp- 2) * R\_se

Z = atanh(R)

Z\_var = \frac{cohen\_d\_se^2}{cohen\_d^2 + (1 / p*(1-p))}

Z\_se = \sqrt{Z\_var}

Z\_ci\_lo = Z - qnorm(.975) * Z\_se

Z\_ci\_up = Z + qnorm(.975) * Z\_se

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 1. Cohen's d or Hedges' g'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Borenstein, M., Hedges, L. V., Higgins, J. P., & Rothstein, H. R. (2021). Introduction to meta-analysis. John Wiley & Sons.

Hedges LV (1981): Distribution theory for Glass's estimator of effect size and related estimators. Journal of Educational and Behavioral Statistics, 6, 107-28

Jacobs, P., & Viechtbauer, W. (2017). Estimation of the biserial correlation and its sampling variance for use in meta-analysis. Research synthesis methods, 8(2), 161-180.

Examples

es_from_cohen_d(cohen_d = 1, n_exp = 20, n_nexp = 20)

Convert an adjusted Cohen's d value to several effect size measures

Description

Convert an adjusted Cohen's d value to several effect size measures

Usage

es_from_cohen_d_adj(
  cohen_d_adj,
  n_cov_ancova,
  cov_outcome_r,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_d
)

Arguments

cohen_d_adj

Adjusted Cohen's d (i.e., standardized mean difference) value.

n_cov_ancova

number of covariates

cov_outcome_r

covariate-outcome correlation (in case of multiple covariates, the multiple correlation)

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_d

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function estimates the standard error of an adjusted Cohen's d value and Hedges' g (G), and converts an odds ratio (OR) and correlation coefficients (R/Z).

To estimate the standard error of Cohen's d, the following formula is used (table 12.3 in Cooper):

d\_se = \sqrt{\frac{n\_exp+n\_nexp}{n\_exp*n\_nexp} * (1 - cov\_outcome\_r^2) + \frac{cohen\_d\_adj^2}{2*(n\_exp+n\_nexp)}}

To estimate other effect size measures, calculations of the es_from_cohen_d() function are used (with the exception of the degree of freedom that is estimated as df = n_exp + n_nexp - 2 - n_cov_ancova).

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 1. Cohen's d or Hedges' g'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_cohen_d_adj(cohen_d_adj = 1, n_cov_ancova = 4, cov_outcome_r = .30, n_exp = 20, n_nexp = 20)

Convert Cronbach's alpha into an effect size measure

Description

Convert Cronbach's alpha into an effect size measure

Usage

es_from_cronbach_alpha(
  cronbach_alpha,
  n_sample,
  n_items,
  alpha_to_es = "bonett"
)

Arguments

cronbach_alpha

Cronbach's alpha reliability coefficient

n_sample

the total number of participants that completed the scale

n_items

number of items in the scale

alpha_to_es

method used to compute the effect size from Cronbach's alpha. Must be either "bonett" or "raw".

Details

This function computes an effect size from a Cronbach's alpha.

  1. When alpha_to_es = "bonett" (default), the Bonett (2002) transformation is applied:

    T(\alpha) = \ln(1 - \alpha)

    T\_se = \sqrt{\frac{2k}{(k - 1)(n - 2)}}

  2. When alpha_to_es = "raw", the raw alpha is used. Its standard error is the delta-method back-transform of the Bonett (2002) transformed variance (equivalently the van Zyl, Neudecker & Nel, 2000, asymptotic variance; this is the form implemented by metafor's measure = "ARAW"):

    \alpha\_se = (1 - \alpha) \sqrt{\frac{2k}{(k - 1)(n - 2)}}

    Note that Feldt et al.'s (1987) classical asymptotic variance instead uses an (n - 1) denominator; the (n - 2) form above follows Bonett (2002) for consistency with the Bonett transformation used in method 1.

The Bonett transformation stabilizes the variance and is recommended for meta-analysis.

Value

This function estimates the standard error of the Cronbach's alpha.

natural effect size measure alpha
converted effect size measure N/A
required input data cronbach_alpha + n_sample + n_items

References

Bonett, D. G. (2002). Sample size requirements for testing and estimating coefficient alpha. Journal of Educational and Behavioral Statistics, 27(4), 335-340.

Feldt, L. S., Woodruff, D. J., & Salih, F. A. (1987). Statistical inference for coefficient alpha. Applied Psychological Measurement, 11(1), 93-103.

van Zyl, J. M., Neudecker, H., & Nel, D. G. (2000). On the distribution of the maximum likelihood estimator of Cronbach's alpha. Psychometrika, 65(3), 271-280.

Examples

es_from_cronbach_alpha(
  cronbach_alpha = 0.85, n_sample = 200, n_items = 10
)

Convert an eta-squared value to various effect size measures

Description

Convert an eta-squared value to various effect size measures

Usage

es_from_etasq(
  etasq,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_etasq
)

Arguments

etasq

an eta-squared value (binary predictor, ANOVA model), defined as SS_{effect} / SS_{total}. For a one-way, two-group ANOVA this equals the partial eta-squared SS_{effect} / (SS_{effect} + SS_{error}), so the two coincide and either label is correct here (unlike the ANCOVA case handled by es_from_etasq_adj(), which requires the partial form specifically).

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation.

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_etasq

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function first computes a Cohen's d (D) and Hedges' g (G) from the eta squared of a binary predictor (ANOVA model). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate a Cohen's d the following formula is used (Cohen, 1988):

d = 2 * \sqrt{\frac{etasq}{1 - etasq}}

Note that this closed form is the large-sample, equal-groups (n\_exp = n\_nexp) limit of the exact F-based conversion. For markedly unequal group sizes it is approximate; supplying the ANOVA F (es_from_anova_f()), which carries the per-group sample sizes, is more accurate.

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 11. ANOVA statistics, Student's t-test, or point-bis correlation'
https://metaconvert.org/input.html

References

Cohen, J. (1988). Statistical power analysis for the behavioral sciences. Routledge.

Examples

es_from_etasq(etasq = 0.28, n_exp = 20, n_nexp = 22)

Convert an adjusted eta-squared value (i.e., from an ANCOVA) to various effect size measures

Description

Convert an adjusted eta-squared value (i.e., from an ANCOVA) to various effect size measures

Usage

es_from_etasq_adj(
  etasq_adj,
  n_exp,
  n_nexp,
  n_cov_ancova,
  cov_outcome_r,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_etasq
)

Arguments

etasq_adj

an adjusted eta-squared value obtained from an ANCOVA model. This must be the partial eta-squared of the group effect, \eta_p^2 = SS_{group} / (SS_{group} + SS_{error}) — the quantity that most software (SPSS, car, effectsize) prints for an ANCOVA term. Do not supply the classical eta-squared SS_{group} / SS_{total}: in an ANCOVA the total sum of squares also contains the covariate variance, so the classical value is smaller than the partial one and would be inverted into too small an F, biasing the effect size toward zero. (In a covariate-free one-way ANOVA the two definitions coincide; see es_from_etasq().)

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

n_cov_ancova

number of covariates in the ANCOVA model.

cov_outcome_r

correlation between the outcome and covariate (multiple correlation when multiple covariates are included in the ANCOVA model).

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_etasq

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the adjusted (partial) eta-squared of a binary predictor (ANCOVA model) into the ANCOVA F-statistic it implies, and then relies on the calculations of the es_from_ancova_f() function. The returned Cohen's d (D) and Hedges' g (G) are therefore expressed on the marginal (unadjusted) SD scale — consistent with the other es_from_ancova_* functions — not on the residual (covariate-adjusted) SD scale on which a partial eta-squared is natively defined. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To convert the adjusted eta-squared into an ANCOVA F-statistic, the partial-eta-squared identity \eta_p^2 = F / (F + df) is inverted (this is why a partial eta-squared, not a classical one, is required):

df = n\_exp + n\_nexp - 2 - n\_cov\_ancova

ancova\_f = \frac{etasq\_adj * df}{1 - etasq\_adj}

To estimate a Cohen's d the formula used is (table 12.3 in Cooper):

cohen\_d = \sqrt{ancova\_f * \frac{(n\_exp+n\_nexp)}{n\_exp*n\_nexp}} * \sqrt{1 - cov\_out\_cor^2}

Note that the back-transformation to the marginal SD scale requires cov_outcome_r; when it is missing, the effect size estimates are returned as NA (the marginal scale is not identified from the adjusted eta-squared alone).

To estimate other effect size measures, calculations of the es_from_cohen_d_adj() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 18. Adjusted: ANCOVA statistics, eta-squared'
https://metaconvert.org/input.html

Note

Two cautions apply. (1) etasq_adj must be the partial eta-squared (see the parameter description); a classical eta-squared biases the effect size toward zero. (2) The sampling variance is rebuilt from Cooper's eq. 12.26, which assumes a covariate balanced across groups and treats cov_outcome_r as known; in covariate-imbalanced designs the standard error is a lower bound (anti-conservative), while the point estimate remains unbiased. See Lai and Kelley (2012).

References

Cooper, H., Hedges, L. V., & Valentine, J. C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Lai, K., & Kelley, K. (2012). Accuracy in parameter estimation for ANCOVA and ANOVA contrasts: Sample size planning via narrow confidence intervals. British Journal of Mathematical and Statistical Psychology, 65(2), 350-370.

Examples

es_from_etasq_adj(etasq_adj = 0.28, n_cov_ancova = 3, cov_outcome_r = 0.2, n_exp = 20, n_nexp = 22)

Convert a Fisher's z (r-to-z transformation) to several effect size measures

Description

Convert a Fisher's z (r-to-z transformation) to several effect size measures

Usage

es_from_fisher_z(
  fisher_z,
  n_sample,
  unit_type = "raw_scale",
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  sd_iv,
  unit_increase_iv,
  reverse_fisher_z
)

Arguments

fisher_z

a Fisher's r-to-z transformed correlation coefficient

n_sample

the total number of participants

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "value"

n_exp

number of the experimental/exposed group

n_nexp

number of the non-experimental/non-exposed group

cor_to_smd

formula used to convert a pearson_r or fisher_z value into a SMD.

sd_iv

the standard deviation of the independent variable

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (see details).

reverse_fisher_z

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts estimates the standard error of the Fisher's z and performs the z-to-r Fisher's transformation.

Last, it converts this r value into a Cohen's d and OR (see details in es_from_pearson_r()).

Value

This function estimates and converts between several effect size measures.

natural effect size measure R + Z
converted effect size measure D + G + OR
required input data See 'Section 4. Pearson's r or Fisher's z'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Mathur, M. B., & VanderWeele, T. J. (2020). A Simple, Interpretable Conversion from Pearson's Correlation to Cohen's for d Continuous Exposures. Epidemiology (Cambridge, Mass.), 31(2), e16-e18. https://doi.org/10.1097/EDE.0000000000001105

Viechtbauer W (2010). "Conducting meta-analyses in R with the metafor package." Journal of Statistical Software, 36(3), 1-48. doi:10.18637/jss.v036.i03.

Examples

es_from_fisher_z(
  fisher_z = .21, n_sample = 44,
)

Convert a Hedges' g value to other effect size measures (G, OR, COR)

Description

Convert a Hedges' g value to other effect size measures (G, OR, COR)

Usage

es_from_hedges_g(
  hedges_g,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_g
)

Arguments

hedges_g

Hedges' g value

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the hedges_g value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_g

a logical value indicating whether the direction of the hedges_g value should be flipped.

Details

This function estimates the standard error of the Hedges' g and the Cohen's d (D). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate standard error of Hedges'g, the following formula is used (Hedges, 1981):

df = n\_exp + n\_nexp - 2

hedges\_g\_se = \sqrt{cohen\_d\_se^2 * J^2}

hedges\_g\_ci\_lo = hedges\_g - hedges\_g\_se * qt(.975, df = n\_exp+n\_nexp-2)

hedges\_g\_ci\_up = hedges\_g + hedges\_g\_se * qt(.975, df = n\_exp+n\_nexp-2)

To estimate the Cohen's d value, the following formula is used (Hedges, 1981):

J = exp(\log_{gamma}(\frac{df}{2}) - 0.5 * \log(\frac{df}{2}) - \log_{gamma}(\frac{df - 1}{2}))

cohen\_d = \frac{hedges\_g}{J}

cohen\_d\_se = \sqrt{(\frac{n\_exp+n\_nexp}{n\_exp*n\_nexp} + \frac{cohen\_d^2}{2*(n\_exp+n\_nexp)})}

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 1. Cohen's d or Hedges' g'
https://metaconvert.org/input.html

References

Hedges LV (1981): Distribution theory for Glass's estimator of effect size and related estimators. Journal of Educational and Behavioral Statistics, 6, 107-28

Examples

es_from_hedges_g(hedges_g = 0.243, n_exp = 20, n_nexp = 20)

Convert an intraclass correlation coefficient (ICC) into an effect size measure

Description

Convert an intraclass correlation coefficient (ICC) into an effect size measure

Usage

es_from_icc(
  icc,
  n_sample,
  n_measurements,
  icc_type = "agreement",
  icc_to_es = "bonett"
)

Arguments

icc

intraclass correlation coefficient value

n_sample

total sample size (number of subjects)

n_measurements

number of measurements or raters

icc_type

ICC type: "agreement" for ICC(2,1) (two-way random, absolute agreement) or "consistency" for ICC(3,1) (two-way mixed, consistency). Default is "agreement".

icc_to_es

method used to compute the effect size from ICC. Must be either "bonett" or "raw".

Details

This function computes an effect size from an ICC.

  1. When icc_to_es = "bonett" (default), the Bonett (2002) transformation is applied:

    T(ICC) = \ln(1 - ICC)

    with the one-way random-model / two-way-consistency leading-order sampling variance (Bonett, 2002; Donner & Eliasziw, 1987):

    T\_se = \sqrt{\frac{2 (1 + (k-1) ICC)^2}{k (k - 1)(n - 1)}}

  2. When icc_to_es = "raw", the raw ICC is used and its standard error is obtained by the delta method ((1 - ICC) times the transformed-scale SE).

Scope of the SE formula. For the two-way consistency ICC(3,1) (icc_type = "consistency") this SE is exact at leading order: deriving it from F_0 = MSR/MSE (with degrees of freedom n-1 and (n-1)(k-1)) reduces to the same expression, and it still depends on the ICC value (it is not \rho-free). For the two-way absolute-agreement ICC(2,1) (icc_type = "agreement", the default) the same formula is only a one-way approximation that assumes negligible between-rater variance: when raters differ systematically (\sigma^2_{rater} > 0), the ICC(2,1) estimator depends on the between-rater mean square, which has only k - 1 degrees of freedom, so its true sampling variance does not shrink at the 1/n rate this formula assumes and the reported SE/CI can be markedly anti-conservative (simulation: 95\ n grows). The exact ICC(2,1) variance requires the rater-variance component, which summary data do not report; a per-row informational flag (V31) marks agreement-type rows for this reason. If the raters are known to be exchangeable (negligible rater variance), the approximation is accurate.

Scale note. Under the default icc_to_es = "bonett" the returned icc_se column is on the \ln(1 - ICC) scale. If you feed it to compute_sem (whose icc_se argument expects the RAW-scale SE), convert it first: raw_se = icc_se * (1 - icc) - or call es_from_icc with icc_to_es = "raw".

Value

This function estimates the standard error of the ICC.

natural effect size measure icc
converted effect size measure N/A
required input data icc + n_sample + n_measurements

References

Bonett, D. G. (2002). Sample size requirements for estimating intraclass correlations with desired precision. Statistics in Medicine, 21(9), 1331-1335.

Shrout, P. E., & Fleiss, J. L. (1979). Intraclass correlations: uses in assessing rater reliability. Psychological Bulletin, 86(2), 420-428.

Examples

es_from_icc(
  icc = 0.80, n_sample = 50, n_measurements = 2, icc_type = "agreement"
)

Convert an unstandardized regression coefficient and its confidence interval into several effect size measures

Description

Convert an unstandardized regression coefficient and its confidence interval into several effect size measures

Usage

es_from_linreg_b_ci(
  linreg_b,
  linreg_b_ci_lo,
  linreg_b_ci_up,
  n_sample,
  n_covariates,
  sd_iv,
  unit_increase_iv,
  unit_type = "raw_scale",
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  reverse_linreg_b
)

Arguments

linreg_b

unstandardized regression coefficient from a linear regression model

linreg_b_ci_lo

lower bound of the 95% confidence interval of the regression coefficient

linreg_b_ci_up

upper bound of the 95% confidence interval of the regression coefficient

n_sample

the total number of participants

n_covariates

the number of covariates in the model (excluding the predictor of interest).

sd_iv

the standard deviation of the independent variable (optional, see details)

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (optional, see details).

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "raw_scale"

n_exp

number of the experimental/exposed group (optional)

n_nexp

number of the non-experimental/non-exposed group (optional)

cor_to_smd

formula used to convert a pearson_r or fisher_z value into a SMD.

reverse_linreg_b

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function derives the standard error from the 95% confidence interval using a t-distribution with df = n\_sample - n\_covariates - 2 degrees of freedom:

SE(b) = \frac{ci\_up - ci\_lo}{2 \times qt(.975, df)}

Then, calculations of the es_from_linreg_b_se function are applied. For binary predictors without covariates, use es_from_beta_unstd instead.

Value

This function estimates and converts between several effect size measures.

natural effect size measure Rp (partial correlation) + Zp (Fisher's z of partial r)
converted effect size measure D + G + OR (approximate, see es_from_linreg_t)

References

Aloe, A. M., & Thompson, C. G. (2013). The synthesis of partial effect sizes. Journal of the Society for Social Work and Research, 4(4), 390–405.

Examples

es_from_linreg_b_ci(
  linreg_b = 1.5, linreg_b_ci_lo = 0.3, linreg_b_ci_up = 2.7,
  n_sample = 100, n_covariates = 2
)

Convert an unstandardized regression coefficient and its p-value into several effect size measures

Description

Convert an unstandardized regression coefficient and its p-value into several effect size measures

Usage

es_from_linreg_b_pval(
  linreg_b,
  linreg_b_pval,
  n_sample,
  n_covariates,
  sd_iv,
  unit_increase_iv,
  unit_type = "raw_scale",
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  reverse_linreg_b_pval
)

Arguments

linreg_b

unstandardized regression coefficient from a linear regression model

linreg_b_pval

two-sided p-value of the regression coefficient

n_sample

the total number of participants

n_covariates

the number of covariates in the model (excluding the predictor of interest).

sd_iv

the standard deviation of the independent variable (optional, see details)

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (optional, see details).

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "raw_scale"

n_exp

number of the experimental/exposed group (optional)

n_nexp

number of the non-experimental/non-exposed group (optional)

cor_to_smd

formula used to convert a pearson_r or fisher_z value into a SMD.

reverse_linreg_b_pval

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function recovers the t-statistic from the two-sided p-value:

t = qt(1 - pval/2, df) \times sign(b)

where df = n\_sample - n\_covariates - 2.

The sign of the regression coefficient gives the direction, which the two-tailed p-value does not carry. Then, calculations of the es_from_linreg_t function are applied. For binary predictors without covariates, use es_from_beta_unstd instead.

Value

This function estimates and converts between several effect size measures.

natural effect size measure Rp (partial correlation) + Zp (Fisher's z of partial r)
converted effect size measure D + G + OR (approximate, see es_from_linreg_t)

References

Aloe, A. M., & Thompson, C. G. (2013). The synthesis of partial effect sizes. Journal of the Society for Social Work and Research, 4(4), 390–405.

Examples

es_from_linreg_b_pval(
  linreg_b = 1.5, linreg_b_pval = 0.01,
  n_sample = 100, n_covariates = 2
)

Convert an unstandardized regression coefficient and its standard error into several effect size measures

Description

Convert an unstandardized regression coefficient and its standard error into several effect size measures

Usage

es_from_linreg_b_se(
  linreg_b,
  linreg_b_se,
  n_sample,
  n_covariates,
  sd_iv,
  unit_increase_iv,
  unit_type = "raw_scale",
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  reverse_linreg_b
)

Arguments

linreg_b

unstandardized regression coefficient from a linear regression model

linreg_b_se

standard error of the regression coefficient

n_sample

the total number of participants

n_covariates

the number of covariates in the model (excluding the predictor of interest).

sd_iv

the standard deviation of the independent variable (optional, see details)

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (optional, see details).

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "raw_scale"

n_exp

number of the experimental/exposed group (optional)

n_nexp

number of the non-experimental/non-exposed group (optional)

cor_to_smd

formula used to convert a pearson_r or fisher_z value into a SMD.

reverse_linreg_b

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function derives a t-statistic from a regression coefficient and its standard error, then converts it into a partial correlation and other effect size measures.

The Wald t-statistic is computed as:

t = \frac{b}{SE(b)}

Once the t-statistic is obtained, all subsequent conversions follow the same formulas as in es_from_linreg_t.

For binary predictors without covariates, use es_from_beta_unstd instead, which converts directly to Cohen's d.

Value

This function estimates and converts between several effect size measures.

natural effect size measure Rp (partial correlation) + Zp (Fisher's z of partial r)
converted effect size measure D + G + OR (approximate, see es_from_linreg_t)

References

Aloe, A. M., & Thompson, C. G. (2013). The synthesis of partial effect sizes. Journal of the Society for Social Work and Research, 4(4), 390–405.

van Aert, R. C. M., & Goos, C. (2023). A critical reflection on computing the sampling variance of the partial correlation coefficient. Research Synthesis Methods, 14(3), 520–525.

Examples

es_from_linreg_b_se(linreg_b = 1.5, linreg_b_se = 0.6, n_sample = 100, n_covariates = 2)

Convert a t-statistic from a linear regression model to several effect size measures

Description

Convert a t-statistic from a linear regression model to several effect size measures

Usage

es_from_linreg_t(
  linreg_t,
  n_sample,
  n_covariates,
  sd_iv,
  unit_increase_iv,
  unit_type = "raw_scale",
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  reverse_linreg_t
)

Arguments

linreg_t

a t-statistic from a linear regression model

n_sample

the total number of participants

n_covariates

the number of covariates in the model (excluding the predictor of interest).

sd_iv

the standard deviation of the independent variable (optional, see details)

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (optional, see details).

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "raw_scale"

n_exp

number of the experimental/exposed group (optional)

n_nexp

number of the non-experimental/non-exposed group (optional)

cor_to_smd

formula used to convert a pearson_r or fisher_z value into a SMD.

reverse_linreg_t

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts a t-statistic from a linear regression model into a partial correlation coefficient (Rp) and its Fisher's z transformation (Zp).

The partial correlation is obtained as (Aloe & Thompson, 2013, Eq. 2; Gustafson, 1961):

r_p = \frac{t}{\sqrt{t^2 + df}}

where df = n\_sample - n\_covariates - 2 is the residual degrees of freedom of the regression model (i.e. n minus the intercept, the focal predictor, and the n_covariates covariates).

Its sampling variance is estimated as recommended by van Aert & Goos (2023, Eq. 5):

var(r_p) = \frac{(1 - r_p^2)^2}{df}

The Fisher's z transformation and its variance are:

z_p = atanh(r_p)

var(z_p) = \frac{1}{n - n\_covariates - 3}

Cohen's d, Hedges' g and odds ratio are then converted from the partial correlation using the calculations of the es_from_pearson_r function. A partial correlation controls for covariates and thus targets a different estimand than a two-group comparison or a bivariate correlation (Aloe & Thompson, 2013); the converted d/g/OR values should not be pooled with such effect sizes. For meta-analyses of regression results, use measure = "rp" or measure = "zp" in convert_df.

Value

This function estimates and converts between several effect size measures.

natural effect size measure Rp (partial correlation) + Zp (Fisher's z of partial r)
converted effect size measure D + G + OR (approximate, see details)

References

Aloe, A. M., & Thompson, C. G. (2013). The synthesis of partial effect sizes. Journal of the Society for Social Work and Research, 4(4), 390–405.

Gustafson, R. L. (1961). Partial correlations in regression computations. Journal of the American Statistical Association, 56, 363–367.

Mathur, M. B., & VanderWeele, T. J. (2020). A simple, interpretable conversion from Pearson's correlation to Cohen's d for continuous exposures. Epidemiology, 31(2), e16–e18.

van Aert, R. C. M., & Goos, C. (2023). A critical reflection on computing the sampling variance of the partial correlation coefficient. Research Synthesis Methods, 14(3), 520–525.

Examples

es_from_linreg_t(linreg_t = 2.5, n_sample = 100, n_covariates = 2)

# Reproduce Aloe & Thompson (2013) Table 1, Cole et al. (2004)
es_from_linreg_t(linreg_t = 6.19, n_sample = 232, n_covariates = 6)

Convert an odds ratio or risk ratio and a Wald t-statistic from a regression model into several effect size measures

Description

Convert an odds ratio or risk ratio and a Wald t-statistic from a regression model into several effect size measures

Usage

es_from_logreg_t(
  or,
  logor,
  rr,
  logrr,
  logreg_t,
  baseline_risk,
  small_margin_prop,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  or_to_rr = "metaumbrella_cases",
  or_to_cor = "bonett",
  rr_to_or = "metaumbrella",
  reverse_logreg_t
)

Arguments

or

odds ratio value (from logistic regression)

logor

log odds ratio value

rr

risk ratio value (from log-binomial or modified Poisson regression)

logrr

log risk ratio value

logreg_t

a t-statistic (Wald statistic) from a logistic, log-binomial, or modified Poisson regression model

baseline_risk

proportion of cases in the non-exposed group

small_margin_prop

smallest margin proportion of cases/events in the underlying 2x2 table

n_exp

number of participants in the exposed group

n_nexp

number of participants in the non-exposed group

n_cases

number of cases/events across exposed/non-exposed groups

n_controls

number of controls/no-event across exposed/non-exposed groups

n_sample

total number of participants in the sample

or_to_rr

formula used to convert the or value into a risk ratio (see details).

or_to_cor

formula used to convert the or value into a correlation coefficient (see details).

rr_to_or

formula used to convert the rr value into an odds ratio (see details).

reverse_logreg_t

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function derives the standard error of the log odds ratio (or log risk ratio) from a Wald t-statistic reported in a regression model.

To estimate the standard error of the log OR (or log RR), the formulas used are:

t = \frac{\beta}{SE(\beta)}

SE(\beta) = \frac{|\beta|}{|t|}

where \beta is \log(OR) or \log(RR) depending on the model.

Then, if an OR (or logOR) is entered, calculations of es_from_or_se() are applied. If a RR (or logRR) is entered, calculations of es_from_rr_se() are applied.

Note that the standardized-mean-difference and correlation conversions (D, G, R, Z) are produced for OR inputs only. RR inputs are treated as a ratio measure and yield RR + OR + NNT + RD: RR is not converted to a standardized mean difference or correlation, because that would require going through the OR and the baseline risk (see es_from_rr_se). To obtain a SMD or correlation from an RR, convert it to an OR first (supplying the baseline risk) and then use the OR path.

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR + RR
converted effect size measure OR inputs: D + G + R + Z (+ RR + NNT + RD); RR inputs: OR + NNT + RD

References

Sanchez-Meca, J., Marin-Martinez, F., & Chacon-Moscoso, S. (2003). Effect-size indices for dichotomized outcomes in meta-analysis. Psychological Methods, 8(4), 448–467.

Examples

es_or <- es_from_logreg_t(
  or = 2.12, logreg_t = 3.21,
  n_cases = 50, n_controls = 150
)

es_rr <- es_from_logreg_t(
  rr = 1.5, logreg_t = 2.8,
  n_exp = 100, n_nexp = 100
)

Convert a mean difference between two independent groups and 95% CI into several effect size measures

Description

Convert a mean difference between two independent groups and 95% CI into several effect size measures

Usage

es_from_md_ci(
  md,
  md_ci_lo,
  md_ci_up,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  max_asymmetry = 10,
  reverse_md
)

Arguments

md

mean difference between two independent groups

md_ci_lo

lower bound of the 95% CI of the mean difference

md_ci_up

upper bound of the 95% CI of the mean difference

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer").

max_asymmetry

A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

reverse_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts 95% CI of a mean difference into a standard error (Cochrane Handbook section 6.5.2.3):

md\_se = \frac{md\_ci\_up - md\_ci\_lo}{2 * qt(0.975, df = n\_exp + n\_nexp - 2)}

Calculations of the es_from_md_se() function are then used to estimate the Cohen's d and other effect size measures.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 10. Mean difference and dispersion (crude)'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_md_ci(md = 4, md_ci_lo = 2, md_ci_up = 6, n_exp = 20, n_nexp = 22)

Convert a mean difference between two independent groups and its p-value into several effect size measures

Description

Convert a mean difference between two independent groups and its p-value into several effect size measures

Usage

es_from_md_pval(
  md,
  md_pval,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_md
)

Arguments

md

mean difference between two independent groups

md_pval

p-value of the mean difference

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer").

reverse_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the p-value of a mean difference into a standard error (Cochrane Handbook section 6.5.2.3):

t = qt(\frac{md\_pval}{2}, df = n\_exp + n\_nexp - 2)

md\_se = |\frac{md}{t}|

Calculations of the es_from_md_se function are then used to estimate the Cohen's d and other effect size measures.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 10. Mean difference and dispersion (crude)'
https://metaconvert.org/input.html

References

Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_md_pval(md = 4, md_pval = 0.024, n_exp = 20, n_nexp = 22)

Convert a mean difference between two independent groups and standard deviation into several effect size measures

Description

Convert a mean difference between two independent groups and standard deviation into several effect size measures

Usage

es_from_md_sd(
  md,
  md_sd,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_md
)

Arguments

md

mean difference between two independent groups

md_sd

standard deviation of the mean difference

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean difference and 95% CI into a Cohen's d (D) and Hedges' g (G). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

The formula used to obtain the Cohen's d is:

d = \frac{md}{md\_sd}

Note that this formula is perfectly accurate only if the md_sd has been estimated by assuming that the variance of the two groups is equal.

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 10. Mean difference and dispersion (crude)'
https://metaconvert.org/input.html

Examples

es_from_md_sd(md = 4, md_sd = 2, n_exp = 20, n_nexp = 22)

Convert a mean difference between two independent groups and its standard error into several effect size measures

Description

Convert a mean difference between two independent groups and its standard error into several effect size measures

Usage

es_from_md_se(
  md,
  md_se,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_md
)

Arguments

md

mean difference between two independent groups

md_se

standard error of the mean difference

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer").

reverse_md

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function the standard error of a mean difference into a standard deviation:

inv\_n = \frac{1}{n\_exp} + \frac{1}{n\_nexp}

md\_sd = \frac{md\_se}{\sqrt{inv\_n}}

Calculations of the es_from_md_sd function are then used to estimate the Cohen's d and other effect size measures.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 10. Mean difference and dispersion (crude)'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_md_se(md = 4, md_se = 2, n_exp = 20, n_nexp = 22)

Convert mean changes and 95% CI of two independent groups into standard effect size measures

Description

Convert mean changes and 95% CI of two independent groups into standard effect size measures

Usage

es_from_mean_change_ci(
  mean_change_exp,
  mean_change_ci_lo_exp,
  mean_change_ci_up_exp,
  mean_change_nexp,
  mean_change_ci_lo_nexp,
  mean_change_ci_up_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  n_exp,
  n_nexp,
  max_asymmetry = 10,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  pool_sd = FALSE,
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the experimental/exposed group.

mean_change_ci_lo_exp

lower bound of the 95% CI around the mean change of the experimental/exposed group.

mean_change_ci_up_exp

upper bound of the 95% CI around the mean change of the experimental/exposed group.

mean_change_nexp

mean change of participants in the non-experimental/non-exposed group.

mean_change_ci_lo_nexp

lower bound of the 95% CI around the mean change of the non-experimental/non-exposed group.

mean_change_ci_up_nexp

upper bound of the 95% CI around the mean change of the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group (only used with pre_post_to_smd = "morris_drm", see details).

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group (only used with pre_post_to_smd = "morris_drm", see details).

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

max_asymmetry

A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("morris_drm" or "morris_dz", see details).

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean change and 95% CI of two independent groups into a Cohen's d. The Cohen's d is then converted to other effect size measures.

This function simply internally calls the es_from_means_ci_pre_post function but setting:

mean\_pre\_exp = 0

mean\_pre\_ci\_lo\_exp = 0

mean\_pre\_ci\_up\_exp = 0

mean\_exp = mean\_change\_exp

mean\_ci\_lo\_exp = mean\_change\_ci\_lo\_exp

mean\_ci\_up\_exp = mean\_change\_ci\_up\_exp

mean\_pre\_nexp = 0

mean\_pre\_ci\_lo\_nexp = 0

mean\_pre\_ci\_up\_nexp = 0

mean\_nexp = mean\_change\_nexp

mean\_ci\_lo\_nexp = mean\_change\_ci\_lo\_nexp

mean\_ci\_up\_nexp = mean\_change\_ci\_up\_nexp

To know more about the calculations, see es_from_means_sd_pre_post function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386. https://doi.org/10.1177/1094428106291059

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_mean_change_ci(
  n_exp = 36, n_nexp = 35,
  mean_change_exp = 8.4,
  mean_change_ci_lo_exp = 6.4, mean_change_ci_up_exp = 10.4,
  mean_change_nexp = 2.43,
  mean_change_ci_lo_nexp = 1.43, mean_change_ci_up_nexp = 3.43,
  r_pre_post_exp = 0.2, r_pre_post_nexp = 0.2
)

Convert mean change and 95% CI of a single group into standard effect size measures

Description

Convert mean change and 95% CI of a single group into standard effect size measures

Usage

es_from_mean_change_ci_single_group(
  mean_change_exp,
  mean_change_ci_lo_exp,
  mean_change_ci_up_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  max_asymmetry = 10,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the group.

mean_change_ci_lo_exp

lower bound of the 95% CI around the mean change.

mean_change_ci_up_exp

upper bound of the 95% CI around the mean change.

n_exp

number of participants in the group.

r_pre_post_exp

pre-post correlation within the group

max_asymmetry

percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("cooper" by default; "morris_dz" also accepted, see details).

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean change and 95% CI of a single group into within-group Cohen's d, Hedges' g, and mean difference. The effect sizes are then converted to other measures.

The effect size (d_rm) depends linearly on the pre-post correlation (0.8 assumed when r_pre_post_exp is missing); see es_from_mean_change_sd_single_group.

This function simply internally calls the es_from_means_ci_pre_post_single_group function but setting:

mean\_pre\_exp = 0

mean\_pre\_ci\_lo\_exp = 0

mean\_pre\_ci\_up\_exp = 0

mean\_exp = mean\_change\_exp

mean\_ci\_lo\_exp = mean\_change\_ci\_lo\_exp

mean\_ci\_up\_exp = mean\_change\_ci\_up\_exp

To know more about the calculations, see es_from_means_sd_pre_post_single_group function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_mean_change_ci_single_group(
  n_exp = 36,
  mean_change_exp = 8.4,
  mean_change_ci_lo_exp = 6.4, mean_change_ci_up_exp = 10.4,
  r_pre_post_exp = 0.2
)

Convert mean changes and p-values of two independent groups into standard effect size measures

Description

Convert mean changes and p-values of two independent groups into standard effect size measures

Usage

es_from_mean_change_pval(
  mean_change_exp,
  mean_change_pval_exp,
  mean_change_nexp,
  mean_change_pval_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  pool_sd = FALSE,
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the experimental/exposed group.

mean_change_pval_exp

p-value of the mean change for participants in the experimental/exposed group.

mean_change_nexp

mean change of participants in the non-experimental/non-exposed group.

mean_change_pval_nexp

p-value of the mean change for participants in the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group (only used with pre_post_to_smd = "morris_drm", see details).

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group (only used with pre_post_to_smd = "morris_drm", see details).

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("morris_drm" or "morris_dz", see details).

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean change and associated p-values of two independent groups into a Cohen's d. The Cohen's d is then converted to other effect size measures.

To start, this function estimates the mean change standard errors from the p-values:

t\_exp <- qt(p = mean\_change\_pval\_exp / 2, df = n\_exp - 1, lower.tail = FALSE)

t\_nexp <- qt(p = mean\_change\_pval\_nexp / 2, df = n\_nexp - 1, lower.tail = FALSE)

mean\_change\_se\_exp <- |\frac{mean\_change\_exp}{t\_exp}|

mean\_change\_se\_nexp <- |\frac{mean\_change\_nexp}{t\_nexp}|

Then, this function simply internally calls the es_from_means_se_pre_post function but setting:

mean\_pre\_exp = 0

mean\_pre\_se\_exp = 0

mean\_exp = mean\_change\_exp

mean\_se\_exp = mean\_change\_se\_exp

mean\_pre\_nexp = 0

mean\_pre\_se\_nexp = 0

mean\_nexp = mean\_change\_nexp

mean\_se\_nexp = mean\_change\_se\_nexp

To know more about other calculations, see es_from_means_sd_pre_post function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386. https://doi.org/10.1177/1094428106291059

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_mean_change_pval(
  n_exp = 36, n_nexp = 35,
  mean_change_exp = 8.4, mean_change_pval_exp = 0.13,
  mean_change_nexp = 2.43, mean_change_pval_nexp = 0.61,
  r_pre_post_exp = 0.8, r_pre_post_nexp = 0.8
)

Convert mean change and p-value of a single group into standard effect size measures

Description

Convert mean change and p-value of a single group into standard effect size measures

Usage

es_from_mean_change_pval_single_group(
  mean_change_exp,
  mean_change_pval_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the group.

mean_change_pval_exp

p-value of the mean change for participants in the group.

n_exp

number of participants in the group.

r_pre_post_exp

pre-post correlation within the group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("cooper" by default; "morris_dz" also accepted, see details).

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean change and associated p-value of a single group into within-group Cohen's d, Hedges' g, and mean difference. The effect sizes are then converted to other measures.

The effect size (d_rm) depends linearly on the pre-post correlation (0.8 assumed when r_pre_post_exp is missing); see es_from_mean_change_sd_single_group.

To start, this function estimates the mean change standard error from the p-value:

t <- qt(p = mean\_change\_pval\_exp / 2, df = n\_exp - 1, lower.tail = FALSE)

mean\_change\_se\_exp <- |\frac{mean\_change\_exp}{t}|

Then, this function simply internally calls the es_from_means_se_pre_post_single_group function but setting:

mean\_pre\_exp = 0

mean\_pre\_se\_exp = 0

mean\_exp = mean\_change\_exp

mean\_se\_exp = mean\_change\_se\_exp

To know more about other calculations, see es_from_means_sd_pre_post_single_group function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_mean_change_pval_single_group(
  n_exp = 36,
  mean_change_exp = 8.4, mean_change_pval_exp = 0.13,
  r_pre_post_exp = 0.8
)

Convert mean changes and standard deviations of two independent groups into standard effect size measures

Description

Convert mean changes and standard deviations of two independent groups into standard effect size measures

Usage

es_from_mean_change_sd(
  mean_change_exp,
  mean_change_sd_exp,
  mean_change_nexp,
  mean_change_sd_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  pool_sd = FALSE,
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the experimental/exposed group.

mean_change_sd_exp

standard deviation of the mean change (i.e., SD of the difference scores) for participants in the experimental/exposed group.

mean_change_nexp

mean change of participants in the non-experimental/non-exposed group.

mean_change_sd_nexp

standard deviation of the mean change for participants in the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group (only used with pre_post_to_smd = "morris_drm", see details).

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group (only used with pre_post_to_smd = "morris_drm", see details).

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("morris_drm" or "morris_dz", see details).

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function computes a Cohen's d (D) and Hedges' g (G) from the mean change and standard deviation of change scores of two independent groups. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from Cohen's d.

Two formulas can be used to obtain the SMD (Morris & DeShon, 2002):

d_{z} = \frac{mean\_change}{sd\_change}

d_{rm} = d_{z} \times \sqrt{2 \times (1 - r\_pre\_post)}

The 'morris_drm' formula (default, alias 'cooper') requires the pre-post correlation while 'morris_dz' does not. Note that d_rm and d_z are not expressed on the same scale and should not be combined in a same meta-analysis (Morris & DeShon, 2002). Under 'morris_drm', the resulting effect size directly depends on the r_pre_post value entered; if r is unknown, the 'morris_dz' formula can be used instead. The 'bonett' and 'morris_dav' formulas require separate pre/post SDs and are thus not available for mean change data.

This function simply internally calls the es_from_means_sd_pre_post function but setting:

mean\_pre\_exp = 0

mean\_pre\_sd\_exp = 0

mean\_exp = mean\_change\_exp

mean\_sd\_exp = mean\_change\_sd\_exp

mean\_pre\_nexp = 0

mean\_pre\_sd\_nexp = 0

mean\_nexp = mean\_change\_nexp

mean\_sd\_nexp = mean\_change\_sd\_nexp

To know more about the calculations, see es_from_means_sd_pre_post function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386. https://doi.org/10.1177/1094428106291059

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_mean_change_sd(
  n_exp = 36, n_nexp = 35,
  mean_change_exp = 8.4, mean_change_sd_exp = 9.13,
  mean_change_nexp = 2.43, mean_change_sd_nexp = 6.61,
  r_pre_post_exp = 0.2, r_pre_post_nexp = 0.2
)

Convert mean change and standard deviation of a single group into standard effect size measures

Description

Convert mean change and standard deviation of a single group into standard effect size measures

Usage

es_from_mean_change_sd_single_group(
  mean_change_exp,
  mean_change_sd_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the group.

mean_change_sd_exp

standard deviation of the mean change for participants in the group.

n_exp

number of participants in the group.

r_pre_post_exp

pre-post correlation within the group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("cooper" by default; "morris_dz" also accepted, see details).

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function computes within-group Cohen's d (dw), Hedges' g (gw), and mean difference (mdw) from the mean change (MC) and standard deviation of a single group. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from Cohen's d.

The effect size (d_rm) depends linearly on the pre-post correlation:

d\_rm = (mean\_change\_exp / sd\_change) \times \sqrt{2 \times (1 - r\_pre\_post\_exp)}

If r_pre_post_exp is not provided, a value of 0.8 is assumed. A misspecified correlation biases the point estimate, not only its precision; when the correlation is not reported, a sensitivity analysis using several plausible values (e.g., 0.3, 0.5, 0.7) is advisable.

This function simply internally calls the es_from_means_sd_pre_post_single_group function but setting:

mean\_pre\_exp = 0

mean\_pre\_sd\_exp = 0

mean\_exp = mean\_change\_exp

mean\_sd\_exp = mean\_change\_sd\_exp

To know more about the calculations, see es_from_means_sd_pre_post_single_group function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_mean_change_sd_single_group(
  n_exp = 36,
  mean_change_exp = 8.4, mean_change_sd_exp = 9.13,
  r_pre_post_exp = 0.2
)

Convert mean changes and standard errors of two independent groups into standard effect size measures

Description

Convert mean changes and standard errors of two independent groups into standard effect size measures

Usage

es_from_mean_change_se(
  mean_change_exp,
  mean_change_se_exp,
  mean_change_nexp,
  mean_change_se_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  pool_sd = FALSE,
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the experimental/exposed group.

mean_change_se_exp

standard error of the mean change for participants in the experimental/exposed group.

mean_change_nexp

mean change of participants in the non-experimental/non-exposed group.

mean_change_se_nexp

standard error of the mean change for participants in the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group (only used with pre_post_to_smd = "morris_drm", see details).

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group (only used with pre_post_to_smd = "morris_drm", see details).

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("morris_drm" or "morris_dz", see details).

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean change and standard errors of two independent groups into a Cohen's d. The Cohen's d is then converted to other effect size measures.

This function simply internally calls the es_from_means_se_pre_post function but setting:

mean\_pre\_exp = 0

mean\_pre\_se\_exp = 0

mean\_exp = mean\_change\_exp

mean\_se\_exp = mean\_change\_se\_exp

mean\_pre\_nexp = 0

mean\_pre\_se\_nexp = 0

mean\_nexp = mean\_change\_nexp

mean\_se\_nexp = mean\_change\_se\_nexp

To know more about the calculations, see es_from_means_se_pre_post function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386. https://doi.org/10.1177/1094428106291059

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_mean_change_se(
  n_exp = 36, n_nexp = 35,
  mean_change_exp = 8.4, mean_change_se_exp = 9.13,
  mean_change_nexp = 2.43, mean_change_se_nexp = 6.61,
  r_pre_post_exp = 0.2, r_pre_post_nexp = 0.2
)

Convert mean change and standard error of a single group into standard effect size measures

Description

Convert mean change and standard error of a single group into standard effect size measures

Usage

es_from_mean_change_se_single_group(
  mean_change_exp,
  mean_change_se_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_mean_change
)

Arguments

mean_change_exp

mean change of participants in the group.

mean_change_se_exp

standard error of the mean change for participants in the group.

n_exp

number of participants in the group.

r_pre_post_exp

pre-post correlation within the group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the mean change into a SMD ("cooper" by default; "morris_dz" also accepted, see details).

reverse_mean_change

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the mean change and standard error of a single group into within-group Cohen's d, Hedges' g, and mean difference. The effect sizes are then converted to other measures.

The effect size (d_rm) depends linearly on the pre-post correlation (0.8 assumed when r_pre_post_exp is missing); see es_from_mean_change_sd_single_group.

This function simply internally calls the es_from_means_se_pre_post_single_group function but setting:

mean\_pre\_exp = 0

mean\_pre\_se\_exp = 0

mean\_exp = mean\_change\_exp

mean\_se\_exp = mean\_change\_se\_exp

To know more about the calculations, see es_from_means_se_pre_post_single_group function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 14. Paired: mean change, and dispersion'
https://metaconvert.org/input.html

References

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_mean_change_se_single_group(
  n_exp = 36,
  mean_change_exp = 8.4, mean_change_se_exp = 1.52,
  r_pre_post_exp = 0.2
)

Convert means and 95% CI of two independent groups several effect size measures

Description

Convert means and 95% CI of two independent groups several effect size measures

Usage

es_from_means_ci(
  mean_exp,
  mean_ci_lo_exp,
  mean_ci_up_exp,
  mean_nexp,
  mean_ci_lo_nexp,
  mean_ci_up_nexp,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  smd_denom = "pooled",
  max_asymmetry = 10,
  reverse_means
)

Arguments

mean_exp

mean of participants in the experimental/exposed group.

mean_ci_lo_exp

lower bound of the 95% CI of the mean of the experimental/exposed group

mean_ci_up_exp

upper bound of the 95% CI of the mean of the experimental/exposed group

mean_nexp

mean of participants in the non-experimental/non-exposed group.

mean_ci_lo_nexp

lower bound of the 95% CI of the mean of the non-experimental/non-exposed group.

mean_ci_up_nexp

upper bound of the 95% CI of the mean of the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

smd_denom

standardizer for the standardized mean difference. "pooled" (default) uses the pooled endpoint SD (Cohen's d / Hedges' g); "glass" (alias "control") uses the control (non-experimental) endpoint SD (Glass's delta); "glass_robust" (alias "control_robust") is Glass's delta with a heteroscedasticity-consistent sampling variance.

max_asymmetry

A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

reverse_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the 95% CI of two independent groups into a standard error, and then relies on the calculations of the es_from_means_se() function.

To convert the 95% CIs into standard errors, the following formula is used (table 12.3 in Cooper):

mean\_se\_exp = \frac{mean\_ci\_up\_exp - mean\_ci\_lo\_exp}{2 * qt{(0.975, df = n\_exp - 1)}}

mean\_se\_nexp = \frac{mean\_ci\_up\_nexp - mean\_ci\_lo\_nexp}{2 * qt{(0.975, df = n\_nexp - 1)}}

Calculations of the es_from_means_se() are then applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 9. Means and dispersion (crude)'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_means_ci(
  n_exp = 55, n_nexp = 55,
  mean_exp = 25, mean_ci_lo_exp = 15, mean_ci_up_exp = 35,
  mean_nexp = 18, mean_ci_lo_nexp = 12, mean_ci_up_nexp = 24
)

Convert pre-post means of two independent groups into various effect size measures

Description

Convert pre-post means of two independent groups into various effect size measures

Usage

es_from_means_ci_pre_post(
  mean_pre_exp,
  mean_exp,
  mean_pre_ci_lo_exp,
  mean_pre_ci_up_exp,
  mean_ci_lo_exp,
  mean_ci_up_exp,
  mean_pre_nexp,
  mean_nexp,
  mean_pre_ci_lo_nexp,
  mean_pre_ci_up_nexp,
  mean_ci_lo_nexp,
  mean_ci_up_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "bonett",
  max_asymmetry = 10,
  pool_sd = FALSE,
  reverse_means_pre_post
)

Arguments

mean_pre_exp

mean of the experimental/exposed group at baseline

mean_exp

mean of the experimental/exposed group at follow up

mean_pre_ci_lo_exp

lower bound of the 95% CI of the mean of the experimental/exposed group at baseline

mean_pre_ci_up_exp

upper bound of the 95% CI of the mean of the experimental/exposed group at baseline

mean_ci_lo_exp

lower bound of the 95% CI of the mean of the experimental/exposed group at follow up

mean_ci_up_exp

upper bound of the 95% CI of the mean of the experimental/exposed group at follow up

mean_pre_nexp

mean of the non-experimental/non-exposed group at baseline

mean_nexp

mean of the non-experimental/non-exposed group at follow up

mean_pre_ci_lo_nexp

lower bound of the 95% CI of the mean of the non-experimental/non-exposed group at baseline

mean_pre_ci_up_nexp

upper bound of the 95% CI of the mean of the non-experimental/non-exposed group at baseline

mean_ci_lo_nexp

lower bound of the 95% CI of the mean of the non-experimental/non-exposed group at follow up

mean_ci_up_nexp

upper bound of the 95% CI of the mean of the non-experimental/non-exposed group at follow up

n_exp

number of the experimental/exposed group

n_nexp

number of the non-experimental/non-exposed group

r_pre_post_exp

pre-post correlation in the experimental/exposed group

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the pre and post means/SD into a SMD (see details).

max_asymmetry

A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

reverse_means_pre_post

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the bounds of the 95% CI of the pre/post means of two independent groups into standard errors (Section 6.3.1 in the Cochrane Handbook).

mean\_pre\_se\_exp = \frac{mean\_pre\_ci\_up\_exp - mean\_pre\_ci\_lo\_exp}{2 * qt{(0.975, df = n\_exp - 1)}}

mean\_pre\_se\_nexp = \frac{mean\_pre\_ci\_up\_nexp - mean\_pre\_ci\_lo\_nexp}{2 * qt{(0.975, df = n\_nexp - 1)}}

mean\_se\_exp = \frac{mean\_ci\_up\_exp - mean\_ci\_lo\_exp}{2 * qt{(0.975, df = n\_exp - 1)}}

mean\_se\_nexp = \frac{mean\_ci\_up\_nexp - mean\_ci\_lo\_nexp}{2 * qt{(0.975, df = n\_nexp - 1)}}

Then, calculations of the es_from_means_se_pre_post are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 15. Paired: pre-post means and dispersion'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_means_ci_pre_post(
  n_exp = 36, n_nexp = 35,
  mean_pre_exp = 98,
  mean_pre_ci_lo_exp = 88,
  mean_pre_ci_up_exp = 108,
  mean_exp = 102,
  mean_ci_lo_exp = 92,
  mean_ci_up_exp = 112,
  mean_pre_nexp = 96,
  mean_pre_ci_lo_nexp = 86,
  mean_pre_ci_up_nexp = 106,
  mean_nexp = 102,
  mean_ci_lo_nexp = 92,
  mean_ci_up_nexp = 112,
  r_pre_post_exp = 0.8, r_pre_post_nexp = 0.8
)

Convert pre-post means and 95% CI of a single group into standard effect size measures

Description

Convert pre-post means and 95% CI of a single group into standard effect size measures

Usage

es_from_means_ci_pre_post_single_group(
  mean_pre_exp,
  mean_exp,
  mean_pre_ci_lo_exp,
  mean_pre_ci_up_exp,
  mean_ci_lo_exp,
  mean_ci_up_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  pre_post_to_smd = "bonett",
  smd_to_cor = "viechtbauer",
  max_asymmetry = 10,
  reverse_means_pre_post
)

Arguments

mean_pre_exp

mean of the group at baseline

mean_exp

mean of the group at follow up

mean_pre_ci_lo_exp

lower bound of the 95% CI of the mean at baseline

mean_pre_ci_up_exp

upper bound of the 95% CI of the mean at baseline

mean_ci_lo_exp

lower bound of the 95% CI of the mean at follow up

mean_ci_up_exp

upper bound of the 95% CI of the mean at follow up

n_exp

number of participants in the group

r_pre_post_exp

pre-post correlation within the group

pre_post_to_smd

formula used to convert the pre and post means/SD into a SMD (see details).

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

max_asymmetry

percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

reverse_means_pre_post

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the bounds of the 95% CI of the pre/post means of a single group into standard errors (Section 6.3.1 in the Cochrane Handbook).

mean\_pre\_se\_exp = \frac{mean\_pre\_ci\_up\_exp - mean\_pre\_ci\_lo\_exp}{2 * qt{(0.975, df = n\_exp - 1)}}

mean\_post\_se\_exp = \frac{mean\_post\_ci\_up\_exp - mean\_post\_ci\_lo\_exp}{2 * qt{(0.975, df = n\_exp - 1)}}

Then, calculations of the es_from_means_se_pre_post_single_group() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 15. Paired: pre-post means and dispersion'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022.

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_means_ci_pre_post_single_group(
  n_exp = 36,
  mean_pre_exp = 98,
  mean_pre_ci_lo_exp = 88, mean_pre_ci_up_exp = 108,
  mean_exp = 102,
  mean_ci_lo_exp = 92, mean_ci_up_exp = 112,
  r_pre_post_exp = 0.8
)

Convert means and standard deviations of two independent groups into several effect size measures

Description

Convert means and standard deviations of two independent groups into several effect size measures

Usage

es_from_means_sd(
  mean_exp,
  mean_sd_exp,
  mean_nexp,
  mean_sd_nexp,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  smd_denom = "pooled",
  reverse_means
)

Arguments

mean_exp

mean of participants in the experimental/exposed group.

mean_sd_exp

standard deviation of participants in the experimental/exposed group.

mean_nexp

mean of participants in the non-experimental/non-exposed group.

mean_sd_nexp

standard deviation of participants in the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the generated cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

smd_denom

standardizer for the standardized mean difference. "pooled" (default) uses the pooled endpoint SD (Cohen's d / Hedges' g); "glass" (alias "control") uses the control (non-experimental) endpoint SD (Glass's delta); "glass_robust" (alias "control_robust") is Glass's delta with a heteroscedasticity-consistent sampling variance.

reverse_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function first computes a Cohen's d (D), Hedges' g (G) and mean difference (MD) from the means and standard deviations of two independent groups. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate a mean difference (formulas 12.1-12.6 in Cooper):

md = mean\_exp - mean\_nexp

md\_se = \sqrt{\frac{mean\_sd\_exp^2}{n\_exp} + \frac{mean\_sd\_nexp^2}{n\_nexp}}

The confidence interval uses the unequal-variance (Welch-Satterthwaite) degrees of freedom that match this standard error (as in stats::t.test(var.equal = FALSE)):

df = \frac{(s_e^2/n\_exp + s_n^2/n\_nexp)^2}{(s_e^2/n\_exp)^2/(n\_exp - 1) + (s_n^2/n\_nexp)^2/(n\_nexp - 1)}

md\_ci\_lo = md - md\_se * qt(.975, df)

md\_ci\_up = md + md\_se * qt(.975, df)

To estimate a Cohen's d the following formulas are used (formulas 12.10-12.18 in Cooper):

mean\_sd\_pooled = \sqrt{\frac{(n\_exp - 1) * sd\_exp^2 + (n\_nexp - 1) * sd\_nexp^2}{n\_exp+n\_nexp-2}}

cohen\_d = \frac{mean\_exp - mean\_nexp}{mean\_sd\_pooled}

cohen\_d\_se = \sqrt{\frac{(n\_exp+n\_nexp)}{n\_exp*n\_nexp} + \frac{cohen\_d^2}{2(n\_exp+n\_nexp)}}

cohen\_d\_ci\_lo = cohen\_d - cohen\_d\_se * qt(.975, df = n\_exp + n\_nexp - 2)

cohen\_d\_ci\_up = cohen\_d + cohen\_d\_se * qt(.975, df = n\_exp + n\_nexp - 2)

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 9. Means and dispersion (crude)'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_means_sd(
  n_exp = 55, n_nexp = 55,
  mean_exp = 2.3, mean_sd_exp = 1.2,
  mean_nexp = 1.9, mean_sd_nexp = 0.9
)

Convert means of two groups and the pooled standard deviation into several effect size measures

Description

Convert means of two groups and the pooled standard deviation into several effect size measures

Usage

es_from_means_sd_pooled(
  mean_exp,
  mean_nexp,
  mean_sd_pooled,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_means
)

Arguments

mean_exp

mean of participants in the experimental/exposed group.

mean_nexp

mean of participants in the non-experimental/non-exposed group.

mean_sd_pooled

pooled standard deviation across both groups.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function first computes a Cohen's d (D), Hedges' g (G) and mean difference (MD) from the means of two independent groups and the pooled standard deviation across the groups. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate a mean difference (formulas 12.1-12.6 in Cooper):

md = mean\_exp - mean\_nexp

md\_se = \sqrt{\frac{n_exp+n_nexp}{n_exp*n_nexp} * mean_sd_pooled^2}

md\_ci\_lo = md - md\_se * qt(.975, df = n\_exp + n\_nexp - 2)

md\_ci\_up = md + md\_se * qt(.975, df = n\_exp + n\_nexp - 2)

To estimate a Cohen's d the following formulas are used (formulas 12.10-12.18 in Cooper):

cohen\_d = \frac{mean\_exp - mean\_nexp}{means\_sd\_pooled}

cohen\_d\_se = \sqrt{\frac{(n\_exp+n\_nexp)}{n\_exp*n\_nexp} + \frac{cohen\_d^2}{2(n\_exp+n\_nexp)}}

cohen\_d\_ci\_lo = cohen\_d - cohen\_d\_se * qt(.975, df = n\_exp + n\_nexp - 2)

cohen\_d\_ci\_up = cohen\_d + cohen\_d\_se * qt(.975, df = n\_exp + n\_nexp - 2)

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 9. Means and dispersion (crude)'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_means_sd_pooled(
  n_exp = 55, n_nexp = 55,
  mean_exp = 2.3, mean_nexp = 1.9,
  mean_sd_pooled = 0.9
)

Convert pre-post means of two independent groups into various effect size measures

Description

Convert pre-post means of two independent groups into various effect size measures

Usage

es_from_means_sd_pre_post(
  mean_pre_exp,
  mean_exp,
  mean_pre_sd_exp,
  mean_sd_exp,
  mean_pre_nexp,
  mean_nexp,
  mean_pre_sd_nexp,
  mean_sd_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "bonett",
  pool_sd = FALSE,
  reverse_means_pre_post
)

Arguments

mean_pre_exp

mean of the experimental/exposed group at baseline

mean_exp

mean of the experimental/exposed group at follow up

mean_pre_sd_exp

standard deviation of the experimental/exposed group at baseline

mean_sd_exp

standard deviation of the experimental/exposed group at follow up

mean_pre_nexp

mean of the non-experimental/non-exposed group at baseline

mean_nexp

mean of the non-experimental/non-exposed group at follow up

mean_pre_sd_nexp

standard deviation of the non-experimental/non-exposed group at baseline

mean_sd_nexp

standard deviation of the non-experimental/non-exposed group at follow up

n_exp

number of the experimental/exposed group

n_nexp

number of the non-experimental/non-exposed group

r_pre_post_exp

pre-post correlation in the experimental/exposed group

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the pre and post means/SD into a SMD (see details).

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

reverse_means_pre_post

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts pre-post means of two independent groups into a Cohen's d (D) and Hedges' g (G). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

Four approaches can be used to compute the Cohen's d.

In these approaches, the standard deviation of the difference within each group first needs to be obtained:

adj\_exp = 2*r\_pre\_post\_exp*mean\_pre\_sd\_exp*mean\_sd\_exp

sd\_change\_exp = \sqrt{mean\_pre\_sd\_exp^2 + mean\_sd\_exp^2 - adj\_exp}

adj\_nexp = 2*r\_pre\_post\_nexp*mean\_pre\_sd\_nexp*mean\_sd\_nexp

sd\_change\_nexp = \sqrt{mean\_pre\_sd\_nexp^2 + mean\_sd\_nexp^2 - adj\_nexp}

  1. In the approach described by Bonett (pre_post_to_smd = "bonett"), one Cohen's d per group is obtained by standardizing the pre-post mean difference by the standard deviation at baseline (Bonett, 2008):

    cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{mean\_pre\_sd\_exp}

    cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{mean\_pre\_sd\_nexp}

  2. In the approach described by Cooper (pre_post_to_smd = "cooper" or "morris_drm"), the following formulas are used (Cooper et al., 2019; Morris & DeShon, 2002):

    cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{sd\_change\_exp} * \sqrt{2 * (1 - r\_pre\_post\_exp)}

    cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{sd\_change\_nexp} * \sqrt{2 * (1 - r\_pre\_post\_nexp)}

  3. In the approach described by Morris & DeShon (pre_post_to_smd = "morris_dz"), the pre-post mean difference is standardized by the standard deviation of the change (Morris & DeShon, 2002):

    cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{sd\_change\_exp}

    cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{sd\_change\_nexp}

  4. In the approach described by Morris (pre_post_to_smd = "morris_dav"), the pre-post mean difference is standardized by the average of the baseline and follow up SDs (Morris, 2008). Note that Morris (2008, p.384) recommended against this standardizer because its sampling variance was unknown to him; the variance used here is the heteroscedasticity-robust form of Bonett (2008, eq. 10/19):

    cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{\sqrt{(mean\_pre\_sd\_exp^2 + mean\_sd\_exp^2)/2}}

    cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{\sqrt{(mean\_pre\_sd\_nexp^2 + mean\_sd\_nexp^2)/2}}

Last, the Cohen's d reflecting the within-group change from baseline to follow-up are combined into one Cohen's d:

cohen\_d = d\_exp - d\_nexp

cohen\_d\_se = \sqrt{cohen\_d\_se\_exp^2 + cohen\_d\_se\_nexp^2}

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 15. Paired: pre-post means and dispersion'
https://metaconvert.org/input.html

References

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386. https://doi.org/10.1177/1094428106291059

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_means_sd_pre_post(
  n_exp = 36, n_nexp = 35,
  mean_pre_exp = 98, mean_exp = 102,
  mean_pre_sd_exp = 16, mean_sd_exp = 17,
  mean_pre_nexp = 96, mean_nexp = 102,
  mean_pre_sd_nexp = 14, mean_sd_nexp = 15,
  r_pre_post_exp = 0.8, r_pre_post_nexp = 0.8
)

Convert pre-post means of a single group into standard effect size measures

Description

Convert pre-post means of a single group into standard effect size measures

Usage

es_from_means_sd_pre_post_single_group(
  mean_pre_exp,
  mean_exp,
  mean_pre_sd_exp,
  mean_sd_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  pre_post_to_smd = "bonett",
  smd_to_cor = "viechtbauer",
  reverse_means_pre_post
)

Arguments

mean_pre_exp

mean of the group at baseline

mean_exp

mean of the group at follow up

mean_pre_sd_exp

standard deviation of the group at baseline

mean_sd_exp

standard deviation of the group at follow up

n_exp

number of participants in the group

r_pre_post_exp

pre-post correlation within the group

pre_post_to_smd

formula used to convert the pre and post means/SD into a SMD (see details).

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

reverse_means_pre_post

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts pre-post means of a single group into within-group Cohen's d (dw), Hedges' g (gw), and mean difference (mdw). These within-group effect sizes quantify the standardized change from baseline to follow-up within one group. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from Cohen's d.

Four formulas can be used to convert the pre/post means into a SMD (pre_post_to_smd argument):

  1. "bonett": baseline SD standardizer (Bonett, 2008; equivalent to the SMCRH measure in metafor)

    d\_w = \frac{mean\_post\_exp - mean\_pre\_exp}{mean\_pre\_sd\_exp}

    var(g\_w) = \frac{sd\_change^2}{sd\_pre^2(n-1)} + \frac{g\_w^2}{2(n-1)}

    where

    sd\_change = \sqrt{sd\_pre^2 + sd\_post^2 - 2r\,sd\_pre\,sd\_post}

  2. "cooper" (alias: "morris_drm"): raw score standardizer (Cooper 2019, Morris & DeShon 2002)

    d\_rm = \frac{mean\_post\_exp - mean\_pre\_exp}{sd\_change} * \sqrt{2 * (1 - r\_pre\_post\_exp)}

    var(d\_rm) = \frac{2 * (1 - r\_pre\_post\_exp)}{n\_exp} + \frac{d\_rm^2}{2 * n\_exp}

  3. "morris_dz": change score standardizer (Morris & DeShon, 2002; equivalent to the SMCC measure in metafor)

    d\_z = \frac{mean\_post\_exp - mean\_pre\_exp}{sd\_change}

    var(g\_z) = \frac{1}{n} + \frac{g\_z^2}{2n}

  4. "morris_dav": average SD standardizer (Bonett, 2008; equivalent to the SMCRP measure in metafor)

    d\_av = \frac{mean\_post\_exp - mean\_pre\_exp}{\sqrt{(mean\_pre\_sd\_exp^2 + mean\_post\_sd\_exp^2)/2}}

    g\_av = d\_av \times J(mi), \quad mi = \frac{2(n\_exp - 1)}{1 + r\_pre\_post\_exp^2}

    var(g\_av) = J^2 \left[\frac{2(1 - r)}{n} + \frac{d^2(1 + r^2)}{4n}\right]

The within-group Hedges' g is obtained by applying a bias correction factor J to d:

g\_w = d\_w * J(n\_exp-1)

The within-group mean difference is simply:

md\_w = mean\_post\_exp - mean\_pre\_exp

var(md\_w) = \frac{sd\_change^2}{n\_exp}

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied, treating the single group as a matched design.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 15. Paired: pre-post means and dispersion'
https://metaconvert.org/input.html

References

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386. https://doi.org/10.1177/1094428106291059

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_means_sd_pre_post_single_group(
  n_exp = 36,
  mean_pre_exp = 98, mean_exp = 102,
  mean_pre_sd_exp = 16, mean_sd_exp = 17,
  r_pre_post_exp = 0.8
)

Convert means and standard errors of two independent groups several effect size measures

Description

Convert means and standard errors of two independent groups several effect size measures

Usage

es_from_means_se(
  mean_exp,
  mean_se_exp,
  mean_nexp,
  mean_se_nexp,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  smd_denom = "pooled",
  reverse_means
)

Arguments

mean_exp

mean of participants in the experimental/exposed group.

mean_se_exp

standard error of participants in the experimental/exposed group.

mean_nexp

mean of participants in the non-experimental/non-exposed group.

mean_se_nexp

standard error of participants in the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

smd_denom

standardizer for the standardized mean difference. "pooled" (default) uses the pooled endpoint SD (Cohen's d / Hedges' g); "glass" (alias "control") uses the control (non-experimental) endpoint SD (Glass's delta); "glass_robust" (alias "control_robust") is Glass's delta with a heteroscedasticity-consistent sampling variance.

reverse_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the standard errors of two independent groups into standard deviations, and then relies on the calculations of the es_from_means_sd() function.

To convert the standard errors into standard deviations, the following formula is used.

mean\_sd\_exp = mean\_se\_exp * \sqrt{n\_exp}

mean\_sd\_nexp = mean\_se\_nexp * \sqrt{n\_nexp}

Then, calculations of the es_from_means_sd() are applied.

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 9. Means and dispersion (crude)'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_means_se(
  mean_exp = 42, mean_se_exp = 11,
  mean_nexp = 42, mean_se_nexp = 15,
  n_exp = 43, n_nexp = 34
)

Convert pre-post means of two independent groups into various effect size measures

Description

Convert pre-post means of two independent groups into various effect size measures

Usage

es_from_means_se_pre_post(
  mean_pre_exp,
  mean_exp,
  mean_pre_se_exp,
  mean_se_exp,
  mean_pre_nexp,
  mean_nexp,
  mean_pre_se_nexp,
  mean_se_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "bonett",
  pool_sd = FALSE,
  reverse_means_pre_post
)

Arguments

mean_pre_exp

mean of the experimental/exposed group at baseline

mean_exp

mean of the experimental/exposed group at follow up

mean_pre_se_exp

standard error of the experimental/exposed group at baseline

mean_se_exp

standard error of the experimental/exposed group at follow up

mean_pre_nexp

mean of the non-experimental/non-exposed group at baseline

mean_nexp

mean of the non-experimental/non-exposed group at follow up

mean_pre_se_nexp

standard error of the non-experimental/non-exposed group at baseline

mean_se_nexp

standard error of the non-experimental/non-exposed group at follow up

n_exp

number of the experimental/exposed group

n_nexp

number of the non-experimental/non-exposed group

r_pre_post_exp

pre-post correlation in the experimental/exposed group

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the pre and post means/SD into a SMD (see details).

pool_sd

a logical value indicating whether the standardizing SD should be pooled across the two groups (default FALSE). The two options target the same estimand when the arms' true SDs are equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on which to prefer, so this is a deliberate choice and not a technical detail.

  • FALSE (default): each arm's change is standardized by that arm's OWN SD and the two within-group values are subtracted, their variances adding because the arms are independent. This is Morris's (2008) d_{ppc1}, from Becker (1988). It makes no assumption that the arms' true SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more broadly applicable of the two.

  • TRUE: the difference in mean change is divided by a single SD pooled across arms. This is Morris's (2008) d_{ppc2} (his eq. 8-9), which he recommends: it is more efficient, but it assumes the two arms' true standardizing SDs are equal.

reverse_means_pre_post

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the pre/post standard errors of two independent groups into standard deviations (Section 6.5.2.2 in the Cochrane Handbook).

mean\_pre\_sd\_exp = mean\_pre\_se\_exp * \sqrt{n\_exp}

mean\_pre\_sd\_nexp = mean\_pre\_se\_nexp * \sqrt{n\_nexp}

mean\_sd\_exp = mean\_se\_exp * \sqrt{n\_exp}

mean\_sd\_nexp = mean\_se\_nexp * \sqrt{n\_nexp}

Then, calculations of the es_from_means_sd_pre_post() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 15. Paired: pre-post means and dispersion'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_means_sd_pre_post(
  n_exp = 36, n_nexp = 35,
  mean_pre_exp = 98, mean_exp = 102,
  mean_pre_sd_exp = 16, mean_sd_exp = 17,
  mean_pre_nexp = 96, mean_nexp = 102,
  mean_pre_sd_nexp = 14, mean_sd_nexp = 15,
  r_pre_post_exp = 0.8, r_pre_post_nexp = 0.8
)

Convert pre-post means and standard errors of a single group into standard effect size measures

Description

Convert pre-post means and standard errors of a single group into standard effect size measures

Usage

es_from_means_se_pre_post_single_group(
  mean_pre_exp,
  mean_exp,
  mean_pre_se_exp,
  mean_se_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  pre_post_to_smd = "bonett",
  smd_to_cor = "viechtbauer",
  reverse_means_pre_post
)

Arguments

mean_pre_exp

mean of the group at baseline

mean_exp

mean of the group at follow up

mean_pre_se_exp

standard error of the group at baseline

mean_se_exp

standard error of the group at follow up

n_exp

number of participants in the group

r_pre_post_exp

pre-post correlation within the group

pre_post_to_smd

formula used to convert the pre and post means/SD into a SMD (see details).

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

reverse_means_pre_post

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the pre/post standard errors of a single group into standard deviations (Section 6.5.2.2 in the Cochrane Handbook).

mean\_pre\_sd\_exp = mean\_pre\_se\_exp * \sqrt{n\_exp}

mean\_post\_sd\_exp = mean\_post\_se\_exp * \sqrt{n\_exp}

Then, calculations of the es_from_means_sd_pre_post_single_group() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 15. Paired: pre-post means and dispersion'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_means_se_pre_post_single_group(
  n_exp = 36,
  mean_pre_exp = 98, mean_exp = 102,
  mean_pre_se_exp = 2.67, mean_se_exp = 2.83,
  r_pre_post_exp = 0.8
)

Convert median, quartiles, and range of two independent groups into several effect size measures

Description

Convert median, quartiles, and range of two independent groups into several effect size measures

Usage

es_from_med_min_max(
  min_exp,
  med_exp,
  max_exp,
  n_exp,
  min_nexp,
  med_nexp,
  max_nexp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_med
)

Arguments

min_exp

minimum value of the experimental/exposed group.

med_exp

median value of the experimental/exposed group.

max_exp

maximum value of the experimental/exposed group.

n_exp

number of participants in the experimental/exposed group.

min_nexp

minimum value of the non-experimental/non-exposed group.

med_nexp

median value of the non-experimental/non-exposed group.

max_nexp

maximum value of the non-experimental/non-exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the generated cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_med

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function first converts a Cohen's d (D), Hedges' g (G) and mean difference (MD) from the medians and ranges of two independent groups. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

This function recreates means+SD of the two groups (Wan et al., 2014):

mean\_exp = \frac{min\_exp + 2*med\_exp + max\_exp}{4} + \frac{min\_exp - 2*med\_exp + max\_exp}{4*n\_exp}

mean\_nexp = \frac{min\_nexp + 2*med\_nexp + max\_nexp}{4} + \frac{min\_nexp - 2*med\_nexp + max\_nexp}{4*n\_nexp}

mean\_sd\_exp = \frac{max\_exp - min\_exp}{2*qnorm((n\_exp-0.375) / (n\_exp+0.25))}

mean\_sd\_nexp = \frac{max\_nexp - min\_nexp}{2*qnorm((n\_nexp-0.375) / (n\_nexp+0.25))}

Note that if the group sample size is inferior to 50, a correction is applied to estimate the standard deviation.

From these means+SD, the function computes MD, D and G using formulas described in es_from_means_sd().

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Importantly,, authors of the Cochrane Handbook stated "As a general rule, we recommend that ranges should not be used to estimate SDs." (see section 6.5.2.6). It is thus a good practice to explore the consequences of the use of this conversion in sensitivity analyses.

Value

This function estimates and converts between several effect size measures.

natural effect size measure
converted effect size measure MD + D + G
OR + R + Z
required input data See 'Section 12. Median, range and/or interquartile range'
https://metaconvert.org/input.html

This function estimates and converts between several effect size measures.

natural effect size measure
converted effect size measure MD + D + G
OR + R + Z
required input data See 'Section 12. Median, range and/or interquartile range'
https://metaconvert.org/input.html

References

Wan, X., Wang, W., Liu, J. et al. Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile range. BMC Med Res Methodol 14, 135 (2014). https://doi.org/10.1186/1471-2288-14-135

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_med_min_max(
  min_exp = 1335, med_exp = 1400,
  max_nexp = 1765, n_exp = 40,
  min_nexp = 1481, med_nexp = 1625,
  max_exp = 1800, n_nexp = 40
)

Convert median, range and interquartile range of two independent groups into several effect size measures

Description

Convert median, range and interquartile range of two independent groups into several effect size measures

Usage

es_from_med_min_max_quarts(
  q1_exp,
  med_exp,
  q3_exp,
  min_exp,
  max_exp,
  n_exp,
  q1_nexp,
  med_nexp,
  q3_nexp,
  min_nexp,
  max_nexp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_med
)

Arguments

q1_exp

first quartile of the experimental/exposed group.

med_exp

median value of the experimental/exposed group.

q3_exp

third quartile of the experimental/exposed group.

min_exp

minimum value of the experimental/exposed group.

max_exp

maximum value of the experimental/exposed group.

n_exp

number of participants in the experimental/exposed group.

q1_nexp

first quartile of the non-experimental/non-exposed group.

med_nexp

median value of the non-experimental/non-exposed group.

q3_nexp

third quartile of the non-experimental/non-exposed group.

min_nexp

minimum value of the non-experimental/non-exposed group.

max_nexp

maximum value of the non-experimental/non-exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the generated cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_med

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function first converts a Cohen's d (D), Hedges' g (G) and mean difference (MD) from the medians, ranges, and interquartile ranges of two independent groups. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

This function recreates means+SD of the two groups (Wan et al., 2014):

mean\_exp = \frac{min\_exp + 2*q1\_exp + 2*med\_exp + 2*q3\_exp + max\_exp}{8}

mean\_nexp = \frac{min\_nexp + 2*q1\_nexp + 2*med\_nexp + 2*q3\_nexp + max\_nexp}{8}

mean\_sd\_exp = \frac{max\_exp - min\_exp}{4*qnorm(\frac{n\_exp-0.375}{n\_exp+0.25})} + \frac{q3\_exp-q1\_exp}{4*qnorm(\frac{0.75*n\_exp-0.125}{n\_exp+0.25})}

mean\_sd\_nexp = \frac{max\_nexp - min\_nexp}{4*qnorm(\frac{n\_nexp-0.375}{n\_nexp+0.25})} + \frac{q3\_nexp-q1\_nexp}{4*qnorm(\frac{0.75*n\_nexp-0.125}{n\_nexp+0.25})}

Note that if the group sample size is inferior to 50, a correction is applied to estimate the standard deviation.

From these means+SD, the function computes MD, D and G using formulas described in es_from_means_sd().

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure
converted effect size measure MD + D + G
OR + R + Z
required input data See 'Section 12. Median, range and/or interquartile range'
https://metaconvert.org/input.html

References

Wan, X., Wang, W., Liu, J. et al. Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile range. BMC Med Res Methodol 14, 135 (2014). https://doi.org/10.1186/1471-2288-14-135

Examples

es_from_med_min_max_quarts(
  min_exp = 1102, q1_exp = 1335,
  med_exp = 1400, q3_exp = 1765,
  max_exp = 1899, n_exp = 40,
  min_nexp = 1181, q1_nexp = 1481,
  med_nexp = 1625, q3_nexp = 1800,
  max_nexp = 1910, n_nexp = 40
)

Convert median and interquartile range of two independent groups into several effect size measures

Description

Convert median and interquartile range of two independent groups into several effect size measures

Usage

es_from_med_quarts(
  q1_exp,
  med_exp,
  q3_exp,
  n_exp,
  q1_nexp,
  med_nexp,
  q3_nexp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_med
)

Arguments

q1_exp

first quartile of the experimental/exposed group.

med_exp

median value of the experimental/exposed group.

q3_exp

third quartile of the experimental/exposed group.

n_exp

number of participants in the experimental/exposed group.

q1_nexp

first quartile of the non-experimental/non-exposed group.

med_nexp

median value of the non-experimental/non-exposed group.

q3_nexp

third quartile of the non-experimental/non-exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the generated cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_med

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function first converts a Cohen's d (D), Hedges' g (G) and mean difference (MD) from the medians and interquartile ranges of two independent groups. Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

This function recreates means+SD of the two groups (Wan et al., 2014):

mean\_exp = \frac{q1\_exp + med\_exp + q3\_exp}{3}

mean\_nexp = \frac{q1\_nexp + med\_nexp + q3\_nexp}{3}

mean\_sd\_exp = \frac{q3\_exp - q1\_exp}{2*qnorm(\frac{0.75*n\_exp - 0.125}{n\_exp+0.25})}

mean\_sd\_nexp = \frac{q3\_nexp - q1\_nexp}{2*qnorm(\frac{0.75*n\_nexp - 0.125}{n\_nexp+0.25})}

Note that if the group sample size is inferior to 50, a correction is applied to estimate the standard deviation.

From these means+SD, the function computes MD, D and G using formulas described in es_from_means_sd().

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

References

Wan, X., Wang, W., Liu, J. et al. Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile range. BMC Med Res Methodol 14, 135 (2014). https://doi.org/10.1186/1471-2288-14-135

Examples

es_from_med_quarts(
  q1_exp = 1335, med_exp = 1400,
  q3_exp = 1765, n_exp = 40,
  q1_nexp = 1481, med_nexp = 1625,
  q3_nexp = 1800, n_nexp = 40
)

Convert an odds ratio value to several effect size measures

Description

Convert an odds ratio value to several effect size measures

Usage

es_from_or(
  or,
  logor,
  n_cases,
  n_controls,
  n_sample,
  small_margin_prop,
  baseline_risk,
  n_exp,
  n_nexp,
  or_to_cor = "bonett",
  or_to_rr = "metaumbrella_cases",
  reverse_or
)

Arguments

or

odds ratio value

logor

log odds ratio value

n_cases

number of cases/events

n_controls

number of controls/no-event

n_sample

total number of participants in the sample

small_margin_prop

smallest margin proportion of the underlying 2x2 table

baseline_risk

proportion of cases in the non-exposed group (n_cases_nexp / n_nexp is used when missing)

n_exp

number of participants in the exposed group

n_nexp

number of participants in the non-exposed group

or_to_cor

formula used to convert the or value into a correlation coefficient (see details).

or_to_rr

formula used to convert the or value into a risk ratio (see details).

reverse_or

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function computes the standard error of the log odds ratio. Risk ratio (RR), Cohen's d (D), Hedges' g (G) and correlation coefficients (R/Z), are converted from the odds ratio value.

Estimation of the standard error of the log OR. This function generates the standard error of an odds ratio (OR) based on the OR value and the number of cases and controls. More precisely, this function simulates all combinations of the possible number of cases and controls in the exposed and non-exposed groups compatible with the reported OR value and with the overall number of cases and controls. Then, our function assumes that the variance of the OR is equal to the mean of the standard error of all possible situations. This estimation thus necessarily comes with some imprecision and should not be used before having requested the value (or raw data) to authors of the original report.

Conversion of other effect size measures. Calculations of es_from_or_se() are then applied to estimate the other effect size measures

Value

This function estimates and converts between several effect size measures.

natural effect size measure N/A
converted effect size measure OR + RR + NNT
D + G + R + Z
required input data See 'Section 2. Odds Ratio'
https://metaconvert.org/input.html

References

Gosling, C. J., Solanes, A., Fusar-Poli, P., & Radua, J. (2023). metaumbrella: the first comprehensive suite to perform data analysis in umbrella reviews with stratification of the evidence. BMJ mental health, 26(1), e300534. https://doi.org/10.1136/bmjment-2022-300534

Examples

es_or_guess <- es_from_or(or = 0.5, n_cases = 210, n_controls = 220)
es_or <- es_from_or_se(or = 0.5, logor_se = 0.4, n_cases = 210, n_controls = 220)
round(es_or_guess$logor_se, 0.10) == round(es_or$logor_se, 0.10)

Convert an odds ratio value and its 95% confidence interval to several effect size measures

Description

Convert an odds ratio value and its 95% confidence interval to several effect size measures

Usage

es_from_or_ci(
  or,
  or_ci_lo,
  or_ci_up,
  logor,
  logor_ci_lo,
  logor_ci_up,
  baseline_risk,
  small_margin_prop,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  max_asymmetry = 10,
  or_to_cor = "bonett",
  or_to_rr = "metaumbrella_cases",
  reverse_or
)

Arguments

or

odds ratio value

or_ci_lo

lower bound of the 95% CI around the odds ratio value

or_ci_up

upper bound of the 95% CI around the odds ratio value

logor

log odds ratio value

logor_ci_lo

lower bound of the 95% CI around the log odds ratio value

logor_ci_up

upper bound of the 95% CI around the log odds ratio value

baseline_risk

proportion of cases in the non-exposed group (only required for the or_to_rr = "grant" argument).

small_margin_prop

smallest margin proportion of the underlying 2x2 table

n_exp

number of participants in the exposed group (only required for the or_to_rr = "grant", and or_to_rr = "metaumbrella_exp" arguments)

n_nexp

number of participants in the non-exposed group (only required for the or_to_rr = "grant", and or_to_rr = "metaumbrella_exp" arguments)

n_cases

number of cases/events

n_controls

number of controls/no-event

n_sample

total number of participants in the sample

max_asymmetry

A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

or_to_cor

formula used to convert the or value into a correlation coefficient (see details).

or_to_rr

formula used to convert the or value into a risk ratio (see details).

reverse_or

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function computes the standard error of the (log) odds ratio into a standard error (Section 6.5.2.2 in the Cochrane Handbook).

logor\_se = \frac{\log{or\_ci\_up} - \log{or\_ci\_lo}}{2 * qnorm(.975)}

Then, calculations of es_from_or_se are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR
converted effect size measure RR + NNT
D + G + R + Z
required input data See 'Section 2. Odds Ratio'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_or <- es_from_or_ci(
  or = 1, or_ci_lo = 0.5, or_ci_up = 2,
  n_cases = 42, n_controls = 38, baseline_risk = 0.08,
  or_to_rr = "grant"
)

Convert an odds ratio value and its standard error to several effect size measures

Description

Convert an odds ratio value and its standard error to several effect size measures

Usage

es_from_or_pval(
  or,
  logor,
  or_pval,
  baseline_risk,
  small_margin_prop,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  or_to_rr = "metaumbrella_cases",
  or_to_cor = "bonett",
  reverse_or_pval
)

Arguments

or

odds ratio value

logor

log odds ratio value

or_pval

p-value of the (log) odds ratio

baseline_risk

proportion of cases in the non-exposed group (only required for the or_to_rr = "grant" argument).

small_margin_prop

smallest margin proportion of the underlying 2x2 table

n_exp

number of participants in the exposed group (only required for the or_to_rr = "grant", and or_to_rr = "metaumbrella_exp" arguments)

n_nexp

number of participants in the non-exposed group (only required for the or_to_rr = "grant", and or_to_rr = "metaumbrella_exp" arguments)

n_cases

number of cases/events

n_controls

number of controls/no-event

n_sample

total number of participants in the sample

or_to_rr

formula used to convert the or value into a risk ratio (see details).

or_to_cor

formula used to convert the or value into a correlation coefficient (see details).

reverse_or_pval

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function computes the standard error of the (log) odds ratio into from a p-value (Section 6.3.2 in the Cochrane Handbook).

logor\_z = qnorm(or_pval/2, lower.tail=FALSE)

logor\_se = |\frac{\log(or)}{logor\_z}|

Then, calculations of es_from_or_se() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR
converted effect size measure RR + NNT
D + G + R + Z
required input data See 'Section 2. Odds Ratio'
https://metaconvert.org/input.html

References

Higgins, J. P., Thomas, J., Chandler, J., Cumpston, M., Li, T., Page, M. J., & Welch, V. A. (Eds.). (2019). Cochrane handbook for systematic reviews of interventions. John Wiley & Sons.

Examples

es_or <- es_from_or_pval(
  or = 3.51, or_pval = 0.001,
  n_cases = 12, n_controls = 68
)

Convert an odds ratio value and its standard error into several effect size measures

Description

Convert an odds ratio value and its standard error into several effect size measures

Usage

es_from_or_se(
  or,
  logor,
  logor_se,
  baseline_risk,
  small_margin_prop,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  or_to_rr = "metaumbrella_cases",
  or_to_cor = "pearson",
  reverse_or
)

Arguments

or

odds ratio value

logor

log odds ratio value

logor_se

the standard error of the log odds ratio

baseline_risk

proportion of cases in the non-exposed group

small_margin_prop

smallest margin proportion of cases/events in the underlying 2x2 table

n_exp

number of participants in the exposed group

n_nexp

number of participants in the non-exposed group

n_cases

number of cases/events across exposed/non-exposed groups

n_controls

number of controls/no-event across exposed/non-exposed groups

n_sample

total number of participants in the sample

or_to_rr

formula used to convert the or value into a risk ratio (see details).

or_to_cor

formula used to convert the or value into a correlation coefficient (see details).

reverse_or

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the log odds ratio into a Risk ratio (RR), Cohen's d (D), Hedges' g (G) and correlation coefficients (R/Z).

To estimate the Cohen's d value and its standard error The following formulas are used (Cooper et al., 2019):

d = \log(or) * \frac{\sqrt{3}}{\pi}

d\_se = \sqrt{\frac{logor\_se^2 * 3}{\pi^2}}

To estimate the risk ratio and its standard error, various formulas can be used.

A. First, the approach described in Grant (2014) can be used. However, in the paper, only the formula to convert an OR value to a RR value is described. To derive the variance, we used this formula to convert the bounds of the 95% CI, which were then used to obtain the variance.

This argument requires (or + baseline_risk + or_ci_lo + or_ci_up) to generate a RR. The following formulas are used (br = baseline_risk):

rr = \frac{or}{1 - br + br*or}

rr\_ci\_lo = \frac{or\_ci\_lo}{1 - br + br*or\_ci\_lo}

rr\_ci\_up = \frac{or\_ci\_up}{1 - br + br*or\_ci\_up}

logrr\_se = \frac{log(rr\_ci\_up) - log(rr\_ci\_lo)}{2 * qnorm(.975)}

B. Second, the formulas implemented in the metaumbrella package can be used (or_to_rr = "metaumbrella_cases" or or_to_rr = "metaumbrella_exp"). This argument requires (or + logor_se + n_cases + n_controls) or (or + logor_se + n_exp + n_nexp) to generate a RR. More precisely, when the OR value and its standard error, plus either (i) the number of cases and controls or (ii) the number of participants in the exposed and non-exposed groups, are available, we previously developed functions that simulate all combinations of the possible number of cases and controls in the exposed and non-exposed groups compatible with the actual value of the OR. Then, the functions select the contingency table whose standard error coincides best with the standard error reported. The RR value and its standard are obtained from this estimated contingency table.

C. Third, it is possible to transpose the RR to a OR (or_to_rr = "transpose"). This argument requires (or + logor_se) to generate a OR. It is known that OR and RR are similar when the baseline risk is small. Therefore, users can request to simply transpose the OR value & standard error into a RR value & standard error.

rr = or

logrr\_se = logor\_se

D. Fourth, it is possible to recreate the 2x2 table using the dipietrantonj's formulas (or_to_rr = "dipietrantonj"). This argument requires (or + logor_ci_lo + logor_ci_lo) to generate a RR. Information on this approach can be retrieved in Di Pietrantonj (2006).

To estimate the NNT, the formulas used are :

treatment\_risk = \frac{or \times br}{1 - br + or \times br}

rd = br - treatment\_risk

nnt = \frac{1}{rd} = \frac{1 - br \times (1 - or)}{br \times (1 - br)}

To estimate a correlation coefficient, various formulas can be used.

A. First, the approach described in Pearson (1900) can be used (or_to_cor = "pearson"). This argument requires (or + logor_se) to generate a R/Z. It converts the OR value and its standard error to a tetrachoric correlation. Note that the formula assumes that each cell of the 2x2 used to estimate the OR has been added 1/2 before estimating the OR value and its standard error. If it is not the case, formulas can produce slightly less accurate results.

c = \frac{1}{2}

r = \cos{\frac{\pi}{1+or^c}}

r\_se = logor\_se * (\pi * c * or^c) * \frac{\sin(\pi / (1+or^c))}{(1+or^c)^2}

or\_ci\_lo = exp(log(or) - qnorm(.975)*logor\_se)

or\_ci\_up = exp(log(or) + qnorm(.975)*logor\_se)

r\_ci\_lo = cos(\frac{\pi}{1 + or\_ci\_lo^c})

r\_ci\_up = cos(\frac{\pi}{1 + or\_ci\_up^c})

z = atanh(r)

z\_se = \sqrt{\frac{r\_se^2}{(1 - r^2)^2}}

z\_ci\_lo = atanh(r\_lo)

z\_ci\_up = atanh(r\_up)

B. Second, the approach described in Digby (1983) can be used (or_to_cor = "digby"). This argument requires (or + logor_se) to generate a R/Z. It converts the OR value and its standard error to a tetrachoric correlation. Note that the formula assumes that each cell of the 2x2 used to estimate the OR has been added 1/2 before estimating the OR value and its standard error. If it is not the case, formulas can produce slightly less accurate results.

c = \frac{3}{4}

r = \frac{or^c - 1}{or^c + 1}

r\_se = \sqrt{\frac{c^2}{4} * (1 - r^2)^2 * logor\_se^2}

z = atanh(r)

z\_se = \sqrt{\frac{r\_se^2}{(1 - r^2)^2}}

z\_ci\_lo = z - qnorm(.975)*\sqrt{\frac{c^2}{4} * logor\_se}

z\_ci\_up = z + qnorm(.975)*\sqrt{\frac{c^2}{4} * logor\_se}

r\_ci\_lo = tanh(z\_lo)

r\_ci\_up = tanh(z\_up)

C. Third, the approach described in Bonett (2005) can be used (or_to_cor = "bonett"). This argument requires (or + logor_se + n_cases + n_exp + small_margin_prop) to generate a R/Z. Note that the formula assumes that each cell of the 2x2 used to estimate the OR has been added 1/2 before estimating the OR value and its standard error. If it is not the case, formulas can produce slightly less accurate results.

c = \frac{\frac{1 - |n\_exp - n\_cases|}{5} - (0.5 - small\_margin\_prop)^2}{2}

r = \cos{\frac{\pi}{1+or^c}}

r\_se = logor\_se * (\pi * c * or^c) * \frac{\sin(\frac{\pi}{1+or^c})}{(1+or^c)^2}

or\_ci\_lo = exp(log(or) - qnorm(.975)*logor\_se)

or\_ci\_up = exp(log(or) + qnorm(.975)*logor\_se)

r\_ci\_lo = cos(\frac{\pi}{1 + or\_ci\_lo^c})

r\_ci\_up = cos(\frac{\pi}{1 + or\_ci\_up^c})

z = atanh(r)

z\_se = \sqrt{\frac{r\_se^2}{(1 - r^2)^2}}

z\_ci\_lo = atanh(r\_lo)

z\_ci\_up = atanh(r\_up)

D. Last, the approach described in Cooper et al. (2019) can be used (or_to_cor = "lipsey_cooper"). This argument requires (or + logor_se + n_exp + n_nexp) to generate a R/Z. As shown above, the function starts to estimate a SMD from the OR. Then, as described in es_from_cohen_d, it converts this Cohen's d value into a correlation coefficient using the "lipsey_cooper" formulas.

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR
converted effect size measure RR + NNT + RD
D + G + R + Z
required input data See 'Section 2. Odds Ratio'
https://metaconvert.org/input.html

References

Bonett, Douglas G. and Robert M. Price. (2005). Inferential Methods for the Tetrachoric Correlation Coefficient. Journal of Educational and Behavioral Statistics 30:213-25.

Bonett, D. G., & Price, R. M. (2007). Statistical inference for generalized Yule coefficients in 2* 2 contingency tables. Sociological methods & research, 35(3), 429-446.

Cooper, H., Hedges, L. V., & Valentine, J. C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Di Pietrantonj C. (2006). Four-fold table cell frequencies imputation in meta analysis. Statistics in medicine, 25(13), 2299-2322. https://doi.org/10.1002/sim.2287

Digby, Peter G. N. (1983). Approximating the Tetrachoric Correlation Coefficient. Biometrics 39:753-7.

Gosling, C. J., Solanes, A., Fusar-Poli, P., & Radua, J. (2023). metaumbrella: the first comprehensive suite to perform data analysis in umbrella reviews with stratification of the evidence. BMJ mental health, 26(1), e300534. https://doi.org/10.1136/bmjment-2022-300534

Grant R. L. (2014). Converting an odds ratio to a range of plausible relative risks for better communication of research findings. BMJ (Clinical research ed.), 348, f7450. https://doi.org/10.1136/bmj.f7450

Pearson, K. (1900). Mathematical Contributions to the Theory of Evolution. VII: On the Correlation of Characters Not Quantitatively Measurable. Philosophical Transactions of the Royal Statistical Society of London, Series A 19:1-47

Veroniki, A. A., Pavlides, M., Patsopoulos, N. A., & Salanti, G. (2013). Reconstructing 2x2 contingency tables from odds ratios using the Di Pietrantonj method: difficulties, constraints and impact in meta-analysis results. Research synthesis methods, 4(1), 78-94. https://doi.org/10.1002/jrsm.1061

Examples

es_from_or_se(or = 2.12, logor_se = 0.242, n_exp = 120, n_nexp = 44)

Convert two paired ANOVA f value of two independent groups into several effect size measures

Description

Convert two paired ANOVA f value of two independent groups into several effect size measures

Usage

es_from_paired_f(
  paired_f_exp,
  paired_f_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_paired_f
)

Arguments

paired_f_exp

Paired ANOVA F value of the experimental/exposed group.

paired_f_nexp

Paired ANOVA F value of the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the paired t-test value into a SMD (see details).

reverse_paired_f

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the paired F-test obtained from two independent groups value into a Cohen's d (D) and Hedges' g (G) (table 12.2 in Cooper). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate the Cohen's d, the following formulas are used (Cooper et al., 2019): This function converts a Student's t-test value into a Cohen's d (table 12.2 in Cooper).

paired\_t\_exp = \sqrt{paired\_f\_exp}

paired\_t\_nexp = \sqrt{paired\_f\_nexp}

To estimate other effect size measures, calculations of the es_from_paired_t() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 16. Paired: Paired F- or t-test'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_paired_f(paired_f_exp = 2.1, paired_f_nexp = 4.2, n_exp = 20, n_nexp = 22)

Convert two paired ANOVA f p-value of two independent groups into several effect size measures

Description

Convert two paired ANOVA f p-value of two independent groups into several effect size measures

Usage

es_from_paired_f_pval(
  paired_f_pval_exp,
  paired_f_pval_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_paired_f_pval
)

Arguments

paired_f_pval_exp

P-value of the paired ANOVA F of the experimental/exposed group.

paired_f_pval_nexp

P-value of the paired ANOVA F of the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the paired t-test value into a SMD (see details).

reverse_paired_f_pval

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the p-values of two paired F-test obtained from two independent groups value into a Cohen's d (D) and Hedges' g (G) (table 12.2 in Cooper). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate the Cohen's d, the following formulas are used (Cooper et al., 2019): This function converts a Student's t-test value into a Cohen's d (table 12.2 in Cooper).

paired\_t\_exp = qt(\frac{paired\_f\_pval\_exp}{2}, df = n\_exp - 1) * \sqrt{\frac{2 * (1 - r_pre_post_exp)}{n_exp}}

paired\_t\_nexp = qt(\frac{paired\_f\_pval\_nexp}{2}, df = n\_nexp - 1) * \sqrt{\frac{2 * (1 - r_pre_post_nexp)}{n_nexp}}

To estimate other effect size measures, calculations of the es_from_paired_t() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 16. Paired: Paired F- or t-test'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_paired_f_pval(paired_f_pval_exp = 0.4, paired_f_pval_nexp = 0.01, n_exp = 19, n_nexp = 22)

Convert two paired t-test value of two independent groups into several effect size measures

Description

Convert two paired t-test value of two independent groups into several effect size measures

Usage

es_from_paired_t(
  paired_t_exp,
  paired_t_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_paired_t
)

Arguments

paired_t_exp

Paired t-test value of the experimental/exposed group.

paired_t_nexp

Paired t-test value of the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the paired t-test value into a SMD (see details).

reverse_paired_t

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts paired t-tests of two independent groups value into a Cohen's d (D) and Hedges' g (G) (table 12.2 in Cooper). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate the Cohen's d, the following formulas are used (Cooper et al., 2019):

cohen\_d\_exp = paired\_t\_exp * \sqrt{\frac{2 * (1 - r\_pre\_post\_exp)}{n\_exp}}

cohen\_d\_nexp = paired\_t\_nexp * \sqrt{\frac{2 * (1 - r\_pre\_post\_nexp)}{n\_nexp}}

cohen\_d\_se\_exp = \sqrt{\frac{2 * (1 - r\_pre\_post\_exp)}{n\_exp} + \frac{d\_exp^2}{2 * n\_exp}}

cohen\_d\_se\_nexp = \sqrt{\frac{2 * (1 - r\_pre\_post\_nexp)}{n\_nexp} + \frac{d\_nexp^2}{2 * n\_nexp}}

cohen\_d = d\_exp - d\_nexp

d\_se = \sqrt{cohen\_d\_se\_exp^2 + cohen\_d\_se\_nexp^2}

When pre_post_to_smd = "morris_dz", the mean difference is standardized by the standard deviation of the change score and the pre-post correlation is no longer involved (Morris & DeShon, 2002):

cohen\_d\_exp = \frac{paired\_t\_exp}{\sqrt{n\_exp}}

cohen\_d\_nexp = \frac{paired\_t\_nexp}{\sqrt{n\_nexp}}

Note that the Cohen's d obtained from a paired t-test strongly depends on the pre-post correlation. When r_pre_post_exp / r_pre_post_nexp are not indicated, a value of 0.8 is assumed and users should conduct sensitivity analyses with other plausible values.

No pool_sd argument. Unlike the means and mean-change converters, this function cannot pool the standardizing SD across arms: a paired t-statistic identifies each arm's mean\_change / sd\_change ratio but NOT the ratio of the two arms' SDs, so the pooled standardizer is not recoverable from the reported statistic. Each arm is therefore standardized by its own SD and the two within-group values are subtracted – a construction that coincides with the pooled one only when the arms' SDs are equal. When rows from this route are combined in one pool with rows that DO use a pooled standardizer, summary(..., flags = TRUE) raises an informational flag. If the arm SDs are reported, prefer es_from_means_sd_pre_post or es_from_mean_change_sd.

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 16. Paired: Paired F- or t-test'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_paired_t(paired_t_exp = 2.1, paired_t_nexp = 4.2, n_exp = 20, n_nexp = 22)

Convert two paired t-test p-value obtained from two independent groups into several effect size measures

Description

Convert two paired t-test p-value obtained from two independent groups into several effect size measures

Usage

es_from_paired_t_pval(
  paired_t_pval_exp,
  paired_t_pval_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_paired_t_pval
)

Arguments

paired_t_pval_exp

P-value of the paired t-test value of the experimental/exposed group.

paired_t_pval_nexp

P-value of the paired t-test value of the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

r_pre_post_exp

pre-post correlation in the experimental/exposed group

r_pre_post_nexp

pre-post correlation in the non-experimental/non-exposed group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the paired t-test value into a SMD (see details).

reverse_paired_t_pval

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the p-values of two paired t-test obtained from two independent groups value into a Cohen's d (D) and Hedges' g (G) (table 12.2 in Cooper). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate the Cohen's d, the following formulas are used (Cooper et al., 2019): This function converts a Student's t-test value into a Cohen's d (table 12.2 in Cooper).

paired\_t\_exp = qt(\frac{paired\_t\_pval\_exp}{2}, df = n\_exp - 1) * \sqrt{\frac{2 * (1 - r\_pre\_post\_exp)}{n\_exp}}

paired\_t\_nexp = qt(\frac{paired\_t\_pval\_nexp}{2}, df = n\_nexp - 1) * \sqrt{\frac{2 * (1 - r\_pre\_post\_nexp)}{n\_nexp}}

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 16. Paired: Paired F- or t-test'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105

Examples

es_from_paired_t_pval(paired_t_pval_exp = 0.4, paired_t_pval_nexp = 0.01, n_exp = 19, n_nexp = 22)

Convert paired t-test statistic from a single group into standard effect size measures

Description

Convert paired t-test statistic from a single group into standard effect size measures

Usage

es_from_paired_t_single_group(
  paired_t_exp,
  n_exp,
  r_pre_post_exp = 0.8,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "cooper",
  reverse_paired_t
)

Arguments

paired_t_exp

paired t-test statistic (pre-post comparison) for the group.

n_exp

number of participants in the group.

r_pre_post_exp

pre-post correlation within the group

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

pre_post_to_smd

formula used to convert the paired t statistic into a SMD ("cooper" by default; "morris_dz" also accepted, see details).

reverse_paired_t

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts a paired t-test statistic from a single group into within-group Cohen's d, Hedges' g, and mean difference using the raw score standardizer (morris_drm/cooper).

The paired t-test statistic is related to the mean difference and standard error of difference:

t\_paired = \frac{mean\_diff}{SE\_diff}

where:

SE\_diff = \frac{SD\_diff}{\sqrt{n}}

SD\_diff = \sqrt{SD\_pre^2 + SD\_post^2 - 2 \times r \times SD\_pre \times SD\_post}

This function calculates the raw score standardized mean difference (d_rm, Morris & DeShon 2002):

d\_rm = t\_paired \times \sqrt{\frac{2 \times (1 - r)}{n}}

The variance is calculated as:

var(d\_rm) = \frac{2 \times (1 - r)}{n} + \frac{d\_rm^2}{2 \times n}

The result depends on the pre-post correlation (0.8 assumed when r_pre_post_exp is missing); see es_from_mean_change_sd_single_group.

The within-group Hedges' g is obtained by applying a bias correction factor J to d.

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MDw + Dw + Gw
converted effect size measure OR + R + Z
required input data See 'Section 15. Paired: pre-post paired t-test'
https://metaconvert.org/input.html

References

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125.

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_paired_t_single_group(
  paired_t_exp = 2.5,
  n_exp = 20,
  r_pre_post_exp = 0.7
)

Convert a Pearson's correlation coefficient to several effect size measures

Description

Convert a Pearson's correlation coefficient to several effect size measures

Usage

es_from_pearson_r(
  pearson_r,
  sd_iv,
  n_sample,
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  unit_increase_iv,
  unit_type = "raw_scale",
  reverse_pearson_r
)

Arguments

pearson_r

a Pearson's correlation coefficient value

sd_iv

the standard deviation of the independent variable

n_sample

the total number of participants

n_exp

number of the experimental/exposed group

n_nexp

number of the non-experimental/non-exposed group

cor_to_smd

formula used to convert a pearson_r or fisher_z value into a SMD.

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (see details).

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "value"

reverse_pearson_r

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function estimates the variance of a Pearson's correlation coefficient, and computes the Fisher's r-to-z transformation. Cohen's d (D), Hedges' g (G) are converted from the Pearson's r, and odds ratio (OR) are converted from the Cohen's d.

  1. The formula used to estimate the standard error of the Pearson's correlation coefficient and 95% CI are (Formula 12.27 in Cooper):

    R\_se = \sqrt{\frac{(1 - pearson\_r^2)^2}{n\_sample - 1}}

    R\_lo = pearson\_r - qt(.975, n\_sample - 2) * R\_se

    R\_up = pearson\_r + qt(.975, n\_sample - 2) * R\_se

  2. The formula used to estimate the Fisher's z are (Formula 12.28 & 12.29 in Cooper):

    Z = atanh(r)

    Z\_se = \sqrt{\frac{1}{n\_sample - 3}}

    Z\_ci\_lo = Z - qnorm(.975) * Z\_se

    Z\_ci\_up = Z + qnorm(.975) * Z\_se

  3. Several approaches can be used to convert a correlation coefficient to a SMD.

A. Mathur proposes to use this formula (Formula 1.2 in Mathur, cor_to_smd = "mathur"):

increase = ifelse(unit_type == "sd", unit\_increase\_iv * sd\_iv, unit\_increase\_iv)

d = \frac{r * increase}{sd_iv * \sqrt{1 - r^2}}

d\_se = abs(d) * \sqrt{\frac{1}{r^2 * (n\_sample - 3)} + \frac{1}{2*(n\_sample - 1))}}

The resulting Cohen's d is the average increase in the dependent variable associated with an increase of x units in the independent variable (with x = unit_increase_iv).

B. Viechtbauer proposes to use the delta method to derive a Cohen's d from a correlation coefficient (Viechtbauer, 2023, cor_to_smd = "viechtbauer")

C. Cooper converts a point-biserial correlation to Cohen's d with the fixed per-2-SD transformation (Formula 12.38 & 12.39 in Cooper, cor_to_smd = "cooper"). Unlike the "mathur" option, this branch does NOT use unit_increase_iv, unit_type or sd_iv; it always returns the standardized mean difference between two groups lying one predictor standard deviation apart:

d = \frac{2 * r}{\sqrt{1 - r^2}}

d\_se = \sqrt{\frac{4 * R\_se^2}{(1 - r^2)^3}}

where R\_se is the standard error of the correlation. It therefore coincides with the cor_to_smd = "mathur" result only in the special case unit_type = "sd" and unit_increase_iv = 2.

To know how the Cohen's d value is converted to other effect measures (G/OR), see details of the es_from_cohen_d function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure R + Z
converted effect size measure D + G + OR
required input data See 'Section 4. Pearson's r or Fisher's z'
https://metaconvert.org/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Mathur, M. B., & VanderWeele, T. J. (2020). A Simple, Interpretable Conversion from Pearson's Correlation to Cohen's for d Continuous Exposures. Epidemiology (Cambridge, Mass.), 31(2), e16-e18. https://doi.org/10.1097/EDE.0000000000001105

Viechtbauer W (2010). "Conducting meta-analyses in R with the metafor package." Journal of Statistical Software, 36(3), 1-48. doi:10.18637/jss.v036.i03.

Examples

es_from_pearson_r(
  pearson_r = .51, sd_iv = 0.24, n_sample = 214,
  unit_increase_iv = 1, unit_type = "sd"
)

Convert a phi value to several effect size measures

Description

Convert a phi value to several effect size measures

Usage

es_from_phi(phi, n_cases, n_exp, n_sample, reverse_phi)

Arguments

phi

phi value

n_cases

total number of cases/events

n_exp

total number of participants in the exposed group

n_sample

total number of participants in the sample

reverse_phi

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

The functions computes an odds ratio (OR), risk ratio (RR), and number needed to treat (NNT) from the the phi coefficient, the total number of participants, the total number of cases and the total number of people exposed. Cohen's d (D) and Hedges' g (G) are tried to be obtained from the OR, or are converted using the approach by Lipsey et al. (2001). The correlation coefficients (R/Z) are converted by assuming that the phi coefficient is equal to a R, and the variances of R and Z are obtained using the approach proposed by Lipsey et al. (2001) as well as by our own calculations.

To estimate the OR, RR, NNT,, this function reconstructs a 2x2 table (using the approach proposed by Viechtbauer, 2023).

Then, the calculations of the es_from_2x2() function are applied.

To estimate D, G and the correlation coefficients (R/Z) when the 2x2 table cannot be reconstructed (e.g., the number of cases or exposed participants is missing), the phi coefficient – which is the Pearson correlation of the two binary variables – is treated directly as a correlation coefficient and passed to es_from_pearson_r(). This yields R and Z with their standard large-sample sampling variances,

r = phi, \quad r\_se = \frac{1 - r^2}{\sqrt{n\_sample - 1}}

z = atanh(r), \quad z\_se = \frac{1}{\sqrt{n\_sample - 3}}

and D and G are then obtained from R exactly as in es_from_pearson_r() (the R to D step assumes balanced groups). In this situation the OR, RR and NNT require the 2x2 margins and are returned as NA. When the 2x2 table can be reconstructed, D, G, R and Z are instead derived from it (see es_from_2x2()).

Value

This function estimates and converts between several effect size measures.

natural effect size measure OR + RR + NNT
converted effect size measure D + G + R + Z
required input data See 'Section 8. Phi or chi-square'
https://metaconvert.org/input.html

References

Viechtbauer (2023). Accessed at https://wviechtb.github.io/metafor/reference/conv.2x2.html. Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.

Examples

es_from_phi(phi = 0.3, n_sample = 120, n_cases = 20, n_exp = 40)

Converts the means and bounds of an error bar (generally extracted from a plot) into four effect measures (SMD, MD, OR, COR)

Description

Converts the means and bounds of an error bar (generally extracted from a plot) into four effect measures (SMD, MD, OR, COR)

Usage

es_from_plot_ancova_means(
  n_exp,
  n_nexp,
  plot_ancova_mean_exp,
  plot_ancova_mean_nexp,
  plot_ancova_mean_sd_lo_exp,
  plot_ancova_mean_sd_lo_nexp,
  plot_ancova_mean_sd_up_exp,
  plot_ancova_mean_sd_up_nexp,
  plot_ancova_mean_se_lo_exp,
  plot_ancova_mean_se_lo_nexp,
  plot_ancova_mean_se_up_exp,
  plot_ancova_mean_se_up_nexp,
  plot_ancova_mean_ci_lo_exp,
  plot_ancova_mean_ci_lo_nexp,
  plot_ancova_mean_ci_up_exp,
  plot_ancova_mean_ci_up_nexp,
  cov_outcome_r,
  n_cov_ancova,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_plot_ancova_means
)

Arguments

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

plot_ancova_mean_exp

ancova_mean of participants in the experimental/exposed group (extracted from a plot).

plot_ancova_mean_nexp

ancova_mean of participants in the non-experimental/non-exposed group (extracted from a plot).

plot_ancova_mean_sd_lo_exp

lower bound of an error bar depicting -1 SD from the ancova_mean of the experimental/exposed group (extracted from a plot).

plot_ancova_mean_sd_lo_nexp

lower bound of an error bar depicting -1 SD from the ancova_mean of the non-experimental/non-exposed group (extracted from a plot).

plot_ancova_mean_sd_up_exp

upper bound of an error bar depicting +1 SD from the ancova_mean of the experimental/exposed group (extracted from a plot).

plot_ancova_mean_sd_up_nexp

upper bound of an error bar depicting +1 SD from the ancova_mean of the non-experimental/non-exposed group (extracted from a plot).

plot_ancova_mean_se_lo_exp

lower bound of an error bar depicting -1 SE from the ancova_mean of the experimental/exposed group (extracted from a plot).

plot_ancova_mean_se_lo_nexp

lower bound of an error bar depicting -1 SE from the ancova_mean of the non-experimental/non-exposed group (extracted from a plot).

plot_ancova_mean_se_up_exp

upper bound of an error bar depicting +1 SE from the ancova_mean of the experimental/exposed group (extracted from a plot).

plot_ancova_mean_se_up_nexp

upper bound of an error bar depicting +1 SE from the ancova_mean of the non-experimental/non-exposed group (extracted from a plot).

plot_ancova_mean_ci_lo_exp

lower bound of an error bar depicting the 95% CI of the ancova_mean of the experimental/exposed group (extracted from a plot).

plot_ancova_mean_ci_lo_nexp

lower bound of an error bar depicting the 95% CI of the ancova_mean of the non-experimental/non-exposed group (extracted from a plot).

plot_ancova_mean_ci_up_exp

upper bound of an error bar depicting the 95% CI of the ancova_mean of the experimental/exposed group (extracted from a plot).

plot_ancova_mean_ci_up_nexp

upper bound of an error bar depicting the 95% CI of the ancova_mean of the non-experimental/non-exposed group (extracted from a plot).

cov_outcome_r

correlation between the outcome and covariate (multiple correlation when multiple covariates are included in the ANCOVA model).

n_cov_ancova

number of covariates in the ANCOVA model.

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_plot_ancova_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function uses the bounds of an error bar of a mean obtained from a plot into a standard deviation. Then, a mean difference (MD), Cohen's d (D), and Hedges' g (G) are estimated. Odds ratio (OR), risk ratio (RR) and correlation coefficients (R/Z) are converted from the Cohen's d value.

To convert the bound of an error bar into a standard deviation, this function always prioritizes information from the plot_ancova_mean_sd_* arguments, then those from the plot_ancova_mean_se_* arguments, then those from the plot_ancova_mean_ci_* arguments.

  1. If the bounds of the standard deviations are provided, the following formulas are used:

    ancova\_mean\_sd\_lo\_exp = plot\_ancova\_mean\_exp - plot\_ancova\_mean\_sd\_lo\_exp

    ancova\_mean\_sd\_up\_exp = plot\_ancova\_mean\_sd\_up\_exp - plot\_ancova\_mean\_exp

    ancova\_mean\_sd\_exp = \frac{ancova\_mean\_sd\_lo\_exp + ancova\_mean\_sd\_up\_exp}{2}

mean\_sd\_lo\_nexp = plot\_ancova\_mean\_nexp - plot\_ancova\_mean\_sd\_lo\_nexp

mean\_sd\_up\_nexp = plot\_ancova\_mean\_sd\_up\_nexp - plot\_ancova\_mean\_nexp

mean\_sd\_nexp = \frac{mean\_sd\_lo\_nexp + mean\_sd\_up\_nexp}{2}

Then, calculations of the es_from_ancova_means_sd are used.

  1. If the bounds of the standard errors are provided, the following formulas are used:

    ancova\_mean\_se\_lo\_exp = plot\_ancova\_mean\_exp - plot\_ancova\_mean\_se\_lo\_exp

    ancova\_mean\_se\_up\_exp = plot\_ancova\_mean\_se\_up\_exp - plot\_ancova\_mean\_exp

    ancova\_mean\_se\_exp = \frac{ancova\_mean\_se\_lo\_exp + ancova\_mean\_se\_up\_exp}{2}

mean\_se\_lo\_nexp = plot\_ancova\_mean\_nexp - plot\_ancova\_mean\_se\_lo\_nexp

mean\_se\_up\_nexp = plot\_ancova\_mean\_se\_up\_nexp - plot\_ancova\_mean\_nexp

mean\_se\_nexp = \frac{mean\_se\_lo\_nexp + mean\_se\_up\_nexp}{2}

Then, calculations of the es_from_ancova_means_se are used.

  1. If the bounds of the 95% confidence intervals are provided, the calculations of the es_from_ancova_means_ci() are used.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 22. From plot: adjusted means and dispersion (adjusted)'
https://metaconvert.org/input.html

Examples

es_from_plot_ancova_means(
  n_exp = 35, n_nexp = 35,
  cov_outcome_r = 0.2, n_cov_ancova = 4,
  plot_ancova_mean_exp = 89, plot_ancova_mean_nexp = 104,
  plot_ancova_mean_sd_lo_exp = 69, plot_ancova_mean_sd_lo_nexp = 83,
  plot_ancova_mean_sd_up_exp = 109, plot_ancova_mean_sd_up_nexp = 125
)

Converts the means and bounds of an error bar (generally extracted from a plot) into four effect measures (SMD, MD, OR, COR)

Description

Converts the means and bounds of an error bar (generally extracted from a plot) into four effect measures (SMD, MD, OR, COR)

Usage

es_from_plot_means(
  n_exp,
  n_nexp,
  plot_mean_exp,
  plot_mean_nexp,
  plot_mean_sd_lo_exp,
  plot_mean_sd_lo_nexp,
  plot_mean_sd_up_exp,
  plot_mean_sd_up_nexp,
  plot_mean_se_lo_exp,
  plot_mean_se_lo_nexp,
  plot_mean_se_up_exp,
  plot_mean_se_up_nexp,
  plot_mean_ci_lo_exp,
  plot_mean_ci_lo_nexp,
  plot_mean_ci_up_exp,
  plot_mean_ci_up_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_plot_means
)

Arguments

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

plot_mean_exp

mean of participants in the experimental/exposed group (extracted from a plot).

plot_mean_nexp

mean of participants in the non-experimental/non-exposed group (extracted from a plot).

plot_mean_sd_lo_exp

lower bound of an error bar depicting -1 SD from the mean of the experimental/exposed group (extracted from a plot).

plot_mean_sd_lo_nexp

lower bound of an error bar depicting -1 SD from the mean of the non-experimental/non-exposed group (extracted from a plot).

plot_mean_sd_up_exp

upper bound of an error bar depicting +1 SD from the mean of the experimental/exposed group (extracted from a plot).

plot_mean_sd_up_nexp

upper bound of an error bar depicting +1 SD from the mean of the non-experimental/non-exposed group (extracted from a plot).

plot_mean_se_lo_exp

lower bound of an error bar depicting -1 SE from the mean of the experimental/exposed group (extracted from a plot).

plot_mean_se_lo_nexp

lower bound of an error bar depicting -1 SE from the mean of the non-experimental/non-exposed group (extracted from a plot).

plot_mean_se_up_exp

upper bound of an error bar depicting +1 SE from the mean of the experimental/exposed group (extracted from a plot).

plot_mean_se_up_nexp

upper bound of an error bar depicting +1 SE from the mean of the non-experimental/non-exposed group (extracted from a plot).

plot_mean_ci_lo_exp

lower bound of an error bar depicting the 95% CI of the mean of the experimental/exposed group (extracted from a plot).

plot_mean_ci_lo_nexp

lower bound of an error bar depicting the 95% CI of the mean of the non-experimental/non-exposed group (extracted from a plot).

plot_mean_ci_up_exp

upper bound of an error bar depicting the 95% CI of the mean of the experimental/exposed group (extracted from a plot).

plot_mean_ci_up_nexp

upper bound of an error bar depicting the 95% CI of the mean of the non-experimental/non-exposed group (extracted from a plot).

smd_to_cor

formula used to convert the cohen_d value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_plot_means

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function uses the bounds of an error bar of a mean obtained from a plot into a standard deviation. Then, a mean difference (MD), Cohen's d (D), and Hedges' g (G) are estimated. Odds ratio (OR), risk ratio (RR) and correlation coefficients (R/Z) are converted from the Cohen's d value.

To convert the bound of an error bar into a standard deviation, this function always prioritizes information from the plot_mean_sd_* arguments, then those from the plot_mean_se_* arguments, then those from the plot_mean_ci_* arguments.

  1. If the bounds of the standard deviations are provided, the following formulas are used:

    mean\_sd\_lo\_exp = plot\_mean\_exp - plot\_mean\_sd\_lo\_exp

    mean\_sd\_up\_exp = plot\_mean\_sd\_up\_exp - plot\_mean\_exp

    mean\_sd\_exp = \frac{mean\_sd\_lo\_exp + mean\_sd\_up\_exp}{2}

mean\_sd\_lo\_nexp = plot\_mean\_nexp - plot\_mean\_sd\_lo\_nexp

mean\_sd\_up\_nexp = plot\_mean\_sd\_up\_nexp - plot\_mean\_nexp

mean\_sd\_nexp = \frac{mean\_sd\_lo\_nexp + mean\_sd\_up\_nexp}{2}

Note that if only one bound (e.g., the upper bound) is provided, it will be the only information used to estimate the standard deviation value.

Then, calculations of the es_from_means_sd are used.

  1. If the bounds of the standard errors are provided, the following formulas are used:

    mean\_se\_lo\_exp = plot\_mean\_exp - plot\_mean\_se\_lo\_exp

    mean\_se\_up\_exp = plot\_mean\_se\_up\_exp - plot\_mean\_exp

    mean\_se\_exp = \frac{mean\_se\_lo\_exp + mean\_se\_up\_exp}{2}

mean\_se\_lo\_nexp = plot\_mean\_nexp - plot\_mean\_se\_lo\_nexp

mean\_se\_up\_nexp = plot\_mean\_se\_up\_nexp - plot\_mean\_nexp

mean\_se\_nexp = \frac{mean\_se\_lo\_nexp + mean\_se\_up\_nexp}{2}

Note that if only one bound (e.g., the upper bound) is provided, it will be the only information used to estimate the standard error value.

Then, calculations of the es_from_means_se() are used.

  1. If the bounds of the 95% confidence intervals are provided, the calculations of the es_from_means_ci are used.

Value

This function estimates and converts between several effect size measures.

natural effect size measure MD + D + G
converted effect size measure OR + R + Z
required input data See 'Section 21. From plot: means and dispersion (crude)'
https://metaconvert.org/input.html

Examples

es_from_plot_means(
  n_exp = 35, n_nexp = 35,
  plot_mean_exp = 89, plot_mean_nexp = 104,
  plot_mean_sd_lo_exp = 69, plot_mean_sd_lo_nexp = 83,
  plot_mean_sd_up_exp = 109, plot_mean_sd_up_nexp = 125
)

Convert single-group proportion into an effect size measure

Description

Convert single-group proportion into an effect size measure

Usage

es_from_prop_single_group(prop, n_sample, prop_to_es = "raw", reverse_prop)

Arguments

prop

proportion of cases in the single group (0-1)

n_sample

total sample size

prop_to_es

method used to compute the effect size from the proportion. Must be "raw" (default), "logit", or "freeman_tukey".

reverse_prop

a logical value indicating whether the direction of the proportion should be flipped.

Details

This function computes an effect size from a single-group proportion.

  1. When prop_to_es = "raw" (default), the proportion is used as the effect size and its standard error is:

    prop\_se = \sqrt{\frac{prop \times (1 - prop)}{n}}

  2. When prop_to_es = "logit", the proportion is converted to a log odds:

    logit = \log\left(\frac{prop}{1 - prop}\right)

    logit\_se = \sqrt{\frac{1}{n \times prop \times (1 - prop)}}

  3. When prop_to_es = "freeman_tukey", the Freeman-Tukey double arcsine transformation is applied (Barendregt et al., 2013):

    FT = \frac{1}{2}\left[\arcsin\left(\sqrt{\frac{x}{n+1}}\right) + \arcsin\left(\sqrt{\frac{x+1}{n+1}}\right)\right]

    with x = n \times prop, and:

    FT\_se = \frac{1}{\sqrt{4n + 2}}

When prop is equal to 0 or 1, a 0.5 correction is applied for the raw and logit methods: prop\_corrected = \frac{x + 0.5}{n + 1}. For the raw method this shifts the reported point estimate itself (a boundary proportion of exactly 0 or 1 is returned as (x + 0.5)/(n + 1), i.e. nudged toward the interior), matching the convention of metafor's measure = "PR". The corrected denominator n + 1 also replaces n in the raw and logit standard errors for these boundary rows (i.e., \sqrt{p_c (1 - p_c) / (n + 1)} and \sqrt{1 / ((n + 1) \times p_c \times (1 - p_c))}), matching metafor's "PR"/"PLO" convention throughout.

Proportions outside [0, 1] are set to NA with a warning (the affected rows return NA, but do not abort the run).

Value

This function estimates a single-group proportion.

natural effect size measure PROP
converted effect size measure N/A
required input data prop + n_sample

Note: when prop_to_es = "logit" or "freeman_tukey", the returned prop, prop_se, prop_ci_lo and prop_ci_up columns are on the transformed (log-odds / Freeman-Tukey double-arcsine) scale, not the ⁠[0, 1]⁠ proportion scale, and are not back-transformed. Only prop_to_es = "raw" returns values on the proportion scale.

References

Barendregt, J. J., Doi, S. A., Lee, Y. Y., Norman, R. E., & Vos, T. (2013). Meta-analysis of prevalence. Journal of Epidemiology and Community Health, 67(11), 974-978.

Miller, J. J. (1978). The inverse of the Freeman-Tukey double arcsine transformation. The American Statistician, 32(4), 138-138. (Back-transformation left to the user; not applied here: Freeman-Tukey results stay on the transformed scale.)

Examples

es_from_prop_single_group(prop = 0.30, n_sample = 100)

Convert single-group case counts into a proportion effect size measure

Description

Convert single-group case counts into a proportion effect size measure

Usage

es_from_prop_single_group_counts(
  n_cases,
  n_sample,
  prop_to_es = "raw",
  reverse_prop
)

Arguments

n_cases

number of cases in the single group

n_sample

total sample size

prop_to_es

method used to compute the effect size from the proportion. Must be "raw" (default), "logit", or "freeman_tukey".

reverse_prop

a logical value indicating whether the direction of the proportion should be flipped.

Details

This is a convenience function that converts case counts to proportions and then calls es_from_prop_single_group().

The proportion is calculated as:

prop = \frac{n\_cases}{n\_sample}

Then, calculations of the es_from_prop_single_group() are applied.

Rows where n_cases > n_sample are set to NA (both values) with a warning; the affected rows return NA, but do not abort the run.

Value

This function returns the same output as es_from_prop_single_group(). See that function's documentation for details.

References

Barendregt, J. J., Doi, S. A., Lee, Y. Y., Norman, R. E., & Vos, T. (2013). Meta-analysis of prevalence. Journal of Epidemiology and Community Health, 67(11), 974-978.

Examples

es_from_prop_single_group_counts(n_cases = 25, n_sample = 100)

Convert a point-biserial correlation coefficient into several effect size measures

Description

Convert a point-biserial correlation coefficient into several effect size measures

Usage

es_from_pt_bis_r(
  pt_bis_r,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_pt_bis_r
)

Arguments

pt_bis_r

value of a point-biserial correlation coefficient

n_exp

total number of participants in the exposed group

n_nexp

total number of participants in the non exposed group

smd_to_cor

formula used to convert the pt_bis_r value into a coefficient correlation.

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_pt_bis_r

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function uses a point-biserial correlation coefficient to estimate a Cohen's d (D) and Hedges' g (G). Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

The formula used to obtain the Cohen's d are (Viechtbauer, 2021):

m = n\_exp + n\_nexp - 2

h = \frac{m}{n\_exp} + \frac{m}{n\_nexp}

d = \frac{pt\_bis\_r * \sqrt{h}}{\sqrt{1 - pt\_bis\_r^2}}

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 11. ANOVA statistics, Student's t-test, or point-bis correlation'
https://metaconvert.org/input.html

References

Viechtbauer (2021). Accessed at: https://stats.stackexchange.com/questions/526789/convert-correlation-r-to-cohens-d-unequal-groups-of-known-size

Examples

es_from_pt_bis_r(pt_bis_r = 0.2, n_exp = 121, n_nexp = 121)

Convert a p-value of a point-biserial correlation coefficient into several effect size measures

Description

Convert a p-value of a point-biserial correlation coefficient into several effect size measures

Usage

es_from_pt_bis_r_pval(
  pt_bis_r_pval,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_pt_bis_r_pval
)

Arguments

pt_bis_r_pval

p-value of a point-biserial correlation coefficient

n_exp

total number of participants in the exposed group

n_nexp

total number of participants in the non exposed group

smd_to_cor

formula used to convert the pt_bis_r_pval value into a coefficient correlation.

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_pt_bis_r_pval

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the p-value of a point biserial correlation into a Student's t-value.

The formula used to obtain this Student's t-value is:

t = pt(\frac{pt\_bis\_r\_pval}{2}, df = n\_exp + n\_nexp - 2)

Calculations of the es_from_student_t function are then applied.

Because a two-sided p-value carries no direction, the recovered t (and hence the generated effect sizes) are always non-negative; use reverse_pt_bis_r_pval to encode the correct sign.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 11. ANOVA statistics, Student's t-test, or point-bis correlation'
https://metaconvert.org/input.html

References

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.

Examples

es_from_pt_bis_r_pval(pt_bis_r_pval = 0.2, n_exp = 121, n_nexp = 121)

Convert a risk difference value and its 95% confidence interval to several effect size measures

Description

Convert a risk difference value and its 95% confidence interval to several effect size measures

Usage

es_from_rd_ci(
  rd,
  rd_ci_lo,
  rd_ci_up,
  baseline_risk,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  reverse_rd
)

Arguments

rd

risk difference value

rd_ci_lo

lower bound of the 95% CI around the risk difference

rd_ci_up

upper bound of the 95% CI around the risk difference

baseline_risk

proportion of cases in the non-exposed/control group

n_exp

number of participants in the exposed/treatment group

n_nexp

number of participants in the non-exposed/control group

n_cases

number of cases/events across both groups

n_controls

number of controls/no-event across both groups

n_sample

total number of participants in the sample

reverse_rd

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function computes the standard error of the risk difference from its 95% CI (Section 6.5.2.2 in the Cochrane Handbook):

rd\_se = \frac{rd\_ci\_up - rd\_ci\_lo}{2 \times qnorm(.975)}

Then, calculations of es_from_rd_se() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure RD
converted effect size measure OR + RR + NNT
required input data rd + rd_ci_lo + rd_ci_up

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_rd_ci(
  rd = 0.15, rd_ci_lo = 0.05, rd_ci_up = 0.25,
  baseline_risk = 0.30, n_exp = 100, n_nexp = 100
)

Convert a risk difference value and its p-value to several effect size measures

Description

Convert a risk difference value and its p-value to several effect size measures

Usage

es_from_rd_pval(
  rd,
  rd_pval,
  baseline_risk,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  reverse_rd_pval
)

Arguments

rd

risk difference value

rd_pval

p-value of the risk difference

baseline_risk

proportion of cases in the non-exposed/control group

n_exp

number of participants in the exposed/treatment group

n_nexp

number of participants in the non-exposed/control group

n_cases

number of cases/events across both groups

n_controls

number of controls/no-event across both groups

n_sample

total number of participants in the sample

reverse_rd_pval

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function uses the p-value of the risk difference to obtain the standard error (Section 6.3.2 in the Cochrane Handbook):

z = qnorm(rd\_pval / 2, lower.tail = FALSE)

rd\_se = |\frac{rd}{z}|

Then, calculations of es_from_rd_se() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure RD
converted effect size measure OR + RR + NNT
required input data rd + rd_pval

References

Higgins, J. P., Thomas, J., Chandler, J., Cumpston, M., Li, T., Page, M. J., & Welch, V. A. (Eds.). (2019). Cochrane handbook for systematic reviews of interventions. John Wiley & Sons.

Examples

es_from_rd_pval(
  rd = 0.15, rd_pval = 0.01,
  baseline_risk = 0.30, n_exp = 100, n_nexp = 100
)

Convert a risk difference value and its standard error into several effect size measures

Description

Convert a risk difference value and its standard error into several effect size measures

Usage

es_from_rd_se(
  rd,
  rd_se,
  baseline_risk,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  reverse_rd
)

Arguments

rd

risk difference value (control risk minus treatment risk)

rd_se

standard error of the risk difference

baseline_risk

proportion of cases in the non-exposed/control group. Required for converting RD to OR and RR.

n_exp

number of participants in the exposed/treatment group

n_nexp

number of participants in the non-exposed/control group

n_cases

number of cases/events across both groups

n_controls

number of controls/no-event across both groups

n_sample

total number of participants in the sample

reverse_rd

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts a risk difference (RD) and its standard error into an odds ratio (OR), risk ratio (RR), and number needed to treat (NNT).

A risk difference is a ratio-family (binary-outcome) effect size and is not converted to a standardized mean difference (D/G) or a correlation (R/Z). Such a conversion would require reconstructing an odds ratio from an assumed baseline risk, which is not identified by the risk difference alone; and because the baseline risk would be treated as a fixed known constant, the resulting standardized SEs would be anti-conservative. In metaConvert the standardized families are reached only through the odds ratio or a raw 2x2 table (the Cox transform d = \log(or)\sqrt{3}/\pi), neither of which needs an assumed baseline risk. To obtain a D/G/R/Z from a risk difference, first convert it to an OR (supplying the baseline risk) and then use es_from_or_se.

NNT is always computed from RD:

nnt = \frac{1}{rd}

nnt\_se = \frac{rd\_se}{rd^2}

When baseline_risk is available, the following conversions are performed.

To estimate the odds ratio: Let pt = baseline\_risk - rd (treatment group risk). Then:

or = \frac{pt \times (1 - baseline\_risk)}{baseline\_risk \times (1 - pt)}

logor\_se = \frac{rd\_se}{pt \times (1 - pt)}

where the SE is derived via the delta method from \frac{d(\log OR)}{d(RD)} = \frac{-1}{pt \times (1 - pt)}.

To estimate the risk ratio:

rr = 1 - \frac{rd}{baseline\_risk}

logrr\_se = \frac{rd\_se}{|baseline\_risk - rd|}

where the SE is derived via the delta method from \frac{d(\log RR)}{d(RD)} = \frac{-1}{baseline\_risk - rd}.

Note that the conversions to OR and RR assume the baseline risk is a fixed constant.

Value

This function estimates and converts between several effect size measures.

natural effect size measure RD
converted effect size measure OR + RR + NNT
required input data rd + rd_se

References

Deeks, J.J. (2002). Issues in the selection of a summary statistic for meta-analysis of clinical trials with binary outcomes. Statistics in Medicine, 21(11), 1575-1600.

Examples

es_from_rd_se(rd = 0.15, rd_se = 0.05,
              baseline_risk = 0.30, n_exp = 100, n_nexp = 100)

Convert a risk ratio value and 95% confidence interval to various effect size measures

Description

Convert a risk ratio value and 95% confidence interval to various effect size measures

Usage

es_from_rr_ci(
  rr,
  rr_ci_lo,
  rr_ci_up,
  logrr,
  logrr_ci_lo,
  logrr_ci_up,
  baseline_risk,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  rr_to_or = "metaumbrella",
  max_asymmetry = 10,
  reverse_rr
)

Arguments

rr

risk ratio value

rr_ci_lo

lower bound of the 95% CI around the risk ratio value

rr_ci_up

upper bound of the 95% CI around the risk ratio value

logrr

log risk ratio value

logrr_ci_lo

lower bound of the 95% CI around the log risk ratio value

logrr_ci_up

upper bound of the 95% CI around the log risk ratio value

baseline_risk

proportion of cases in the non-exposed group (only required for the rr_to_or = "grant_CI" and rr_to_or = "grant_2x2" arguments).

n_exp

number of participants in the exposed group (only required for the rr_to_or = "grant_CI", rr_to_or = "grant_2x2" arguments).

n_nexp

number of participants in the non-exposed group (only required for the rr_to_or = "grant_CI", rr_to_or = "grant_2x2" arguments).

n_cases

number of cases/events

n_controls

number of controls/no-event

rr_to_or

formula used to convert the rr value into an odds ratio (see details).

max_asymmetry

A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.

reverse_rr

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function uses the 95% CI of the (log) risk ratio to obtain the standard error (Section 6.5.2.2 in the Cochrane Handbook).

logrr\_se = \frac{\log{rr\_ci\_up} - \log{rr\_ci\_lo}}{2 * qnorm(.975)}

Then, calculations of the es_from_rr_se() are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure RR
converted effect size measure OR + NNT
required input data See 'Section 3. Risk Ratio'
https://metaconvert.org/input.html

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

Examples

es_from_rr_ci(
  rr = 1, rr_ci_lo = 0.5, rr_ci_up = 2,
  n_cases = 42, n_controls = 38, baseline_risk = 0.08
)

Convert a risk ratio value and its p-value to various effect size measures

Description

Convert a risk ratio value and its p-value to various effect size measures

Usage

es_from_rr_pval(
  rr,
  logrr,
  rr_pval,
  baseline_risk,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  rr_to_or = "metaumbrella",
  reverse_rr_pval
)

Arguments

rr

risk ratio value

logrr

log risk ratio value

rr_pval

p-value of the risk ratio

baseline_risk

proportion of cases in the non-exposed group (only required for the rr_to_or = "grant_CI" and rr_to_or = "grant_2x2" arguments).

n_exp

number of participants in the exposed group (only required for the rr_to_or = "grant_CI", rr_to_or = "grant_2x2" arguments).

n_nexp

number of participants in the non-exposed group (only required for the rr_to_or = "grant_CI", rr_to_or = "grant_2x2" arguments).

n_cases

number of cases/events

n_controls

number of controls/no-event

rr_to_or

formula used to convert the rr value into an odds ratio (see details).

reverse_rr_pval

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function uses the p-value of the (log) risk ratio to obtain the standard error (Section 6.3.2 in the Cochrane Handbook).

logrr\_z = qnorm(rr_pval/2, lower.tail=FALSE)

logrr\_se = |\frac{\log(rr)}{logrr\_z}|

Then, calculations of es_from_rr_se are applied.

Value

This function estimates and converts between several effect size measures.

natural effect size measure RR
converted effect size measure OR + NNT
required input data See 'Section 3. Risk Ratio'
https://metaconvert.org/input.html

References

Higgins, J. P., Thomas, J., Chandler, J., Cumpston, M., Li, T., Page, M. J., & Welch, V. A. (Eds.). (2019). Cochrane handbook for systematic reviews of interventions. John Wiley & Sons.

Examples

es_rr <- es_from_rr_pval(
  rr = 3.51, rr_pval = 0.001,
  n_cases = 12, n_controls = 68
)

Convert a risk ratio value and standard error to various effect size measures

Description

Convert a risk ratio value and standard error to various effect size measures

Usage

es_from_rr_se(
  rr,
  logrr,
  logrr_se,
  baseline_risk,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  rr_to_or = "metaumbrella",
  reverse_rr
)

Arguments

rr

risk ratio value

logrr

log risk ratio value

logrr_se

standard error of the log risk ratio

baseline_risk

proportion of cases in the non-exposed group (n_cases_nexp / n_nexp is used when missing)

n_exp

number of participants in the exposed group

n_nexp

number of participants in the non-exposed group

n_cases

number of cases/events

n_controls

number of controls/no-event

rr_to_or

formula used to convert the rr value into an odds ratio (see details).

reverse_rr

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the (log) risk ratio (RR) value and its standard error to odds ratio (OR) and number needed to treat.

To estimate the odds ratio and its standard error, various formulas can be used.

A. First, the approach described in Grant (2014) can be used. However, in the paper, only the formula to convert an RR value to a OR value is described. To derive the variance, we used this formula to convert the bounds of the 95% CI, which were then used to obtain the variance.

This argument requires (rr + baseline_risk + rr_ci_lo + rr_ci_up) to generate a RR. The following formulas are used (br = baseline_risk):

or = \frac{rr * (1 - br)}{1 - rr * br}

or\_ci\_lo = \frac{rr\_ci\_lo * (1 - br)}{1 - rr\_ci\_lo * br}

or\_ci\_up = \frac{rr\_ci\_up * (1 - br)}{1 - rr\_ci\_up * br}

logor\_se = \frac{log(or\_ci\_up) - log(or\_ci\_lo)}{2 * qnorm(.975)}

B. Second, the formulas implemented in the metaumbrella package can be used (or_to_rr = "metaumbrella_exp"). This argument requires (rr + logrr_se + n_exp + n_nexp) to generate a OR. More precisely, we previously developed functions that simulate all combinations of the possible number of cases and controls in the exposed and non-exposed groups compatible with the actual value of the RR. Then, the functions select the contingency table whose standard error coincides best with the standard error reported. The RR value and its standard are obtained from this estimated contingency table.

C. Third, it is possible to transpose the RR to a OR (rr_to_or = "transpose"). This argument requires (rr + logrr_se) to generate a OR. It is known that OR and RR are similar when the baseline risk is small. Therefore, users can request to simply transpose the RR value & standard error into a OR value & standard error.

or = rr

logor\_se = logrr\_se

D. Fourth, it is possible to recreate the 2x2 table using the dipietrantonj's formulas (rr_to_or = "dipietrantonj"). This argument requires (rr + logrr_ci_lo + logrr_ci_lo) to generate a OR. Information on this approach can be retrieved in Di Pietrantonj (2006).

To estimate the NNT, the formulas used are :

nnt = \frac{1}{br * (1 - rr)}

Value

This function estimates and converts between several effect size measures.

natural effect size measure RR
converted effect size measure OR + NNT + RD
required input data See 'Section 3. Risk Ratio'
https://metaconvert.org/input.html

References

Di Pietrantonj C. (2006). Four-fold table cell frequencies imputation in meta analysis. Statistics in medicine, 25(13), 2299-2322. https://doi.org/10.1002/sim.2287

Gosling, C. J., Solanes, A., Fusar-Poli, P., & Radua, J. (2023). metaumbrella: the first comprehensive suite to perform data analysis in umbrella reviews with stratification of the evidence. BMJ mental health, 26(1), e300534. https://doi.org/10.1136/bmjment-2022-300534

Grant R. L. (2014). Converting an odds ratio to a range of plausible relative risks for better communication of research findings. BMJ (Clinical research ed.), 348, f7450. https://doi.org/10.1136/bmj.f7450

Veroniki, A. A., Pavlides, M., Patsopoulos, N. A., & Salanti, G. (2013). Reconstructing 2x2 contingency tables from odds ratios using the Di Pietrantonj method: difficulties, constraints and impact in meta-analysis results. Research synthesis methods, 4(1), 78-94. https://doi.org/10.1002/jrsm.1061

Examples

es_from_rr_se(rr = 2.12, logrr_se = 0.242, n_exp = 120, n_nexp = 44)

Convert a Spearman's rank correlation coefficient to several effect size measures

Description

Convert a Spearman's rank correlation coefficient to several effect size measures

Usage

es_from_spearman_rho(
  spearman_r,
  n_sample,
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  sd_iv,
  unit_increase_iv,
  unit_type = "raw_scale",
  reverse_spearman_r
)

Arguments

spearman_r

a Spearman's rank correlation coefficient value

n_sample

the total number of participants

n_exp

number of the experimental/exposed group

n_nexp

number of the non-experimental/non-exposed group

cor_to_smd

formula used to convert the derived Pearson's r value into a SMD.

sd_iv

the standard deviation of the independent variable

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (see details).

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "value"

reverse_spearman_r

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function first converts a Spearman's rank correlation coefficient to an approximate Pearson's correlation coefficient using the formula proposed by Rupinski & Dunlap (1996):

r_p = 2 \sin(\pi / 6 \times r_s)

The standard error of the resulting Pearson's r is derived via the delta method. The sampling variance of the Spearman rho under bivariate normality carries an extra (1 + r_s^2 / 2) factor relative to the Pearson variance (Bonett & Wright, 2000); omitting it would understate the SE, increasingly so for strong correlations:

r_p\_se = \sqrt{\left(\frac{\pi}{3} \cos\left(\frac{\pi}{6} r_s\right)\right)^2 \times \left(1 + \frac{r_s^2}{2}\right)\frac{(1 - r_s^2)^2}{n - 1}}

The converted Pearson's r is then further converted to a Fisher's z, Cohen's d, Hedges' g, and odds ratio using the same formulas as es_from_pearson_r(). This delta-method SE is propagated to the Fisher's z and (for the cor_to_smd = "viechtbauer" and cor_to_smd = "cooper" paths, whose SMD standard errors are proportional to the input r SE) to the Cohen's d, Hedges' g and odds ratio, so all measures share the corrected r variance. The cor_to_smd = "mathur" SMD variance contains no r SE term, so its d/g/OR standard errors are left as computed by es_from_pearson_r().

Value

This function estimates and converts between several effect size measures.

natural effect size measure R + Z
converted effect size measure D + G + OR
required input data See 'Section 4. Pearson's r or Fisher's z'
https://metaconvert.org/input.html

References

Rupinski, M. T., & Dunlap, W. P. (1996). Approximating Pearson product-moment correlations from Kendall's tau and Spearman's rho. Educational and Psychological Measurement, 56(3), 419-429.

Bonett, D. G., & Wright, T. A. (2000). Sample size requirements for estimating Pearson, Kendall and Spearman correlations. Psychometrika, 65(1), 23-28.

Examples

es_from_spearman_rho(
  spearman_r = .55, n_sample = 100
)

Convert a Student's t-test value to several effect size measures

Description

Convert a Student's t-test value to several effect size measures

Usage

es_from_student_t(
  student_t,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_student_t
)

Arguments

student_t

Student's t-test value.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the student_t value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_student_t

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the Student's t-test value into a Cohen's d (D) and Hedges' g (G), Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

To estimate a Cohen's d the formula used is (table 12.1 in Cooper):

cohen\_d = student\_t * \sqrt{\frac{(n\_exp+n\_nexp)}{n\_exp*n\_nexp}}

To estimate other effect size measures, calculations of the es_from_cohen_d() are applied.

Important - Student's t, not Welch's t. This formula is the exact inverse of the pooled-variance (Student) t-test, so student_t must be the equal-variance t. It should NOT be used with a Welch (unequal-variance) t-test, which is the default of R's t.test(). A Welch t uses \sqrt{s_1^2/n_1 + s_2^2/n_2} rather than s_{pooled}\sqrt{1/n_1 + 1/n_2}, so when group sizes and variances both differ, plugging a Welch t into this formula yields a biased Cohen's d (the bias can exceed 50% and may flip sign depending on which arm carries the larger variance; it vanishes only when n_1 = n_2). A Welch t cannot be converted to Cohen's d from (t, n_exp, n_nexp) alone: recovering the pooled SD requires the two arm SDs, in which case es_from_means_sd should be used directly.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 11. ANOVA statistics, Student's t-test, or point-bis correlation'
https://metaconvert.org/html/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_student_t(student_t = 2.1, n_exp = 20, n_nexp = 22)

Convert a Student's t-test p-value to several effect size measures

Description

Convert a Student's t-test p-value to several effect size measures

Usage

es_from_student_t_pval(
  student_t_pval,
  n_exp,
  n_nexp,
  smd_to_cor = "viechtbauer",
  smd_var = "borenstein",
  reverse_student_t_pval
)

Arguments

student_t_pval

p-value (two-tailed) from a Student's t-test. If your p-value is one-tailed, simply multiply it by two.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

smd_to_cor

formula used to convert the student_t_pval value into a coefficient correlation (see details).

smd_var

name of the sampling-variance formula for the standardized mean difference: "borenstein" (default) or "hedges_olkin" (alias "viechtbauer"). The two differ by a squared small-sample-correction factor (J^2); "hedges_olkin" is a few percent larger at small samples.

reverse_student_t_pval

a logical value indicating whether the direction of generated effect sizes should be flipped.

Details

This function converts the Student's t-test p-value into a t-value, and then relies on the calculations of the es_from_student_t() function.

To convert the p-value into a t-value, the following formula is used (table 12.1 in Cooper):

student\_t = qt(\frac{student\_t\_pval}{2}, df = n\_exp + n\_nexp - 2)

Then, calculations of the es_from_student_t() are applied.

Note that a two-sided p-value carries no direction, so the recovered t (and hence the generated effect sizes) are always non-negative. Use reverse_student_t_pval to encode the correct sign for effects that favour the non-experimental group. The same equal-variance (Student, not Welch) assumption as es_from_student_t applies.

Value

This function estimates and converts between several effect size measures.

natural effect size measure D + G
converted effect size measure OR + R + Z
required input data See 'Section 11. ANOVA statistics, Student's t-test, or point-bis correlation'
https://metaconvert.org/html/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Examples

es_from_student_t_pval(student_t_pval = 0.24, n_exp = 20, n_nexp = 22)

Directly input an adjusted effect size value + variance, with optional conversion

Description

Directly input an adjusted effect size value + variance, with optional conversion

Usage

es_from_user_adj(
  user_es_original_measure_adj,
  user_es_adj,
  user_se_adj,
  user_ci_lo_adj,
  user_ci_up_adj,
  user_es_target_measure_adj = "g",
  n_exp,
  n_nexp,
  n_sample,
  n_cases,
  n_controls,
  baseline_risk,
  small_margin_prop,
  or_to_rr = "metaumbrella_cases",
  or_to_cor = "pearson",
  smd_to_cor = "viechtbauer",
  cor_to_smd = "viechtbauer",
  rr_to_or = "metaumbrella",
  measure,
  user_es_measure_adj
)

Arguments

user_es_original_measure_adj

the type of effect size entered (see details).

user_es_adj

adjusted effect size value

user_se_adj

adjusted standard error of the effect size (on the log scale for the or/rr/irr/hr measures)

user_ci_lo_adj

adjusted lower bound of the 95% CI around the effect size value

user_ci_up_adj

adjusted upper bound of the 95% CI around the effect size value

user_es_target_measure_adj

the effect size measure of the output (automatically set to the measure argument when called by the convert_df function)

n_exp

number of participants in the exposed group

n_nexp

number of participants in the non-exposed group

n_sample

total number of participants in the sample

n_cases

number of cases/events across exposed/non-exposed groups

n_controls

number of controls/no-event across exposed/non-exposed groups

baseline_risk

proportion of cases in the non-exposed group

small_margin_prop

smallest margin proportion of cases/events in the underlying 2x2 table

or_to_rr

formula used to convert an odds ratio value into a risk ratio (see es_from_or_se).

or_to_cor

formula used to convert an odds ratio value into a correlation coefficient (see es_from_or_se).

smd_to_cor

formula used to convert a SMD value into a coefficient correlation (see es_from_cohen_d).

cor_to_smd

formula used to convert a correlation coefficient value into a SMD (see es_from_pearson_r).

rr_to_or

formula used to convert a risk ratio value into an odds ratio (see es_from_rr_se).

measure

deprecated alias for user_es_target_measure_adj, kept for backward compatibility with metaConvert <= 1.0.3.

user_es_measure_adj

deprecated alias for user_es_original_measure_adj, kept for backward compatibility with metaConvert <= 1.0.3.

Details

This function is a generic function allowing to include any adjusted effect size measure value + variance. Importantly, when the user_es_original_measure_adj is one of the known measures (d, g, md, mdw, dw, gw, or, logor, rr, logrr, irr, logirr, hr, r, z, rd, nnt), conversions towards the other effect size measures are performed. Otherwise, no conversion is performed (the effect size value + variance you enter is the value + variance exported by this function) and a warning is issued. The sample sizes and baseline risk are used only to perform the conversions.

For the or/rr/irr/hr measures, the standard error you enter must be on the log scale. If you indicate the 95% CI bounds instead of the standard error, the log-transformation is applied automatically.

Value

This function allows to directly input any of the available effect size measures

natural effect size measure Any of the available measures
converted effect size measure Depends on the entered measure (see details)
required input data See 'Section 24. User's input (adjusted)'
https://metaconvert.org/input.html

Examples

dat = data.frame(user_es_original_measure_adj = "or", user_es_adj = 2.5,
                 user_ci_lo_adj = 1.2, user_ci_up_adj = 5.2,
                 n_exp = 120, n_nexp = 44)
summary(convert_df(dat, measure = "g"))

Directly input a crude effect size value + variance, with optional conversion

Description

Directly input a crude effect size value + variance, with optional conversion

Usage

es_from_user_crude(
  user_es_original_measure_crude,
  user_es_crude,
  user_se_crude,
  user_ci_lo_crude,
  user_ci_up_crude,
  user_es_target_measure_crude = "g",
  n_exp,
  n_nexp,
  n_sample,
  n_cases,
  n_controls,
  baseline_risk,
  small_margin_prop,
  or_to_rr = "metaumbrella_cases",
  or_to_cor = "pearson",
  smd_to_cor = "viechtbauer",
  cor_to_smd = "viechtbauer",
  rr_to_or = "metaumbrella",
  measure,
  user_es_measure_crude
)

Arguments

user_es_original_measure_crude

the type of effect size entered (see details).

user_es_crude

effect size value

user_se_crude

standard error of the effect size (on the log scale for the or/rr/irr/hr measures)

user_ci_lo_crude

lower bound of the 95% CI around the effect size value

user_ci_up_crude

upper bound of the 95% CI around the effect size value

user_es_target_measure_crude

the effect size measure of the output (automatically set to the measure argument when called by the convert_df function)

n_exp

number of participants in the exposed group

n_nexp

number of participants in the non-exposed group

n_sample

total number of participants in the sample

n_cases

number of cases/events across exposed/non-exposed groups

n_controls

number of controls/no-event across exposed/non-exposed groups

baseline_risk

proportion of cases in the non-exposed group

small_margin_prop

smallest margin proportion of cases/events in the underlying 2x2 table

or_to_rr

formula used to convert an odds ratio value into a risk ratio (see es_from_or_se).

or_to_cor

formula used to convert an odds ratio value into a correlation coefficient (see es_from_or_se).

smd_to_cor

formula used to convert a SMD value into a coefficient correlation (see es_from_cohen_d).

cor_to_smd

formula used to convert a correlation coefficient value into a SMD (see es_from_pearson_r).

rr_to_or

formula used to convert a risk ratio value into an odds ratio (see es_from_rr_se).

measure

deprecated alias for user_es_target_measure_crude, kept for backward compatibility with metaConvert <= 1.0.3.

user_es_measure_crude

deprecated alias for user_es_original_measure_crude, kept for backward compatibility with metaConvert <= 1.0.3.

Details

This function is a generic function allowing to include any crude effect size measure value + variance. Importantly, when the user_es_original_measure_crude is one of the known measures (d, g, md, mdw, dw, gw, or, logor, rr, logrr, irr, logirr, hr, r, z, rd, nnt), conversions towards the other effect size measures are performed. Otherwise, no conversion is performed (the effect size value + variance you enter is the value + variance exported by this function) and a warning is issued. The sample sizes and baseline risk are used only to perform the conversions.

For the or/rr/irr/hr measures, the standard error you enter must be on the log scale. If you indicate the 95% CI bounds instead of the standard error, the log-transformation is applied automatically.

Value

This function allows to directly input any of the available effect size measures

natural effect size measure Any of the available measures
converted effect size measure Depends on the entered measure (see details)
required input data See 'Section 23. User's input (crude)'
https://metaconvert.org/input.html

Examples

dat = data.frame(user_es_original_measure_crude = "or", user_es_crude = 2.5,
                 user_ci_lo_crude = 1.2, user_ci_up_crude = 5.2,
                 n_exp = 120, n_nexp = 44)
summary(convert_df(dat, measure = "g"))

Title

Description

Title

Usage

es_variab_from_means_ci(
  mean_exp,
  mean_nexp,
  mean_ci_lo_exp,
  mean_ci_up_exp,
  mean_ci_lo_nexp,
  mean_ci_up_nexp,
  n_exp,
  n_nexp,
  reverse_means_variability
)

Arguments

mean_exp

mean of participants in the experimental/exposed group.

mean_nexp

mean of participants in the non-experimental/non-exposed group.

mean_ci_lo_exp

lower bound of the 95% CI of the mean of the experimental/exposed group

mean_ci_up_exp

upper bound of the 95% CI of the mean of the experimental/exposed group

mean_ci_lo_nexp

lower bound of the 95% CI of the mean of the non-experimental/non-exposed group.

mean_ci_up_nexp

upper bound of the 95% CI of the mean of the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

reverse_means_variability

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the bounds of the 95% CI of the means of two independent groups into standard errors.

mean\_se\_exp = \frac{mean\_ci\_up\_exp - mean\_ci\_lo\_exp}{2 * qt{(0.975, df = n\_exp - 1)}}

mean\_se\_nexp = \frac{mean\_ci\_up\_nexp - mean\_ci\_lo\_nexp}{2 * qt{(0.975, df = n\_nexp - 1)}}

Then, calculations of the es_variab_from_means_se are applied.

Value

This function estimates VR and CVR

natural effect size measure VR + CVR
converted effect size measure No conversion performed
required input data See 'Section 23. User's input (crude)'
https://metaconvert.org/html/input.html

References

Senior, A. M., Viechtbauer, W., & Nakagawa, S. (2020). Revisiting and expanding the meta-analysis of variation: The log coefficient of variation ratio. Research Synthesis Methods, 11(4), 553-567. https://doi.org/10.1002/jrsm.1423

Examples

es_variab_from_means_ci(
  mean_exp = 42, mean_ci_lo_exp = 32, mean_ci_up_exp = 52,
  mean_nexp = 42, mean_ci_lo_nexp = 37, mean_ci_up_nexp = 47,
  n_exp = 43, n_nexp = 34
)

Convert means and/or standard deviations of two independent groups into two effect measures (VR/CVR)

Description

Convert means and/or standard deviations of two independent groups into two effect measures (VR/CVR)

Usage

es_variab_from_means_sd(
  mean_exp,
  mean_nexp,
  mean_sd_exp,
  mean_sd_nexp,
  n_exp,
  n_nexp,
  reverse_means_variability
)

Arguments

mean_exp

mean of participants in the experimental/exposed group.

mean_nexp

mean of participants in the non-experimental/non-exposed group.

mean_sd_exp

standard deviation of participants in the experimental/exposed group.

mean_sd_nexp

standard deviation of participants in the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

reverse_means_variability

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the means and standard deviations of two independent groups into a log variability ratio (VR) and a log coefficient of variation ratio (CVR).

The formulas used to obtain the log VR are (formulas 5 and 15, Senior et al. 2020):

logvr = log(\frac{mean\_sd\_exp}{mean\_sd\_nexp}) + \frac{1}{2 * (n\_exp - 1)} - \frac{1}{2 * (n\_nexp - 1)}

logvr\_se = \sqrt{\frac{1}{2} * (\frac{n\_nexp}{(n\_nexp - 1)^2} + \frac{n\_exp}{(n\_exp - 1)^2})}

logvr\_ci\_lo = logvr - qnorm(.975) * logvr\_se

logvr\_ci\_up = logvr + qnorm(.975) * logvr\_se

The formulas used to obtain the log CVR are (formulas 6 and 16, Senior et al. 2020):

cvt = mean\_sd\_exp / mean\_exp

cvc = mean\_sd\_nexp / mean\_nexp

logcvr = log(\frac{cvt}{cvc}) + \frac{1}{2} * (\frac{1}{n\_exp - 1} - \frac{1}{n\_nexp - 1}) + \frac{1}{2} * (\frac{mean\_sd\_nexp^2}{n\_nexp * mean\_nexp^2} - \frac{mean\_sd\_exp^2}{n\_exp * mean\_exp^2})

vt\_exp = \frac{mean\_sd\_exp^2}{n\_exp * mean\_exp^2} + \frac{mean\_sd\_exp^4}{2 * n\_exp^2 * mean\_exp^4} + \frac{n\_exp}{2 * (n\_exp - 1)^2}

vt\_nexp = \frac{mean\_sd\_nexp^2}{n\_nexp * mean\_nexp^2} + \frac{mean\_sd\_nexp^4}{2 * n\_nexp^2 * mean\_nexp^4} + \frac{n\_nexp}{2 * (n\_nexp - 1)^2}

logcvr\_se = \sqrt{vt\_exp + vt\_nexp}

logcvr\_ci\_lo = logcvr - qnorm(.975) * logcvr\_se

logcvr\_ci\_up = logcvr + qnorm(.975) * logcvr\_se

Value

This function estimates VR and CVR

natural effect size measure VR + CVR
converted effect size measure No conversion performed
required input data See 'Section 23. User's input (crude)'
https://metaconvert.org/html/input.html

References

Senior, A. M., Viechtbauer, W., & Nakagawa, S. (2020). Revisiting and expanding the meta-analysis of variation: The log coefficient of variation ratio. Research Synthesis Methods, 11(4), 553-567. https://doi.org/10.1002/jrsm.1423

Examples

es_variab_from_means_sd(
  n_exp = 55, n_nexp = 55,
  mean_exp = 2.3, mean_sd_exp = 1.2,
  mean_nexp = 1.9, mean_sd_nexp = 0.9
)

Convert means and/or standard errors of two independent groups into two effect measures (VR/CVR)

Description

Convert means and/or standard errors of two independent groups into two effect measures (VR/CVR)

Usage

es_variab_from_means_se(
  mean_exp,
  mean_nexp,
  mean_se_exp,
  mean_se_nexp,
  n_exp,
  n_nexp,
  reverse_means_variability
)

Arguments

mean_exp

mean of participants in the experimental/exposed group.

mean_nexp

mean of participants in the non-experimental/non-exposed group.

mean_se_exp

standard error of participants in the experimental/exposed group.

mean_se_nexp

standard error of participants in the non-experimental/non-exposed group.

n_exp

number of participants in the experimental/exposed group.

n_nexp

number of participants in the non-experimental/non-exposed group.

reverse_means_variability

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function converts the standard errors into standard deviations (SE = SD / \sqrt{n}, so SD = SE \times \sqrt{n}).

mean\_sd\_exp = mean\_se\_exp * \sqrt{n\_exp}

mean\_sd\_nexp = mean\_se\_nexp * \sqrt{n\_nexp}

Then, calculations of the es_variab_from_means_sd are applied.

Value

This function estimates VR and CVR

natural effect size measure VR + CVR
converted effect size measure No conversion performed
required input data See 'Section 23. User's input (crude)'
https://metaconvert.org/html/input.html

References

Senior, A. M., Viechtbauer, W., & Nakagawa, S. (2020). Revisiting and expanding the meta-analysis of variation: The log coefficient of variation ratio. Research Synthesis Methods, 11(4), 553-567. https://doi.org/10.1002/jrsm.1423

Examples

es_variab_from_means_se(
  mean_exp = 42, mean_se_exp = 11,
  mean_nexp = 42, mean_se_nexp = 15,
  n_exp = 43, n_nexp = 34
)

Pool or split arms in multi-arm trials

Description

Pool or split arms in multi-arm trials

Usage

pool_arms(x, study_id, pool_side, method = c("pool", "split"), verbose = TRUE)

Arguments

x

a data.frame in metaConvert wide format (as used by convert_df).

study_id

character string: column name identifying which rows belong to the same multi-arm trial.

pool_side

character string: column name whose values indicate which side to pool ("exp" or "nexp") or NA for single-comparison rows that should be left unchanged.

method

either "pool" (Cochrane-recommended pooling of summary statistics) or "split" (divide the shared arm's sample size). See details.

verbose

logical: whether to print warnings about columns set to NA and non-identical shared-side values. Default is TRUE.

Details

Multi-arm trials create dependency when multiple experimental arms share a common control group (or vice versa). This function resolves the dependency before effect size computation with convert_df.

With method = "pool" (recommended), the arms to be pooled are combined into a single composite arm using Cochrane Handbook formulas (Table 23.3.a):

Returns one row per multi-arm group.

With method = "split", the shared arm's sample size (and event counts) is divided equally across comparisons. Each comparison retains its own arm data unchanged, so the output has the same number of rows as the input but with adjusted sample sizes on the shared side. Simpler but slightly conservative.

Value

A data.frame suitable for convert_df. The pool_side column is removed from the output.

References

Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions. Chapter 23, Table 23.3.a.

Examples

# Two experimental arms vs one shared control
dat <- data.frame(
  study_id = c("Study1", "Study1", "Study2"),
  pool_side = c("exp", "exp", NA),
  n_exp = c(30, 25, 40),
  n_nexp = c(28, 28, 35),
  mean_exp = c(12.5, 14.2, 10.0),
  mean_sd_exp = c(3.1, 2.8, 4.0),
  mean_nexp = c(10.1, 10.1, 9.5),
  mean_sd_nexp = c(3.0, 3.0, 3.8)
)

# Pool experimental arms into one composite arm
pooled <- pool_arms(dat, study_id = "study_id",
                    pool_side = "pool_side", method = "pool")

# Or split the shared control's sample size
split_dat <- pool_arms(dat, study_id = "study_id",
                       pool_side = "pool_side", method = "split")


Print a summary of an object of class “metaConvert”

Description

Print a summary of an object of class “metaConvert”

Usage

## S3 method for class 'metaConvert'
print(x, ...)

Arguments

x

an object of class “metaConvert”

...

other arguments that can be passed to the function

Details

Summary method for objects of class “metaConvert”.

Value

Implicitly calls the summary.metaConvert function.

See Also

summary.metaConvert

Examples

### print the results of an object of class metaConvert
convert_df(df.haza, measure = "g")

Compute change-score reliability

Description

Compute change-score reliability

Usage

reliability_change_score(reliability, r_pre_post)

Arguments

reliability

single-occasion reliability coefficient (e.g., Cronbach's alpha or ICC)

r_pre_post

pre-post correlation of observed scores

Details

Computes the reliability of a change (difference) score from a single-occasion reliability coefficient and the pre-post correlation of observed scores, assuming equal variances AND equal reliabilities at pre and post (Lord, 1963; Cronbach & Furby, 1970):

rel_{change} = \frac{rel - r_{12}}{1 - r_{12}}

This is the equal-variance/equal-reliability special case of the general Lord (1963) formula; when the pre and post variances (or reliabilities) differ materially, the general formula should be used instead.

This is useful for disattenuating change-score correlations, where the reliability of the change score is needed rather than the single-occasion reliability.

A negative result (which occurs when r_pre_post exceeds reliability) is population-impossible under classical test theory and signals inconsistent inputs; it is returned as computed but triggers a warning, since a negative value fed to es_disattenuate as a reliability would produce NaN (square root of a negative number).

Value

A data.frame containing the change-score reliability (rel_change).

References

Lord, F. M. (1963). Elementary models for measuring change. In C. W. Harris (Ed.), Problems in measuring change. University of Wisconsin Press.

Cronbach, L. J., & Furby, L. (1970). How we should measure "change" - or should we? Psychological Bulletin, 74(1), 68-80.

Examples

reliability_change_score(reliability = 0.85, r_pre_post = 0.60)

Overview of effect size measures generated from each type of input data

Description

Overview of effect size measures generated from each type of input data

Usage

see_input_data(
  measure = c("all", "d", "g", "md", "or", "rr", "nnt", "r", "z", "logvr", "logcvr",
    "irr"),
  type_of_measure = c("natural", "natural+converted"),
  name = "mcv_input_data",
  extension = c("data.frame", ".txt", ".csv", ".xlsx"),
  verbose = TRUE
)

Arguments

measure

Target effect size measure (one of the 14 available in metaConvert). Default is "all".

type_of_measure

One of "natural+converted" or "natural" (see details).

name

Name of the file created

extension

Extension of the file created. Most common are ".xlsx", ".csv" or ".txt". It is also possible to generate an R dataframe object by using the "data.frame" extension.

verbose

logical variable indicating whether some information should be printed (e.g., the location where the sheet is created when using ".xlsx", ".csv" or ".txt" extensions)

Details

This function generates, on your computer on in the console, a dataset showing each effect size measure computed from each type of input data. The exact combination and names of input data required are available in the links.

The measure argument allows to filter the dataset created. Only the input data allowing to estimate the selected effect size measure will be shown. Default is "all". The type_of_measure argument allows to filter the dataset created.

Extension

You can export a file in various formats outside R (by indicating, for example, ".txt", ".xlsx", or ".csv") in the extension argument. You can also visualise this dataset directly in R by setting extension = "R".

This table is designed to be used in combination with tables showing the combination of input data leading to estimate each of the effect size measures (https://metaconvert.org/html/input.html)

Value

This function returns a table dataset presenting the input data enabling to compute each effect size measure.

Examples

see_input_data(measure = "md", extension = "data.frame")

Synthesize information of an object of class “metaConvert” into a dataframe

Description

Synthesize information of an object of class “metaConvert” into a dataframe

Usage

## S3 method for class 'metaConvert'
summary(
  object,
  digits = 3,
  flags = TRUE,
  flag_options = list(),
  guidance = TRUE,
  include_raw = TRUE,
  ...
)

Arguments

object

an object of class “metaConvert”

digits

an integer value specifying the number of decimal places for the rounding of numeric values. Default is 3.

flags

a logical value indicating whether quality/plausibility flags should be generated. Default is TRUE. The es_flags column includes both input validation flags (generated during convert_df) and post-computation quality flags.

flag_options

a named list of thresholds overriding the defaults (and any options set in convert_df). Available options:

  • smd_max (default 3): |SMD| above this value is flagged

  • r_max (default 0.95): same, for |r|

  • log_or_max (default 5): same, for |logOR| and |logRR|

  • n_min (default 10): flag sample sizes below this value

  • iqr_mult (default 3): IQR multiplier for the cross-row outlier detection

  • dispersion_max_smd / dispersion_max_r / dispersion_max_logor (defaults 0.5 / 0.15 / 1.0): maximum SD of the ES across estimation methods (SMD, correlation, logOR/logRR)

  • diff_max_smd / diff_max_r / diff_max_logor (defaults 1.0 / 0.3 / 2.0): maximum min-max ES difference across estimation methods

  • overlap_min (default 0.80): minimum CI overlap between the min/max estimates (0-1 scale)

  • enable_cross_row (default TRUE): enable/disable the cross-row checks

  • direction_conflict_min (default 2): number of significantly-positive and significantly-negative studies needed to raise the direction conflict flag (G1)

guidance

a logical value indicating whether missing data guidance should be generated for rows where the effect size is NA. Default is TRUE. When enabled, a column es_guidance (or es_guidance_crude/es_guidance_adjusted) is appended, listing the closest estimation methods and which specific columns are missing.

include_raw

a logical value indicating whether the raw input columns should be appended after the effect size columns in the returned dataframe. Default is TRUE.

...

other arguments that can be passed to the function

Details

Summary method for objects of class “metaConvert” produced by the convert_df function. This function automatically:

  1. computes all effect sizes from all available input data

  2. selects, if requested, a main effect size for each association/comparison using the information passed by the user in the es_selected argument of the convert_df function

  3. identifies the smallest and largest effect size for each association/comparison

  4. estimates the absolute difference between the smallest and largest effect size for each association/comparison

  5. estimates the percentage of overlap between the 95% confidence intervals of the smallest and largest effect size for each association/comparison

Value

This function returns a dataframe with many columns. We present below the information stored in each column of the returned dataframe

1. Raw user information. The first columns placed at the left of the returned dataset are simply information provided by the users to facilitate the identification of each row. If the following columns are missing in the original dataset, these columns will not appear in the returned dataset.

row_id Row number in the original dataset.
study_id Identifier of the study.
author Name of the author of the study.
year Year of publication of the study.
predictor Name of the predictor (intervention, risk factor, etc.).
outcome Name of the outcome.
info_expected Types of input data users expect to be used to estimate their effect size measure.

2. Information on generated effect sizes. Then, the function returns information on calculations. For example, users can retrieve the effect size measure estimated, the number and type(s) of input data allowing to estimate the chosen effect size measure, and the method used to obtain a unique effect size if overlapping input data were available. These columns could have several suffix.

For example, let's take column "all_info". It can be "all_info_crude" (all input data used to estimate any crude effect size), "all_info_adjusted" (all input data leading to estimate any adjusted effect size), or "all_info" (all input data leading to estimate any crude or adjusted effect sizes).

To facilitate the presentation, we thus refer to these columns as name_of_the_column*, the * meaning that it could end by _crude, _adjusted or "".

all_info* list of input data available in the dataset that was used to estimate any effect size measure.
measure* effect size measure requested by the user.
info_measure* input data available to estimate the requested effect size measure.
n_estimations* number of input data available to estimate the requested effect size measure.
es_selected* method chosen by users to estimate the main effect size when overlapping data are present.
info_used* type of input data used to estimate the main effect size.

3. Main effect size. The following columns contain the key information, namely, the main effect size + standard error + 95% CI.

Again, the suffix of these columns can vary depending on the separation of effect sizes estimated from crude and adjusted input data.

es* main effect size value.
se* standard error of the effect size.
es_ci_lo* lower bound of the 95% CI around the effect size.
es_ci_up* upper bound of the 95% CI around the effect size.

4. Overlapping effect sizes These columns are useful ONLY if a given comparison (i.e., row) has multiple input data enabling to compute the requested effect size measure.

These columns identify the smallest/largest effect size per comparison, and some indicators of consistency.

Again, the suffix of these columns can vary depending on the separation of effect sizes estimated from crude and adjusted input data.

min_info* type of input data leading to the smallest effect size for the comparison.
min_es_value* smallest effect size value for the comparison.
min_es_se* standard error of the smallest effect size for the comparison.
min_es_ci_lo* lower bound of the 95% CI of the smallest effect size for the comparison.
min_es_ci_up* upper bound of the 95% CI of the smallest effect size for the comparison.
max_info* type of input data leading to the largest effect size for the comparison.
max_es_value* largest effect size value for the comparison.
max_es_se* standard error of the largest effect size for the comparison.
max_es_ci_lo* lower bound of the 95% CI of the largest effect size for the comparison.
max_es_ci_up* upper bound of the 95% CI of the largest effect size for the comparison.
diff_min_max* difference between the smallest and largest effect size for the comparison.
overlap_min_max* % of overlap between the 95% CIs of the largest/smallest effect sizes for the comparison.
dispersion_es* standard deviation of all effect sizes for the comparison.

5. Quality/plausibility flags When flags = TRUE (the default), a flags* column is added, containing the semicolon-separated list of issues detected for the row (empty when none).

flags* quality/plausibility flags for the effect size in this row.

Flag categories:

6. Missing data guidance When guidance = TRUE (the default), an es_guidance* column indicates, for rows without an effect size, the closest estimation methods and which input columns are missing (empty otherwise).

es_guidance* guidance on which columns to add to obtain an effect size.

See Also

metaConvert-package for the formatting of well-formatted datasets
convert_df for estimating effect sizes from a dataset

Examples

### generate a summary of the results of an umbrella object
summary(
  convert_df(df.haza, measure = "g"),
  digits = 5)

mirror server hosted at Truenetwork, Russian Federation.