mod_power: Compute Power for Categorical Moderator Analysis in...

Description Usage Arguments Value See Also Examples

View source: R/mod_power.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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")

metapower documentation built on Feb. 8, 2021, 5:07 p.m.