Package 'metapower'

Title: Power Analysis for Meta-Analysis
Description: A simple and effective tool for computing and visualizing statistical power for meta-analysis, including power analysis of main effects (Jackson & Turner, 2017)<doi:10.1002/jrsm.1240>, test of homogeneity (Pigott, 2012)<doi:10.1007/978-1-4614-2278-5>, subgroup analysis, and categorical moderator analysis (Hedges & Pigott, 2004)<doi:10.1037/1082-989X.9.4.426>.
Authors: Jason Griffin [aut, cre]
Maintainer: Jason Griffin <[email protected]>
License: GPL-2
Version: 0.2.2
Built: 2025-02-28 06:03:38 UTC
Source: https://github.com/jasonwgriffin/metapower

Help Index


Compute Power for Test of Homogeneity in Meta-analysis

Description

Compute statistical power for the Test of Homogeneity for meta-analysis under both fixed- and random-effects models.

Usage

homogen_power(
  effect_size,
  study_size,
  k,
  i2,
  es_type,
  p = 0.05,
  con_table = NULL
)

Arguments

effect_size

Numerical value of effect size.

study_size

Numerical value for number number of participants (per study).

k

Numerical value for total number of studies.

i2

Numerical value for Heterogeneity estimate (i^2).

es_type

'Character reflecting effect size metric: 'r', 'd', or 'or'.

p

Numerical value for significance level (Type I error probability).

con_table

(Optional) Numerical values for 2x2 contingency table as a vector in the following format: c(a,b,c,d).

2x2 Table Group 1 Group 2
Present a b
Not Present c d

Value

Estimated Power to detect differences in homogeneity of effect sizes for fixed- and random-effects models

References

Borenstein, M., Hedges, L. V., Higgins, J. P. T. and Rothstein, H. R.(2009). Introduction to meta-analysis, Chichester, UK: Wiley.

Hedges, L., Pigott, T. (2004). The Power of Statistical Tests for Moderators in Meta-Analysis, Psychological Methods, 9(4), 426-445. doi: https://dx.doi.org/10.1037/1082-989x.9.4.426

Pigott, T. (2012). Advances in Meta-Analysis. doi: https://dx.doi.org/10.1007/978-1-4614-2278-5

See Also

https://jason-griffin.shinyapps.io/shiny_metapower/

Examples

homogen_power(effect_size = .5, study_size = 10, k = 10, i2 = .50, es_type = "d")

Compute Power for Categorical Moderator Analysis in Meta-analysis

Description

Computes statistical power for categorical moderator analysis under fixed and random effects models.

Usage

mod_power(
  n_groups,
  effect_sizes,
  study_size,
  k,
  i2,
  es_type,
  p = 0.05,
  con_table = NULL
)

Arguments

n_groups

Numerical value for the levels of a categorical variable.

effect_sizes

Numerical values for effect sizes of for each group.

study_size

Numerical value for number of participants (per study).

k

Numerical value for total number of studies.

i2

Numerical value for Heterogeneity estimate (i^2).

es_type

Character reflecting effect size metric: 'r', 'd', or 'or'.

p

Numerical value for significance level (Type I error probability).

con_table

(Optional) List of numerical values for 2x2 contingency tables as a vector in the following format: c(a,b,c,d). These should be specified for each group(i.e., n_groups).

2x2 Table Group 1 Group 2
Present a b
Not Present c d

Value

Estimated Power estimates for moderator analysis under fixed- and random-effects models

See Also

https://jason-griffin.shinyapps.io/shiny_metapower/

Examples

mod_power(n_groups = 2,
          effect_sizes = c(.1,.5),
          study_size = 20,
          k = 10,
          i2 = .50,
          es_type = "d")
mod_power(n_groups = 2,
          con_table = list(g1 = c(6,5,4,5), g2 = c(8,5,2,5)),
          study_size = 40,
          k = 20,
          i2 = .50,
          es_type = "or")

Compute Power for Meta-analysis

Description

Computes statistical power for summary effect sizes in meta-analysis.

Usage

mpower(
  effect_size,
  study_size,
  k,
  i2,
  es_type,
  test_type = "two-tailed",
  p = 0.05,
  con_table = NULL
)

Arguments

effect_size

