This project develops computational models of audiovisual temporal recalibration. It includes scripts for:
- Experiments
- Model fitting (Bayesian optimization and parameter estimation)
- GUI-based simulations
- Plotting utilities for reproducing figures in the paper.
- Download dependencies: Install Psychtoolbox for experiment scripts. Install VBMC for Bayesian model fitting.
- Download precomputed results
fit_results.zipfrom OSF and unzip it into the project root. - Add the project folders to your MATLAB path.
- Local fitting: Run the
run_local.mscript underrecalibration_modelsto fit all recalibration models or a specific one. - Cluster fitting: Modify script to run
fit_recal_model.mto submit jobs via your cluster’s scheduling system. - Recalibration models:
caulnf_asymCausal-inference model, modality-specific temporal precisioncaulnf_symCausal-inference model, modality-independent temporal precisioncaulnf_asym_updateA variant of the causal-inference model, modality-specific temporal precision, mentioned in Appendix 12heu_asymAsynchrony-contingent model, modality-specific temporal precisionheu_symAsynchrony-contingent model, modality-independent temporal precisiontrigger_asymAsynchrony-correction model, modality-specific temporal precisiontrigger_symAsynchrony-correction model, modality-independent temporal precision
Run the model_recovery_s1.m, model_recovery_s2.m, and model_recovery_s3.m sequentially. Alternatively, modify and combine them to create a full pipeline.
Use the param_recovery.m script to run parameter recovery for a specific model (default: causal-inference model with modality-specific precision). Modify the currModelStr variable to test other models.
Launch the modelGUI.mlapp from the respective model subfolder if it exists (e.g., recalibration_models/caulnf_asym). Ensure your MATLAB working directory matches the model folder.
Run the plotting scripts in the figures folder to regenerate figures from the paper. Requires the fit_results folder in the root directory.
- Path errors: Ensure all folders (especially
fit_resultsanddata) are in the root directory. - Missing dependencies: Confirm Psychtoolbox and VBMC are installed and added to MATLAB’s path.
- GUI issues: Use MATLAB ≥2021b for compatibility with
.mlappfiles.
For questions or bugs, contact Luhe Li.
Include error logs and MATLAB version when reporting issues.