Hidden_Factor_Code
The online web-page of the manuscript "The hidden factor: accounting for covariate effects in power and sample size computation for a binary trait"
-
Section 4.1-4.2: simulated datasets are generated in the R scripts.
-
Section 5: datasets are obtained from UK Biobank.
The simulation/examples in the main paper are replicated in the following scripts. Specific points to pay attention to:
- In each simulation/example, please make sure the working directory is correctly specified.
- All the required R packages will be loaded in the R script, please make sure they are installed in the system before proceed.
The results in the paper are reproduced as follows:
- Section 4.1-4.2:
- script.R generates the dataset and runs the simulation. It will also produce the figures used in the manuscript, and save them in the current working directory.