# Fit a psychometric function when the maximum is not 100% (not because of lapse)

I found that currently the form of psychometric function assumes that the proportion correct lies between 0.5-1 given the range of stimulus level, but how to fit a psychometric function when the subject's performance never goes to 1 (and it is not because of lapse)?

An example of how this situation can happen: suppose I want to study how stimulus presentation time affect a small target's visibility in a given peripheral visual field location by a 2AFC task. The target's feature is fixed throughout the experiment. I can imagine that with longer stimulus presentation time (like 1 ms vs. 200 ms), subject can make more correct responses, but because of the limit of peripheral vision, the correct response rate can never go to 100% even if you present the stimulus for a very long time. How can I fit a psychometric function (proportion correct ~ stimulus presentation time) to data like this?

Yes. When you fit your psychometric function you try to maximize $$p(X|\theta)$$, with $$X$$ your observations and $$\theta$$ your parameters. When you assume 100% correct answers, you would typically assume that your psychometric function is $$\Phi(s|\theta)$$, $$s$$ being your stimulus value and $$\Phi$$ being a cumulative normal. More specifically $$\Phi(s|\theta)=\frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(s-\mu)^2}{2\sigma^2}}$$. Here $$\theta$$ is both the mean $$\mu$$ and the std $$\sigma$$. To have a psychometric function that does not go to 100% correct, you just need to add a third variable to $$\theta$$. It doesn't matter whether the observer's performance is limited by lapses or another factor, mathematically that's equivalent. Then you fit your data with $$\Phi'(s|\theta)=\frac{\lambda}{2}+(1-\lambda)\Phi(s|\theta)$$. With $$\lambda$$ your lapse rate, assuming this lapse rate is symmetrical. You could add a 4th parameter if you have a good reason to assume the lapse rate is different near 0 and near 1 (then $$\theta=(\mu,\sigma,\lambda_{low},\lambda_{high})$$). Also, you might run into issues because if you fit with $$\lambda$$ unconstrained, you could get values higher than 1 or lower than 0. So when fitting it is helpful either to use a constrained algorithm (e.g. a quasi-Newtonian gradient descent, in Matlab that would be fmincon), or better to transform your parameter using a function that is bounded like the cumulative normal function itself. In other words, use $$\Phi'(s|\theta)=(\frac{\Phi(\lambda_{low})}{2})+(1-\frac{\Phi(\lambda_{high})}{2})\Phi(s|\theta)$$.