This model-fitting tutorial was created for the graduate-level course in Psychophysics at NYU. It is composed of 3 modules.
Module 1 shows how to fit a standard psychometric function in Matlab (a common programming language in the field) using a variety of maximum-likelihood estimation techniques.
Modele 2 shows then how to compare model fits (in Matlab) using a variety of model-comparison metrics.
Module 3 shows how to fit a hierarchical Bayesian model to group data in a signal-detection task using the R and Stan programming languages.
I hope that the tutorial can provide a both a good foundation for psychophysicists to understand the well-loved psychometric function, as well as provide a bridge to more complex analyses and techniques such as model comparison and fitting hierarchical models with the probabilistic programming language Stan.