This .Rmd
file contains the code to reproduce the tables and figures in the paper Simultaneous SNP selection and adjustment for population structure in high dimensional prediction models. Bhatnagar et al. (2020). PLOS Genetics.
The easiest way to compile this document is to clone the https://github.com/sahirbhatnagar/ggmix repository or download the zip file https://github.com/sahirbhatnagar/ggmix/archive/master.zip. Open the file manuscript/bin/tables-figures.Rmd
in RStudio and click on the Knit button. If you don't use RStudio, then from the R
console enter rmarkdown::render("manuscript/bin/tables-figures.Rmd")
. This assumes that you have installed both the knitr
and rmarkdown
packages, and are in the root of the ggmix
folder.
The order in which the tables and figures appear follow that of the paper. The R
scripts for each Table and Figure are in separate R
files found in the manuscript/bin
folder. This .Rmd
document uses code externalization.
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE) options(digits = 4, scipen = 2) knitr::read_chunk(here::here("manuscript/bin/setup.R")) knitr::read_chunk(here::here("manuscript/bin/simulation.R")) knitr::read_chunk(here::here("manuscript/bin/GAW20.R")) knitr::read_chunk(here::here("manuscript/bin/UKB.R")) knitr::read_chunk(here::here("manuscript/bin/mice.R"))
The simulation study results were run on a cluster using the simulator package. The simulator files can be found in the simulation
folder:
simulation/main.R
contains the main file which runs the simulation. This can be thought of as a master file which in turn calls the methods, model and eval functions simulation/model_functions.R
contains the model functions, i.e., used to simulate the data simulation/method_functions.R
contains the the individual methods which are applied on the simulated data simulation/eval_functions.R
contains the functions used to evaluate the different methods r Sys.Date()
r R.version.string
r getRversion()
if (!requireNamespace("devtools")) sessionInfo() else devtools::session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.