# Readme
This project contains code and materials for our manuscript titled: *The *d* Factor: General Distractibility and Its Relationships with ADHD Symptoms and Hyperfocus*.
### `analysis` Folder
This folder contains all analysis scripts for results presented in the manuscript. Specifically:
* `clean_data_prolific.R` (sample 1) and `clean_data_student.R` (sample 2) read raw data, do some data cleaning and wrangling, and then export the cleaned data for analysis.
* `data analysis.R` is where the main analyses occur.
* `figure_*.R` generates figures presented in the manuscript.
* `func.R` contains helper functions used for analysis.
* `measurement_invariance.R` does measurement invariance analysis. It will read various model specifications stored in the `invariance_syntax` folder.
### `data` Folder
This folder contains the raw data (.csv) as well as cleaned data files (.Rdata) exported after data cleaning.
### `manuscript` Folder
This folder contains the rmarkdown files and other necessary files that were used to generate the PDFs for the main text, the appendix, and the supplemental materials.
### `results` Folder
This folder contains various output files generated by the analysis scripts. These files are used by the rmarkdown file to generate the final PDF.
### `Qualtrics` Folder
This folder contains the questionnaires used in this study.
For questions, please email hanzh@umich.edu. Thank you!