Numerical value of effect size.

study_size

Numerical value for number number of participants (per study).

k

Numerical value for total number of studies.

i2

Numerical value for Heterogeneity estimate (i^2).

es_type

Character reflecting effect size metric: 'r', 'd', or 'or'.

test_type

Character value reflecting test type: ("two-tailed" or "one-tailed").

p

Numerical value for significance level (Type I error probability).

con_table

(Optional) Numerical values for 2x2 contingency table as a vector in the following format: c(a,b,c,d).

2x2 Table Group 1 Group 2
Present a b
Not Present c d

Value

Estimated Power

References

Borenstein, M., Hedges, L. V., Higgins, J. P. T. and Rothstein, H. R.(2009). Introduction to meta-analysis, Chichester, UK: Wiley.

Hedges, L., Pigott, T. (2004). The Power of Statistical Tests for Moderators in Meta-Analysis, Psychological Methods, 9(4), 426-445 doi: https://dx.doi.org/10.1037/1082-989x.9.4.426

Pigott, T. (2012). Advances in Meta-Analysis. doi: https://dx.doi.org/10.1007/978-1-4614-2278-5

Jackson, D., Turner, R. (2017). Power analysis for random-effects meta-analysis, Research Synthesis Methods, 8(3), 290-302 doi: https://dx.doi.org/10.1002/jrsm.1240

See Also

https://jason-griffin.shinyapps.io/shiny_metapower/

Examples

mpower(effect_size = .2, study_size = 10, k = 10, i2 = .5, es_type = "d")

Plot Power Curve for Test of Homogeneity

Description

Plots power curves for the test of homogeneity for different levels of within-study variation for fixed effects models. For random-effects models, power curves are plotted for various levels of heterogeneity.

Usage

plot_homogen_power(obj)

Arguments

obj

should be an "homogen_power" object

Value

Power curve plot for the user specified input parameters


Plot Power Curve for Categorical Moderators

Description

Plots power curves for categorical moderator in meta-analysis

Usage

plot_mod_power(obj)

Arguments

obj

This should be an 'mod_power' object

Value

Power curves for moderator analysis under fixed and random effects models


Plot Power Curve for Meta-analysis

Description

Plots power curves for fixed effects models with various effect size magnitudes. Also plots power curves for various levels of heterogeneity (e.g., i2 = 75

Usage

plot_mpower(obj)

Arguments

obj

This should be an "mpower" object

Value

Power curve plot for the user specified input parameters


Plot Power Curve for Subgroup analysis

Description

Plots power curves to detect subgroup differences in meta-analysis.

Usage

plot_subgroup_power(obj)

Arguments

obj

This should be an 'subgroup_power' object

Value

Power curves to detect subgroup differences for fixed and random effects models


Compute Power for Subgroup Analysis in Meta-analysis

Description

Computes statistical power for different subgroups under fixed and random effects models.

Usage

subgroup_power(
  n_groups,
  effect_sizes,
  study_size,
  k,
  i2 = 0.5,
  es_type,
  p = 0.05,
  con_table = NULL
)

Arguments

n_groups

Numerical value for the number of subgroups.

effect_sizes

Numerical values for effect sizes of for each group.

study_size

Numerical value for number of participants (per study).

k

Numerical value for total number of studies.

i2

Numerical value for Heterogeneity estimate (i^2).

es_type

Character reflecting effect size metric: 'r', 'd', or 'or'.

p

Numerical value for significance level (Type I error probability).

con_table

(Optional) List of numerical values for 2x2 contingency tables as a vector in the following format: c(a,b,c,d). These should be specified for each subgroup (i.e., n_groups).

2x2 Table Group 1 Group 2
Present a b
Not Present c d

Value

Estimated Power estimates for subgroup differences under fixed- and random-effects models

See Also

https://jason-griffin.shinyapps.io/shiny_metapower/

Examples

subgroup_power(n_groups = 2,
               effect_sizes = c(.1,.5),
               study_size = 20,
               k = 10,
               i2 = .5,
               es_type = "d")
subgroup_power(n_groups = 2,
               con_table = list(g1 = c(6,5,4,5), g2 = c(8,5,2,5)),
               study_size = 40,
               k = 20,
               i2 = .5,
               es_type = "or")