Skip to content

Commit

Permalink
fixed one inconsequential typo in Functions.R; one edit to the random…
Browse files Browse the repository at this point in the history
… seed; added code for making color versions of the figure.
  • Loading branch information
psboonstra committed Aug 14, 2018
1 parent 4783d0b commit 10294a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Functions.R
Expand Up @@ -828,7 +828,7 @@ run.sim <- function(sim_number,

begin_all = Sys.time();
set.seed(random_seed);
data_seeds = sample(2^30.999,n_sim);
data_seeds = sample(.Machine$integer.max,n_sim);
informational_messages = list();

stopifnot(class(sab_imputes_list) == "list");
Expand Down Expand Up @@ -858,7 +858,7 @@ run.sim <- function(sim_number,
rm(sab_suffix);

if("Historical" %in% skip_methods) {
skip_methods = intersect(skip_methods, c("NAB","NAB_dev","SAB","SAB_dev"));
skip_methods = union(skip_methods, c("NAB","NAB_dev","SAB","SAB_dev"));
informational_messages = c(informational_messages, paste0("Skipping all adaptive Bayesian methods because because Historical was skipped"));
}
if(("NAB" %in% skip_methods && !"NAB_dev" %in% skip_methods) || ("SAB" %in% skip_methods && !"SAB_dev" %in% skip_methods)) {
Expand Down
10 changes: 6 additions & 4 deletions makeFigures.R
Expand Up @@ -213,7 +213,7 @@ ggplot(filter(figure1_results,beta_label < 6, x_orig_binom == T),
outlier.size = 0.5,
size = 0.2) +
facet_grid(pretty_n_curr_label~pretty_beta_label, labeller = label_parsed) +
scale_fill_grey() +
#scale_fill_grey() +
scale_color_grey(start = 0, end = 0) +
scale_y_continuous(trans = "log2",
breaks = 2^seq(-3, 1, by = 0.5),
Expand All @@ -230,7 +230,8 @@ ggplot(filter(figure1_results,beta_label < 6, x_orig_binom == T),
legend.text = element_text(size=12),
legend.position = "top",
legend.text.align = 0);
ggsave(paste0(write_path,"/fig1a.eps"),height = 5., width = 9);
#ggsave(paste0(write_path,"/fig1a.eps"),height = 5., width = 9);
ggsave(paste0(write_path,"/fig1aCOLOR.eps"),height = 5., width = 9);
#
ggplot(filter(figure1_results,beta_label %in% c(6:10), x_orig_binom == T),
aes(x = factor(n_hist),
Expand All @@ -244,7 +245,7 @@ ggplot(filter(figure1_results,beta_label %in% c(6:10), x_orig_binom == T),
outlier.size = 0.5,
size = 0.2) +
facet_grid(pretty_n_curr_label~pretty_beta_label, labeller = label_parsed) +
scale_fill_grey() +
#scale_fill_grey() +
scale_color_grey(start = 0, end = 0) +
scale_y_continuous(trans = "log2",
breaks = 2^seq(-4,0,by=1),
Expand All @@ -262,7 +263,8 @@ ggplot(filter(figure1_results,beta_label %in% c(6:10), x_orig_binom == T),
legend.text = element_text(size=12),
legend.position = "top",
legend.text.align = 0);
ggsave(paste0(write_path,"/fig1b.eps"),height = 4.75, width = 9);
#ggsave(paste0(write_path,"/fig1b.eps"),height = 4.75, width = 9);
ggsave(paste0(write_path,"/fig1bCOLOR.eps"),height = 4.75, width = 9);


summary(filter(figure1_results,beta_label <= 5, n_hist == 100, n_curr == 100, x_orig_binom == T, variable %in% c("SAB(agnostic)/Standard"))[,"value"]);
Expand Down

0 comments on commit 10294a2

Please sign in to comment.