There are four types of R-scripts in this repository, each with a separate folder.
custom_functions/
:
Custom R-functions written for this project0_simulations/
:
Simulation scripts for power and DDM analyses1_data_prep/
:
Data processing scripts2_analyses/
:
Primary and exploratory analysis scriptsEach script takes an input(s) and produces output(s). All outputs are stored in analysis_objects/. The tables below provides an overview of the inputs and outputs of each script.
script | input | output |
---|---|---|
ddm_missing_imputation.R | lmt_cleandata_suffix.csv | results_sim5.RData ddm_sim5_results.RData |
ddm_trial_simulations.R | ddm_sim1_results.RData ddm_sim2_results.RData ddm_sim3_results.RData |
|
ddm_validity_checks.R | ddm_sim4_results.RData | |
power_analysis.R | power.RData |
script | input | output |
---|---|---|
1_preprocessing.R | baseline_year_1_arm_1’full.names=TRUE NIHTB’full.names=TRUE |
>str_subsetpattern=‘Narrow_Structure’ NIHTB’full.names=TRUE |
2_clean_data.R | tasks_raw.RData | lmt_clean.csv flanker_clean.csv pcps_clean.csv dccs_clean.csv exclusions.RData |
3_data_subsets.R | lmt_clean.csv flanker_clean.csv pcps_clean.csv dccs_clean.csv |
training_set.csv test_set.csv |
script | input | output |
---|---|---|
1_ddm_fit.R | lmt_cleandata_suffix.csv flanker_cleandata_suffix.csv pcps_cleandata_suffix.csv dccs_cleandata_suffix.csv |
rhat_lmt_mod1.RData ddm_lmt_mod1.RData rhat_flanker_mod2.RData ddm_lmt_mod2.RData rhat_flanker_mod1.RData ddm_flanker_mod1.RData rhat_flanker_mod2.RData ddm_flanker_mod2.RData rhat_pcps_mod1.RData ddm_pcps_mod1.RData rhat_pcps_mod2.RData ddm_pcps_mod2.RData rhat_dccs_mod1.RData ddm_dccs_mod1.RData ddm_dccs_mod2.RData rhat_dccs_mod2.RData rhat_flanker_mod1.RData mcmc_flanker_mod_explddm_flanker_mod_explfile=‘ddm_flanker_mod_expl2.RData’ |
2_ivs.R | training_setdata_suffix.csv test_setdata_suffix.csv mnlfa_ivs.csv |
> |
3_ddm_extract_results.R | lmt_cleandata_suffix.csv flanker_cleandata_suffix.csv pcps_cleandata_suffix.csv dccs_cleandata_suffix.csv ddm_lmt_mod1.RData ddm_lmt_mod2.RData ddm_flanker_mod1.RData ddm_flanker_mod2.RData ddm_dccs_mod1.RData ddm_dccs_mod2.RData ddm_pcps_mod1.RData ddm_pcps_mod2.RData ddm_flanker_mod_expl3.RData ddm_flanker_mod_expl4.RData ddm_dccs_mod_expl.RData |
ddm_lmt_mod1_parsed.RData ddm_lmt_mod2_parsed.RData ddm_flanker_mod1_parsed.RData ddm_flanker_mod2_parsed.RData ddm_dccs_mod1_parsed.RData ddm_dccs_mod2_parsed.RData ddm_pcps_mod1_parsed.RData ddm_pcps_mod2_parsed.RData ddm_data.csv ddm_lmt_mod1_orig_parsed.RData ddm_lmt_mod2_orig_parsed.RData ddm_flanker_mod1_orig_parsed.RData ddm_flanker_mod2_orig_parsed.RData ddm_dccs_mod1_orig_parsed.RData ddm_dccs_mod2_orig_parsed.RData ddm_pcps_mod1_orig_parsed.RData ddm_pcps_mod2_orig_parsed.RData ddm_flanker_mod_expl_parsed3.RData ddm_dccs_mod_expl_parsed.RData ddm_data_expl.csv |
4_sem_training.R | ddm_data.csv’ iv_datadata_suffix.csv training_setdata_suffix.csv |
results_sem_training.RData |
5_sem_test.R | ddm_data.csv’ iv_datadata_suffix.csv test_setdata_suffix.csv |
test_sem_full_clustertest_factor_input: results_sem_test.RData |
6_exploratory.R | test_set.csv iv_data.csv lmt_clean.csv ddm_data.csv’ test_set.csv results_sem_test.RData’ |
exploratory_results.RData |