-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreproduce.R
48 lines (40 loc) · 1.65 KB
/
reproduce.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
source("setup.R")
############### Figure 5 ###############
# compare i-FWER(-tent) with Sidak when varying alternative mean
mu_1_seq = 1:5
# grid size 10*10
result_grid10 = list()
for (i in 1:length(mu_1_seq)) {
para_vary = list(list(name = "mu_1", value = mu_1_seq[i]),
list(name = "D", value = 10))
result_grid10[[as.character(mu_1_seq[i])]] = single_experiment(para_vary)
}
save(result_grid10, file="result/tent-sidak-10.Rdata")
# grid size 30*30
result_grid30 = list()
for (i in 1:length(mu_1_seq)) {
para_vary = list(list(name = "mu_1", value = mu_1_seq[i]))
result_grid30[[i]] = single_experiment(para_vary)
}
save(result_grid30, file="result/tent-sidak-30.Rdata")
############### Figure 7 ###############
# compare i-FWER-tent with i-FWER-railway when varying null mean
mu_0_seq = 0:-4
result_railway = list()
for (i in 1:length(mu_0_seq)) {
para_vary = list(list(name = "mu_0", value = mu_0_seq[i]),
list(name = "methods", value = c("Sidak", "i-fwer-tent", "i-fwer-railway")),
list(name = "smoothed", value = FALSE))
result_railway[[as.character(mu_0_seq[i])]] = single_experiment(para_vary)
}
save(result_railway, file = "result/tent-railway.Rdata")
############### Figure 8 ###############
# compare i-FWER-tent with i-FWER-gap when varying alternative mean
mu_1_seq = 1:5
result_gap = list()
for (i in 1:length(mu_1_seq)) {
para_vary = list(list(name = "mu_1", value = mu_1_seq[i]),
list(name = "methods", value = c("Sidak", "i-fwer-tent", "i-fwer-gap")))
result_gap[[as.character(mu_1_seq[i])]] = single_experiment(para_vary)
}
save(result_gap, file = "result/tent-gap.Rdata")