Caluclate effect sizes for standarised mean differences

# dat<-read.csv('data.csv') ## No exisiting effect sizes
dat <- read.csv("data_ostracism.csv")  ## Effect size in columns vi and yi

if (!"vi" %in% colnames(dat)) {
    dat_ES <- escalc(measure = "SMD", m1i = Intervention.Mean, sd1i = Intervention.SD, 
        n1i = Intervention.N, m2i = Control.Mean, sd2i = Control.SD, n2i = Control.N, 
        data = dat)
    write.csv(dat_ES, "dat_ES.csv")
} else {
    dat_ES <- dat
    attrs <- NULL
    attrs$measure <- "SMD"
    attrs$ni <- dat$Intervention.N + dat$Control.N
    attributes(dat_ES$yi) <- attrs
}

Run meta-analysis

dat_MA <- rma(yi, vi, data = dat_ES, slab = Study.ID)

Summary

A random-effects meta-analysis (k = 52) was conducted using the REML estimator.

Effect Size
g se z p 95% CI LB 95% CI UB
0.133 0.141 0.947 0.344 -0.143 0.41
Heterogeneity
k \(\tau\)2 se Q p I2
52 0.979 0.204 1004.397 0 95.992

Plots

Forest plot

# forest(dat_MA)

forest_rma(dat_MA, study_labels = dat_ES$Study.ID, format_options = list(colour = "black", 
    shape = 15, text_size = 4, banded = TRUE))

Funnel plot

funnel(dat_MA, back = "white")