Page 1 of 1

Telling the Psi object that intensities of zero are impossible

Posted: Wed Feb 08, 2023 6:23 am
by Matt J Dunn
I'm running an experiment in which an intensity of zero is certainly impossible to perceive. I want to avoid a Psi object choosing to present several trials at zero, since I already know what the outcome of this will be (50% seen for a 2AFC task). Of course there is value in occasionally presenting 'catch trials', but I'm not sure there is a good reason to present so many trials at intensity == 0.

Is there some way to tell the Psi object (PAL_AMPM) that the psychometric function will have asymptoted at the guess rate at intensity == 0? One workaround I can think of would be to store 1000 'dummy trials' in the Psi object prior to beginning the experiment, but I wonder if this could cause problems? My code for this would be as follows:

Code: Select all

for i = 1:500
    PM = PAL_AMPM_updatePM(PM,true,'xIndex',1); % correct response at intensity == 0
    PM = PAL_AMPM_updatePM(PM,false,'xIndex',1); % incorrect response at intensity == 0
end
Note that for the above code, I have already set stimRange so that the first entry is 0.

Re: Telling the Psi object that intensities of zero are impossible

Posted: Wed Feb 08, 2023 3:48 pm
by Nick Prins
The proper way to do this would be to use a form of PF that evaluates to the guess rate whenever x = 0. That would be the Weibull or the Quick (these are really the same function just parameterized differently, see here: https://www.palamedestoolbox.org/weibullandfriends.html). That is: Regardless of the values for a, b, and l, PAL_Weibull([a b g l], 0) will evaluate to g. Same for PAL_Quick([a b g l], 0). Similarly, you can use any other PF form but use log-transformed values for your stimuli. In case of Gumbel or log-Quick this would be equivalent to using untransformed intensities and Weibull or Quick respectively (see same page referenced above). Presenting a zero magnitude stimulus would then correspond to an intensity of ‘-Inf’. I’m pretty sure that you can use ‘-Inf’ in the PAL_AMPM routines (and many, possibly all, others) the same way you would use finite numbers (e.g., PAL_Logistic([1 1 0 0],-Inf) evaluates just fine to 0). The method of course would never choose intensity 0 (if using Weibull or Quick) or intensity -Inf (if using log transformed intensities) because no information whatsoever is going to be gained by that. When your guess rate is fixed anyway. But you can force the method to use 0 if you have a reason to do so (note to readers other than Matt who are reading this prior to release of version 1.11.3. ‘Coming soon: The ability to force the psi-marginal method to use the intensity you want to present!’).
The method you suggest is going to affect the estimates of parameters (if you’re using a form of PF that does not evaluate to the guess rate at x = 0).