Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
haziqj committed May 1, 2023
1 parent 15ca84c commit a10b74e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions 03-sims_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,22 @@ plot_df <-
sim = factor(sim, levels = c("Uncorrelated", "Correlated", "Overall")))

levels(plot_df$method) <- c("I-prior", "Lasso", "Spike & Slab", "g-prior")
levels(plot_df$sim) <- c("Uncorrelated\ncovariates", "Correlated\ncovariates",
"Overall")

ggplot(plot_df, aes(method, prop, fill = sim)) +
plot_df %>%
filter(sim != "Overall") %>%
ggplot(aes(method, prop, fill = sim)) +
geom_bar(stat = "identity", position = "dodge") +
geom_text(aes(label = iprior::dec_plac(prop, 2)), vjust = -0.2,
position = position_dodge(1)) +
scale_fill_manual(values = my_cols[1:3]) +
labs(x = NULL, y = "Proportion correct selection", fill = NULL)
scale_fill_manual(values = my_cols[c(3, 1)]) +
labs(x = NULL, y = "Proportion correct selection", fill = NULL) +
theme(axis.text.x = element_text(size = 12),
axis.text.y = element_text(size = 11),
axis.title.y = element_text(size = 12)) +
theme(legend.spacing.y = unit(0.25, 'cm')) +
guides(fill = guide_legend(byrow = TRUE))

# ggsave("simres.pdf", width = 8, height = 4)

Expand Down
Binary file modified figure/overall_plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a10b74e

Please sign in to comment.