library(tidyverse)
## ── Attaching packages ────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.1.0 ✔ purrr 0.3.2
## ✔ tibble 2.1.1 ✔ dplyr 0.8.0.1
## ✔ tidyr 0.8.3 ✔ stringr 1.4.0
## ✔ readr 1.3.1 ✔ forcats 0.3.0
## ── Conflicts ───────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library("wesanderson")
library(RColorBrewer)
source("../util_defs.R") # contains color schemes and methods to include
Set input/output paths.
datadir <- "data"
outdir <- "2018-11-05"
knitr::opts_chunk$set(fig.path = "figs/", dev = c('png',"pdf"))
cols4groups <- RColorBrewer::brewer.pal(8,"Paired")[c(1:4, 7:8)]
# cols4groups <- c(wes_palette("GrandBudapest1"),wes_palette("GrandBudapest2")[1:2])
names(cols4groups) <- 1:6
Load grid parameters
load(file.path(datadir, "grid.RData"))
# number of settings
nrow(grid)
## [1] 82
head(grid)
## n pg pi_low rho tau pi_high
## 1 100 50 0.2 0.0 1 0.3
## 2 100 50 0.2 0.1 1 0.3
## 3 100 50 0.2 0.2 1 0.3
## 4 100 50 0.2 0.3 1 0.3
## 5 100 50 0.2 0.4 1 0.3
## 6 100 50 0.2 0.5 1 0.3
n_groups <- 6
files <- list.files(outdir)
files <- files[grepl(".RData", files)]
res_all <- lapply(files, function(fnm){
# load fits
load(file.path(outdir,fnm))
# add parameter info
params <- strsplit(fnm,"_")[[1]]
res$n <- as.numeric(sub("n","",params[1]))
res$p <- as.numeric(sub("p","",params[2]))
res$pi_low <- as.numeric(sub("pil","",params[3]))
res$pi_high <- 1.5*res$pi_low
res$rho <- as.numeric(sub("rho","",params[4]))
res$tau <- as.numeric(sub(".RData","",sub("tau","",params[5])))
res$iter <- 1:nrow(res)
res
}) %>% dplyr::bind_rows()
base_cols <- c("n","p","pi_low", "pi_high", "rho", "tau", "iter")
RMSE_cols <- colnames(res_all)[grep("RMSE[.]",colnames(res_all))]
time_cols <- colnames(res_all)[grep("runtime[.]",colnames(res_all))]
gamma_cols <- colnames(res_all)[grep("^gamma[.]",colnames(res_all))]
pi_cols <- colnames(res_all)[grep("^pi[.]",colnames(res_all))]
true_gamma_cols <- colnames(res_all)[grep("true.gamma[.]",colnames(res_all))]
true_pi_cols <- colnames(res_all)[grep("true.pi[.]",colnames(res_all))]
betaMSE_cols <- colnames(res_all)[grep("MSE_beta[.]",colnames(res_all))]
# base parameters
getBaseParam <- function(param){
as.numeric(names(table(grid[[param]]))[which.max(table(grid[[param]]))])
}
n_base <- getBaseParam("n")
p_base <- getBaseParam("pg")*n_groups
pi_low_base <- getBaseParam("pi_low")
rho_base <- getBaseParam("rho")
tau_base <- getBaseParam("tau")
if(!dir.exists(paste0(outdir,"_Robj"))) dir.create(paste0(outdir,"_Robj"))
save(n_base,p_base,pi_low_base,rho_base,tau_base,
file = paste0(outdir,"_Robj/base_param.Rdata"))
df_RMSE <- res_all %>% select(c(base_cols, RMSE_cols)) %>%
gather(key="method", value="RMSE", -seq_along(base_cols)) %>%
mutate(method = sub("RMSE[.]", "", method)) %>%
mutate(method = make_nicenames(method)) %>%
mutate(method_type=ifelse(method%in% methods2compare_sparse, "sparse", "dense")) %>%
filter(method %in% methods2compare_sparse | method %in% methods2compare_dense)
save(df_RMSE, file = paste0(outdir,"_Robj/df_RMSE.Rdata"))
ggRMSE_n <- df_RMSE %>%
filter(p==p_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=n, y=RMSE, col=method)) + #geom_vline(xintercept = n_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
ylab(bquote(RMSE (hat(y))))+
stat_summary(fun.y = mean, geom = "line") +
facet_wrap(~method_type, scales="fixed") + scale_y_log10()+
scale_x_continuous(breaks = seq(0,1000,200)) +
theme_bw(base_size = 15)+ scale_color_manual(values = cols4methods)
ggRMSE_p <- df_RMSE %>%
filter(n==n_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=p, y=RMSE, col=method)) + #geom_vline(xintercept = p_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +ylab(bquote(RMSE (hat(y))))+
stat_summary(fun.y = mean, geom = "line") +
facet_wrap(~method_type, scales="fixed") + scale_y_log10()+
scale_x_continuous(breaks = seq(0,2000,500)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4methods)
ggRMSE_pi <- df_RMSE %>%
filter(n==n_base, p == p_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=pi_low, y=RMSE, col=method)) + #geom_vline(xintercept = pi_low_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") + facet_wrap(~method_type, scales="fixed") +
xlab(expression(nu)) + ylab(bquote(RMSE (hat(y)))) +
scale_y_log10() + scale_x_continuous(breaks = seq(0,1,0.5)) +
theme_bw(base_size = 15)+ scale_color_manual(values = cols4methods)
ggRMSE_rho <- df_RMSE %>%
filter(n==n_base, p == p_base, pi_low == pi_low_base, tau==tau_base) %>%
ggplot(aes(x=rho, y=RMSE, col=method)) + #geom_vline(xintercept = rho_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") + xlab(expression(rho)) +
facet_wrap(~method_type, scales="fixed") + scale_y_log10()+ylab(bquote(RMSE (hat(y)))) +
scale_x_continuous(breaks = c(0,0.5,0.9)) + theme_bw(base_size = 15) +
scale_color_manual(values = cols4methods)
ggRMSE_tau <- df_RMSE %>%
filter(n==n_base, p == p_base, pi_low == pi_low_base, rho == rho_base) %>%
ggplot(aes(x=tau, y=RMSE, col=method)) + #geom_vline(xintercept = tau_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") + xlab(expression(tau)) +
facet_wrap(~method_type, scales="fixed") + scale_x_log10(breaks = c(0.1,10)) +
scale_y_log10() + ylab(bquote(RMSE (hat(y)))) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4methods)
gg_legend <- get_legend(ggRMSE_n + guides(col=guide_legend(ncol=2, title = "")))
cowplot::plot_grid(ggRMSE_p + guides(col=FALSE), ggRMSE_n + guides(col=FALSE),
ggRMSE_pi + guides(col=FALSE), ggRMSE_rho + guides(col=FALSE),
ggRMSE_tau+ guides(col=FALSE), gg_legend, ncol=3)
gg_RMSE <- cowplot::plot_grid(ggRMSE_p + guides(col=FALSE)+ theme(strip.text = element_blank()),
ggRMSE_n + guides(col=FALSE)+ theme(strip.text = element_blank()),
ggRMSE_pi + guides(col=FALSE)+ theme(strip.text = element_blank()),
ggRMSE_rho + guides(col=FALSE)+ theme(strip.text = element_blank()),
ggRMSE_tau+ guides(col=FALSE) + theme(strip.text = element_blank()),
ncol=1, labels = letters[1:5], label_size = 20)
df_MSEbeta <- res_all %>% select(c(base_cols, betaMSE_cols)) %>%
gather(key="method", value="MSE", -seq_along(base_cols)) %>%
mutate(RMSE = sqrt(MSE)) %>%
mutate(method = sub("MSE_beta[.]", "", method)) %>%
mutate(method = make_nicenames(method)) %>%
mutate(method_type=ifelse(method %in% methods2compare_sparse, "sparse", "dense")) %>%
filter(method %in% methods2compare_sparse | method %in% methods2compare_dense)
save(df_MSEbeta, file = paste0(outdir,"_Robj/df_MSEbeta.Rdata"))
ggMSEbeta_n <- df_MSEbeta %>%
filter(p==p_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=n, y=RMSE, col=method)) +# geom_vline(xintercept = n_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") + facet_wrap(~method_type, scales="fixed") +
scale_x_continuous(breaks = seq(0,1000,200)) + ylab(bquote(RMSE (hat(beta)))) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4methods)
ggMSEbeta_p <- df_MSEbeta %>%
filter(n==n_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=p, y=RMSE, col=method)) +# geom_vline(xintercept = p_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") +facet_wrap(~method_type, scales="fixed") +
scale_x_continuous(breaks = seq(0,2000,500)) + ylab(bquote(RMSE (hat(beta)))) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4methods)+
coord_cartesian(ylim=c(0, 120)) # cut off strong outliers for group lasso from plot
ggMSEbeta_pi <- df_MSEbeta %>%
filter(n==n_base, p == p_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=pi_low, y=RMSE, col=method)) + # geom_vline(xintercept = pi_low_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") + facet_wrap(~method_type, scales="fixed") +
xlab(expression(nu)) + ylab(bquote(RMSE (hat(beta)))) +
scale_x_continuous(breaks = seq(0,1,0.5)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4methods)
ggMSEbeta_rho <- df_MSEbeta %>%
filter(n==n_base, p == p_base, pi_low == pi_low_base, tau==tau_base) %>%
ggplot(aes(x=rho, y=RMSE, col=method)) +# geom_vline(xintercept = rho_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") + facet_wrap(~method_type, scales="fixed") +
scale_x_continuous(breaks = c(0,0.5,0.9)) +xlab(expression(rho)) + ylab(bquote(RMSE (hat(beta)))) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4methods)
ggMSEbeta_tau <- df_MSEbeta %>%
filter(n==n_base, p == p_base, pi_low == pi_low_base, rho == rho_base) %>%
ggplot(aes(x=tau, y=RMSE, col=method)) +# geom_vline(xintercept = tau_base, lty="dashed") +
stat_summary(fun.data = mean_se, geom="errorbar", width=0) +
stat_summary(fun.y = mean, geom = "line") + facet_wrap(~method_type, scales="fixed") +
scale_x_log10(breaks = c(0.1,10)) + xlab(expression(tau)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4methods) + ylab(bquote(RMSE (hat(beta))))
gg_legend <- get_legend(ggMSEbeta_n + guides(col=guide_legend(ncol=1, title = "")))
cowplot::plot_grid(ggMSEbeta_p + guides(col=FALSE),
ggMSEbeta_n + guides(col=FALSE),
ggMSEbeta_pi + guides(col=FALSE),
ggMSEbeta_rho + guides(col=FALSE),
ggMSEbeta_tau+ guides(col=FALSE),
gg_legend, ncol=3)
gg_RMSE_beta <- cowplot::plot_grid(ggMSEbeta_p + guides(col=FALSE) +
theme(strip.text = element_blank()),
ggMSEbeta_n + guides(col=FALSE) +
theme(strip.text = element_blank()),
ggMSEbeta_pi + guides(col=FALSE) +
theme(strip.text = element_blank()),
ggMSEbeta_rho + guides(col=FALSE) +
theme(strip.text = element_blank()),
ggMSEbeta_tau+ guides(col=FALSE) +
theme(strip.text = element_blank()),
ncol=1)
gg_sparse <- filter(df_MSEbeta, method %in% methods2compare_sparse) %>%
ggplot(aes(x=n,y=MSE, col=method)) +geom_line() +
scale_color_manual(values = cols4methods) +theme_bw(base_size = 18)+
guides(col=guide_legend(title="methods (sparse)", ncol=2))
gglegend_sparse <- get_legend(gg_sparse)
gg_dense <- filter(df_MSEbeta, method %in% methods2compare_dense) %>%
ggplot(aes(x=n,y=MSE, col=method)) +geom_line()+
scale_color_manual(values = cols4methods) +theme_bw(base_size = 18) +
guides(col=guide_legend(title="methods (dense)", ncol=2))
gglegend_dense <- get_legend(gg_dense)
cowplot::plot_grid( gglegend_dense,gglegend_sparse,
gg_RMSE, gg_RMSE_beta,
ncol=2, rel_heights = c(1,7))
df_pi_true <- dplyr::select(res_all, c(base_cols, true_pi_cols)) %>%
gather(key="group", value="pi_true", true_pi_cols) %>%
mutate(group = sub("true.pi.","", group))
df_pi <- dplyr::select(res_all, c(base_cols, pi_cols)) %>%
gather(key="group", value="pi", pi_cols)%>%
mutate(group = sub("pi.","", group))
df_pi_joint <- plyr::join(df_pi, df_pi_true, by=c(base_cols,"group"))
df_pi_joint <- mutate(df_pi_joint, sparse_group = group %in% c(1,3,5))
save(df_pi_joint, file = paste0(outdir,"_Robj/df_pi_joint.Rdata"))
ggpi_n <- df_pi_joint %>%
filter(p==p_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=n, y=pi, col=group)) + #geom_vline(xintercept = n_base, lty="dashed") +
geom_hline(aes(yintercept = pi_true)) +ylim(c(0,1))+
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~ sparse_group, nrow=1) + ylab(expression(hat(pi))) +
scale_x_continuous(breaks = seq(0,1000,200)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
ggpi_p <- df_pi_joint %>%
filter(n==n_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=p, y=pi, col=group)) +
#geom_vline(xintercept = p_base, lty="dashed") +
geom_hline(aes(yintercept = pi_true)) +ylim(c(0,1)) +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~ sparse_group, nrow=1) + ylab(expression(hat(pi))) +
scale_x_continuous(breaks = seq(0,2000,500)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
ggpi_pi <- df_pi_joint %>%
filter(p==p_base, n == n_base, rho == rho_base) %>%
ggplot(aes(x=pi_low, y=pi, col=group)) + geom_line(aes(x=pi_low, y=pi_true), col ="black") +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~ sparse_group, nrow=1) +ylim(c(0,1)) +
ylab(expression(hat(pi))) + xlab(expression(nu)) +
scale_x_continuous(breaks = c(0.1,0.5,0.9)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
ggpi_rho <- df_pi_joint %>%
filter(n==n_base, pi_low == pi_low_base, p == p_base, tau==tau_base) %>%
ggplot(aes(x=rho, y=pi, col=group)) +
#geom_vline(xintercept = rho_base, lty="dashed") +
geom_hline(aes(yintercept = pi_true)) +ylim(c(0,1)) +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~ sparse_group, nrow=1) +
ylab(expression(hat(pi))) +xlab(expression(rho)) +
scale_x_continuous(breaks = c(0.1,0.5,0.9)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
ggpi_tau <- df_pi_joint %>%
filter(n==n_base, pi_low == pi_low_base, p == p_base, rho==rho_base) %>%
ggplot(aes(x=tau, y=pi, col=group)) +
#geom_vline(xintercept = tau_base, lty="dashed") +
geom_hline(aes(yintercept = pi_true)) +ylim(c(0,1)) +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~ sparse_group, nrow=1) +scale_x_log10(breaks = c(0.1,10)) +
scale_color_manual() +ylab(expression(hat(pi)))+ xlab(expression(tau)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
cowplot::plot_grid(ggpi_n, ggpi_p, ggpi_pi, ggpi_rho, ggpi_tau, ncol = 1)
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
df_gamma_true <- select(res_all, c(base_cols, true_gamma_cols)) %>%
gather(key="group", value="gamma_true", true_gamma_cols) %>%
mutate(group = sub("true.gamma.","", group))
df_gamma <- select(res_all, c(base_cols, gamma_cols)) %>%
gather(key="group", value="gamma", gamma_cols)%>%
mutate(group = sub("gamma.","", group))
df_gamma_joint <- plyr::join(df_gamma, df_gamma_true, by=c(base_cols,"group"))
save(df_gamma_joint, file = paste0(outdir,"_Robj/df_gamma_joint.RData"))
gggamma_n <- df_gamma_joint %>%
filter(p==p_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=n, y=gamma, col=group)) + #geom_vline(xintercept = n_base, lty="dashed") +
geom_hline(aes(yintercept = gamma_true)) +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~gamma_true, nrow=1) + ylab(expression(hat(gamma))) +
scale_y_log10()+scale_y_log10() +
scale_x_continuous(breaks = seq(0,1000,200)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
gggamma_p <- df_gamma_joint %>%
filter(n==n_base, pi_low == pi_low_base, rho == rho_base, tau==tau_base) %>%
ggplot(aes(x=p, y=gamma, col=group)) + #geom_vline(xintercept = p_base, lty="dashed") +
geom_hline(aes(yintercept = gamma_true)) +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~gamma_true, nrow=1) +
ylab(expression(hat(gamma))) + scale_y_log10() +
scale_x_continuous(breaks = seq(0,2000,500)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
gggamma_pi <- df_gamma_joint %>%
filter(p==p_base, n == n_base, rho == rho_base) %>%
ggplot(aes(x=pi_low, y=gamma, col=group)) + geom_hline(aes(yintercept = gamma_true)) +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~ gamma_true, nrow=1) +scale_y_log10() +
ylab(expression(hat(gamma))) + xlab(expression(nu)) +
scale_x_continuous(breaks = c(0.1,0.5,0.9)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
gggamma_rho <- df_gamma_joint %>%
filter(n==n_base, pi_low == pi_low_base, p == p_base, tau==tau_base) %>%
ggplot(aes(x=rho, y=gamma, col=group)) +
#geom_vline(xintercept = rho_base, lty="dashed") +
geom_hline(aes(yintercept = gamma_true)) +
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~ gamma_true, nrow=1) + scale_y_log10() +
ylab(expression(hat(gamma))) + xlab(expression(rho)) +
scale_x_continuous(breaks = c(0.1,0.5,0.9)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
gggamma_tau <- df_gamma_joint %>%
filter(n==n_base, pi_low == pi_low_base, p == p_base, rho==rho_base) %>%
ggplot(aes(x=tau, y=gamma, col=group)) +
# geom_vline(xintercept = tau_base, lty="dashed") +
geom_hline(aes(yintercept = gamma_true)) + scale_y_log10() +
ylab(expression(hat(gamma))) + xlab(expression(tau))+
stat_summary(geom = "line") + geom_point(size=0.5) +
facet_wrap(~gamma_true, nrow=1) + scale_x_log10(breaks = c(0.1,10)) +
theme_bw(base_size = 15) + scale_color_manual(values = cols4groups)
cowplot::plot_grid(gggamma_n, gggamma_p, gggamma_pi,
gggamma_rho, gggamma_tau, ncol = 1)
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
lower <- cowplot::plot_grid(gggamma_n + guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
ggpi_n + guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
gggamma_p+ guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
ggpi_p+ guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
gggamma_pi+ guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
ggpi_pi + guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
gggamma_rho+ guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
ggpi_rho+ guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
gggamma_tau+ guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
ggpi_tau+ guides(col=FALSE)+
theme(strip.background = element_blank(),
strip.text.x = element_blank()),
ncol = 2, rel_widths = c(3,2),
labels = sapply(seq(1,5.5,0.5), function(i) {
ifelse(i%%1==0, letters[i], "")
}),
label_size = 20)
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
cowplot::plot_grid(get_legend(gggamma_n + guides(color = guide_legend(ncol=6,title.position = "left"))),
lower, rel_heights = c(1,20), ncol=1)
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
## No summary function supplied, defaulting to `mean_se()
sessionInfo()
## R version 3.5.3 (2019-03-11)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Mojave 10.14.4
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_IE.UTF-8/en_IE.UTF-8/en_IE.UTF-8/C/en_IE.UTF-8/en_IE.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] RColorBrewer_1.1-2 wesanderson_0.3.6 forcats_0.3.0
## [4] stringr_1.4.0 dplyr_0.8.0.1 purrr_0.3.2
## [7] readr_1.3.1 tidyr_0.8.3 tibble_2.1.1
## [10] ggplot2_3.1.0 tidyverse_1.2.1 BiocStyle_2.10.0
##
## loaded via a namespace (and not attached):
## [1] tidyselect_0.2.5 xfun_0.4 haven_2.0.0
## [4] lattice_0.20-38 colorspace_1.4-1 generics_0.0.2
## [7] htmltools_0.3.6 yaml_2.2.0 rlang_0.3.2
## [10] pillar_1.3.1 glue_1.3.1 withr_2.1.2
## [13] modelr_0.1.2 readxl_1.2.0 plyr_1.8.4
## [16] munsell_0.5.0 gtable_0.2.0 cellranger_1.1.0
## [19] rvest_0.3.2 evaluate_0.12 labeling_0.3
## [22] knitr_1.21 broom_0.5.1 Rcpp_1.0.1
## [25] scales_1.0.0 backports_1.1.3 BiocManager_1.30.4
## [28] jsonlite_1.6 hms_0.4.2 digest_0.6.18
## [31] stringi_1.4.3 bookdown_0.9 cowplot_0.9.4
## [34] grid_3.5.3 cli_1.1.0 tools_3.5.3
## [37] magrittr_1.5 lazyeval_0.2.2 crayon_1.3.4
## [40] pkgconfig_2.0.2 xml2_1.2.0 lubridate_1.7.4
## [43] assertthat_0.2.1 rmarkdown_1.11 httr_1.4.0
## [46] rstudioapi_0.9.0 R6_2.4.0 nlme_3.1-137
## [49] compiler_3.5.3