Modeling psychophysical data in R