Skip to content
Prev 4964 / 5636 Next

[R-meta] Correcting Hedges' g vs. Log response ratio in nested studies

Thanks, James.

The part that I struggled with is "a study with m clusters". This makes me
think that I need to add a new column to my data called "class" to index
the rows belonging to each class in each study.

Do I now have it right?

dat <- read.table(header=TRUE,text="
study  gi   vi  cluster n1  n2  class
1     .2   .05  T       25  23   1
1     .3   .08  T       18  11   2
2     1    .1   F       19  21   1
2     2    .2   F       12  36   2")

g_cluster <- function(gi, n_bar, N, icc=.15){

gi*sqrt(1 - (2 * (n_bar - 1) * icc / (N - 2)))
}

dat %>%
  group_by(study) %>%
  mutate(m = n_distinct(class), N = sum(c(n1,n2)), n_bar=N/m,
         gi= ifelse(cluster, g_cluster(gi, n_bar, N), gi))
On Thu, Nov 2, 2023 at 8:07?PM James Pustejovsky <jepusto at gmail.com> wrote: