About

Publication bias is when scientists for whatever reason don’t publish all findings they get. Usually, this is towards larger effect, but in a few cases scientists prefer to find smaller effects. It depends on the political climate and their own beliefs. Since social scientists are overwhelmingly left-wing, we can thus expect very strong publication bias effects left-wing people like, such as early intervention studies. Here this question is analyzed.

Data are from: Duncan and Magnuson’s Investing in Preschool Programs

Note that for some reason, the authors winsorised the data, so the results would probably be more extreme than those seen here.

Initialize

#pkgs
library(pacman)
p_load(kirkegaard, readr, metafor)

#data
d = read.csv("data.csv", encoding="UTF-8")
colnames(d) = c("Name", "Year", "d", "reciproc.var", "Headstart")

Recode a bit

#recode headstart
d$Headstart = plyr::mapvalues(d$Headstart, from = c(1,0), to = c("Headstart", "Other"))

#names of specific studies
d$Names2 = rep("", nrow(d))
d[42,"Names2"] = "Karnes"
d[39,"Names2"] = "Perry"
d[53,"Names2"] = "Abecedarian"

#variance
d$var = d$reciproc.var^-1

Analyze

#meta
RE_main = rma(d$d, vi = d$var)
RE_main
## 
## Random-Effects Model (k = 84; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0179 (SE = 0.0075)
## tau (square root of estimated tau^2 value):      0.1337
## I^2 (total heterogeneity / total variability):   38.32%
## H^2 (total variability / sampling variability):  1.62
## 
## Test for Heterogeneity: 
## Q(df = 83) = 137.9876, p-val = 0.0001
## 
## Model Results:
## 
## estimate       se     zval     pval    ci.lb    ci.ub          
##   0.2510   0.0263   9.5456   <.0001   0.1995   0.3026      *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#forest
GG_forest(RE_main)

ggsave("figures/forest.png")
## Saving 7 x 5 in image
#funnel
GG_funnel(RE_main)

ggsave("figures/funnel.png")
## Saving 7 x 5 in image
#trim and fill
trimfill(RE_main, estimator = "L0")
## 
## Estimated number of missing studies on the left side: 21 (SE = 5.9875)
## 
## Random-Effects Model (k = 105; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0514 (SE = 0.0136)
## tau (square root of estimated tau^2 value):      0.2267
## I^2 (total heterogeneity / total variability):   60.75%
## H^2 (total variability / sampling variability):  2.55
## 
## Test for Heterogeneity: 
## Q(df = 104) = 233.9445, p-val < .0001
## 
## Model Results:
## 
## estimate       se     zval     pval    ci.lb    ci.ub          
##   0.1764   0.0322   5.4749   <.0001   0.1133   0.2396      *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
trimfill(RE_main, estimator = "R0")
## 
## Estimated number of missing studies on the left side: 9 (SE = 4.4721)
## Test of H0: no missing studies on the left side: p-val = 0.0010
## 
## Random-Effects Model (k = 93; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0272 (SE = 0.0094)
## tau (square root of estimated tau^2 value):      0.1650
## I^2 (total heterogeneity / total variability):   46.65%
## H^2 (total variability / sampling variability):  1.87
## 
## Test for Heterogeneity: 
## Q(df = 92) = 182.9974, p-val < .0001
## 
## Model Results:
## 
## estimate       se     zval     pval    ci.lb    ci.ub          
##   0.2241   0.0285   7.8708   <.0001   0.1683   0.2799      *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
trimfill(RE_main, estimator = "Q0")
## 
## Estimated number of missing studies on the left side: 30 (SE = 8.8857)
## 
## Random-Effects Model (k = 114; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0625 (SE = 0.0150)
## tau (square root of estimated tau^2 value):      0.2499
## I^2 (total heterogeneity / total variability):   64.93%
## H^2 (total variability / sampling variability):  2.85
## 
## Test for Heterogeneity: 
## Q(df = 113) = 271.3970, p-val < .0001
## 
## Model Results:
## 
## estimate       se     zval     pval    ci.lb    ci.ub          
##   0.1430   0.0328   4.3603   <.0001   0.0787   0.2073      *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#scatter
GG_scatter(d, "reciproc.var", "d", case_names_vector = "Names2", check_overlap = F) +
  ylab("Effect size (d)") +
  xlab("Precision (1/var; with cutoff)")

ggsave("figures/scatter.png")
## Saving 7 x 5 in image