Skip to content

Commit e4ccd24

Browse files
committed
Update AEO analysis; re-arrange order of methods in plots
1 parent 1656e4c commit e4ccd24

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

4-EstimationPlot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ theme_metashowdown <- theme(
3838

3939
# reduced set for revision
4040
summ2 <- summ %>% filter(method %in% c("reMA", "TF", "PETPEESE.lm", "pcurve", "puniform", "3PSM", "WAAP-WLS")) %>%
41-
mutate(method = factor(method, levels=c("reMA", "TF", "PETPEESE.lm", "pcurve", "puniform", "3PSM", "WAAP-WLS"), labels=c("RE", "TF", "PET-PEESE", "p-curve", "p-uniform", "3PSM", "WAAP-WLS")))
41+
mutate(method = factor(method, levels=c("reMA", "TF", "WAAP-WLS", "pcurve", "puniform", "PETPEESE.lm", "3PSM"), labels=c("RE", "TF", "WAAP-WLS", "p-curve", "p-uniform", "PET-PEESE", "3PSM")))
4242

4343

4444

5-hypTestPlot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ H1 <- 0.5
2525
# reduced set for revision
2626
hyp.sel <- summ %>%
2727
filter(method %in% c("reMA", "TF", "PETPEESE.lm", "pcurve.evidence", "puniform", "3PSM", "WAAP-WLS")) %>%
28-
mutate(method = factor(method, levels=c("reMA", "TF", "PETPEESE.lm", "pcurve.evidence", "puniform", "3PSM", "WAAP-WLS"), labels=c("RE", "TF", "PET-PEESE", "p-curve", "p-uniform", "3PSM", "WAAP-WLS"))) %>%
28+
mutate(method = factor(method, levels=c("reMA", "TF", "WAAP-WLS", "pcurve.evidence", "puniform", "PETPEESE.lm", "3PSM"), labels=c("RE", "TF", "WAAP-WLS", "p-curve", "p-uniform", "PET-PEESE", "3PSM"))) %>%
2929
ungroup()
3030

3131

8-pcurve recover AEO.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
library(dplyr)
22
library(ggplot2)
3-
load("../dataFiles/res.wide.RData")
3+
load("dataFiles/res.wide.RData")
44

55
# res.wide$qrp.label <- factor(res.wide$qrpEnv, levels=c("none", "med", "high"), labels=paste0("QRP = ", c("none", "med", "high")), ordered=TRUE)
66
# res.wide$delta.label <- factor(res.wide$delta, levels=c(0, 0.2, 0.5, 0.8), labels=paste0("delta = ", c(0, 0.2, 0.5, 0.8)), ordered=TRUE)
7-
# res.wide$selProp.label <- factor(res.wide$selProp, levels=unique(res.wide$selProp), labels=paste0("PB = ", unique(res.wide$selProp)))
7+
# res.wide$censor <- factor(res.wide$selProp, levels=unique(res.wide$selProp), labels=paste0("PB = ", unique(res.wide$selProp)))
88

99
# ---------------------------------------------------------------------
1010
# Compute summary measures across replications
@@ -14,7 +14,7 @@ posify <- function(x) {x[x<0] <- 0; return(x)}
1414
# use the data set without any reductions (i.e., also keep p-curves with <=3 sign. studies)
1515
PC <- res.wide %>% filter(method=="pcurve", !is.na(kSig_estimate) & kSig_estimate >= 1)
1616

17-
summ.PC <- PC %>% group_by(condition, k, k.label, delta, delta.label, qrpEnv, qrp.label, selProp, selProp.label, tau, tau.label) %>%
17+
summ.PC <- PC %>% group_by(condition, k, k.label, delta, delta.label, qrpEnv, qrp.label, censor, censor.label, tau, tau.label) %>%
1818
dplyr::summarise(
1919
meanEst.AEO = mean(b0_estimate, na.rm=TRUE),
2020
meanEst.pos.AEO = mean(posify(b0_estimate), na.rm=TRUE),
@@ -34,7 +34,7 @@ summ.PC <- PC %>% group_by(condition, k, k.label, delta, delta.label, qrpEnv, qr
3434

3535
# average kSig in tau=0 conditions:
3636

37-
summ.PC %>% filter(tau==0, delta <= 0.2, qrpEnv=="none", selProp==0) %>% select(1:8, nSig)
37+
summ.PC %>% filter(tau==0, delta == 0, qrpEnv=="none") %>% select(1:8, nSig)
3838

3939
# ---------------------------------------------------------------------
4040
# Plot
@@ -46,7 +46,7 @@ summ.PC %>%
4646
geom_hline(yintercept=0) +
4747
coord_flip(ylim=c(-0.4, 0.25)) +
4848
xlab("k") + ylab("Mean error (relative to average true effect size of studies submitted to p-curve)") +
49-
facet_grid(tau.label~selProp.label~qrp.label) +
49+
facet_grid(tau.label~censor~qrp.label) +
5050
theme_bw() + ggtitle("Effect size estimates (keep all), all p-curves (i.e., >= 4 study rule not applied)")
5151

5252
ggsave("Plots/ME_AEO_raw.jpg", dpi=120)
@@ -58,7 +58,7 @@ summ.PC %>%
5858
geom_hline(yintercept=0) +
5959
coord_flip(ylim=c(-0.4, 0.25)) +
6060
xlab("k") + ylab("Mean error (relative to average true effect size of studies submitted to p-curve)") +
61-
facet_grid(tau.label~selProp.label~qrp.label) +
61+
facet_grid(tau.label~censor~qrp.label) +
6262
theme_bw() + ggtitle("Posified effect size estimates, all p-curves (i.e., >= 4 study rule not applied)")
6363

6464
ggsave("Plots/ME_AEO_pos.jpg", dpi=120)
@@ -74,7 +74,7 @@ summ.PC %>%
7474
geom_hline(yintercept=0) +
7575
coord_flip(ylim=c(0, 0.8)) +
7676
xlab("k") + ylab("RMSE (relative to average true effect size of studies submitted to p-curve)") +
77-
facet_grid(tau.label~selProp.label~qrp.label) +
77+
facet_grid(tau.label~censor~qrp.label) +
7878
theme_bw() + ggtitle("Effect size estimates (keep all), all p-curves (i.e., >= 4 study rule not applied)")
7979

8080
ggsave("Plots/RMSE_AEO.jpg", dpi=120)
@@ -85,7 +85,7 @@ summ.PC %>%
8585
geom_hline(yintercept=0) +
8686
coord_flip(ylim=c(0, 0.8)) +
8787
xlab("k") + ylab("RMSE (relative to average true effect size of studies submitted to p-curve)") +
88-
facet_grid(tau.label~selProp.label~qrp.label) +
88+
facet_grid(tau.label~censor~qrp.label) +
8989
theme_bw() + ggtitle("Posified effect size estimates, all p-curves (i.e., >= 4 study rule not applied)")
9090

9191
ggsave("Plots/RMSE_AEO_pos.jpg", dpi=120)

Plots/EstimationPlot.pdf

-17 Bytes
Binary file not shown.

Plots/HypothesisTestPlot.pdf

0 Bytes
Binary file not shown.

Plots/ME_AEO_raw.jpg

205 KB
Loading

Plots/RMSE_AEO.jpg

210 KB
Loading

dataFiles/hyp.wide.RData

2 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)