This is the code and data repository for Guest, Rajappa, and Oxenham (2024), "Profile analysis at high frequencies."
Raw data are available in subfolders of data/exp_raw, organized in the following way:
- Experiment 1a:
0.1_screen_audibility(screening data),1.1_profile_analysis(roved), and1.1c_profile_analysis_control(unroved) - Experiment 1b:
0.1_screen_audibility_extra_2024(screening data),1.1_profile_analysis_extra_2024(roved), and1.1c_profile_analysis_control_extra_2024(unroved) - Experiment 2a:
1.2c_ripple_discrimination_control(detection) and1.2_ripple_discrimination(discrimination) - Experiment 2b:
1.2c_ripple_discrimination_control_extra_2024(detection) and1.2_ripple_discrimination_extra_2024(discrimination) - Experiment 3:
0.2_measure_thresholds_extra_2024Each subfolder contains adatafolder, containing thresholds measured in each run, and acontrolfolder, containing information about the order in which conditions were randomized for each participant. The files are tagged with participant ids in the formx00, where00is the participant ID.
For convenience, preprocessed data are available in the following files in the data/exp_pro folder:
profile_analysis_restricted.csvAll listeners' level-discrimination and profile-analysis data from the final six runs of each condition in Experiment 1a, used to generate Figure 2profile_analysis_extra_2024_restricted.csvAll listeners' level-discrimination and profile-analysis data from the final three runs of each condition in Experiment 1b, used to generate Figure 3ripple_discrimination.csvAll listeners' ripple detection and discrimination data from Experiment 1a, used to generate Figure 4ripple_discrimination_extra_2024.csvAll listeners' ripple detection and discrimination data from Experiment 1b, used to generate Figure 50.2_measure_thresholds_extra_2024_clean_data.csvAll listeners' tone-in-noise detection data from Experiment 3, used to generate Figure 6
In all data files, each row is data from a single run. Columns are labeled and indicate the following:
n_comp: Component density (1, 3, 5, 9, or 15)freq: Frequency condition (Low or High) or tone frequency (in Hz)subj: Subject IDthreshold: Threshold estimate for runtask: Either "Control" (level discrimination/unroved, for profile analysis, or detection, for ripples) or "Task" (roved, for profile analysis, or discrimination, for ripples)order: Only for Experiment 1b, a value of1indicates that unroved was competed first while a value of2indicates that roved was completed first
To reproduce our results:
-
Download this repository and install recent versions of R and Julia.
-
Set the working directories of your R/Julia interpreters to the folder containing this README file.
-
Install necessary R packages (dplyr, lme4, car, phia, and effects should suffice)
-
Set up your Julia environment using the package included in this repository. Opening your interpreter, pressing
]to open the package manager, and then typingactivate .followed byinstantiate, should do the trick.
The following option steps can be performed if you want to preprocess the raw data, but are unnecessary as the results of this preprocessing step are already included in this repository:
-
Run the contents of
src/process.Rto create aggregate.csvfiles from each individual participant's raw.datfiles -
Run the contents of
src/compile.Rto join data from different flavors of the same experiment (e.g., roved and unroved profile analysis) -
Run the contents of
src/add_order_info.jlto add run-order information to the compiled.csvfiles -
Run the contents of
src/subset_data_to_last_six_pa.jlto subset the profile-analysis data to the last six runs
Next, use these steps to compute our statistics:
- Run the contents of
src/model_profile_analysis.Rto model data in Experiment 1a,src/model_profile_analysis_extra_2024.Rfor Experiment 1b,src/model_ripples.Rfor Experiment 2a,src/model_ripples_extra_2024.Rfor Experiment 2b, andsrc/model_thresholds_ten.Rfor Experiment 3
Finally, use these steps to generate figures (or subfigures, as in some cases subfigures are assembled manually in Inkscape):
- Run the contents of
genfigs.jlto generate each figure/subfigure. The intro figures and Figure 2 can take a bit to generate, but otherwise they should go quickly after precompilation is done. The contents ofgenfigs.jlare commented to make it clear which functions correspond to which figures.