The repo has the following directory structure.
##
## project directory
## |-- acc_form.Rmd
## | o-- object of type(s):file
## |-- jasa-repro-template.Rproj
## | o-- object of type(s):file
## |-- README.Rmd
## | o-- object of type(s):file
## |-- README.md
## | o-- object of type(s):file
## |-- analysis/
## | o-- object of type(s):dir
## |-- data/
## | o-- object of type(s):dir
## |-- manuscript/
## | o-- object of type(s):dir
## |-- output/
## | o-- object of type(s):dir
## |-- preprocessing/
## | o-- object of type(s):dir
## o-- revn/
## o-- object of type(s):dir
Each of the files and subdirectories in this repository are described below.
README.Rmd/md
: Read me explaining how to reproduce materials in this repositoryacc_form.Rmd/html
: Reproducibility checklist (not currently complete)analysis/
202112_dataAnalysis.Rmd/.html
: Code/output for processing raw paw trajectory data and generating Figures 1, 6, and 7 in the manuscript.202112_simulation_results.Rmd/.html
: Code/output for processing simulation results and generating Figures 2, 3, 4, and 5 in the manuscript.
data/
: Raw paw trajectory data (not currently included)manuscript/
: manuscript files including.Rmd
templateoutput/
: Figures, data analysis, and simulation results*.png
: Figures from the manuscriptpx_results.RData
: Data analysis x-axis results fromflode
model, executed by running202112_dataAnalysis.Rmd
.py_results.RData
: Data analysis y-axis results.pz_results.RData
: Data analysis z-axis results.simulation_results/
*.RDA
: Output from simulation scenarios executed by running scripts in../preprocessing/simulations
.
preprocessing/
: Source files for executing core modeling code, generating simulated data, and running simulationsestimate_flode.R
: Defines function for estimatingflode
model using EM algorithmmake_pffr.R
: Defines function for running functional historical regression model and processing surfaces for visualizationsearch_alpha.R
: Defines function to perform grid search over possible α0 values to choose best initial value.simulated_paw.R
: Defines function for simulating data.utils.R
: Defines helper functions called in theestimate_flode.R
file.simulations/
: File for generating simulation results across all simulation scenarios.20211227_simulations_flodeVSfhist.R
: Compares flode and functional historical regression across 9 alpha values for 30 datasets each.20211228_simulations_flode.R
: Evaluates flode across 4 sample sizes and 3 alpha values for 30 datasets each.
Describe file structure and workflow here
- Slow steps are cached or saved as R data objects that are read in the next time a file is run- this makes it faster to run the Rmarkdown files that generate analysis results
-
Execute the file
202112_simulation_results.Rmd
to create Figures 2, 3, 4 and 5 and save them as.png
files in theoutput
folder. -
Execute the file
202112_dataAnalysis.Rmd
to create Figures 1, 6, and 7 and save them as.png
files in theoutput
folder. Also creates and saves tooutput
a dataframe of computation times and parameter values that are reported as part of inline text in themanuscript.Rmd
. This allows all inlineR
code from themanuscript.Rmd
to be fully reproducible (not entered by hand). -
To generate the manuscript knit the file
manuscript.Rmd
in themanuscript
folder. This does not execute the full analysis but reads in figures and numbers in theoutput
folder generated by knitting202112_simulation_results.Rmd
and202112_dataAnalysis.Rmd
.
- easily could have this same format whether manuscripts are generated using R Markdown or Latex
- probably best to have users clone the repo rather than fork it so they can rename it?