PAL_AMPM adaptive fitting estimates too low threshold

Post Reply
rosagro
Posts: 1
Joined: Fri Jan 17, 2025 2:42 am

PAL_AMPM adaptive fitting estimates too low threshold

Post by rosagro »

I am using the Palamedes toolbox to estimate the psychometric curve for a somatosensory near-threshold detection task.
The issue is that the curve does not fit correctly, specifically it estimates a too low threshold (the estimated intensity for 50% Yes is too low). I suspected that my data is the issue since it might be too noisy, so I simulated the response by sampling from a logistic psychometric curve. Still, in almost all cases the estimated threshold is lower than the one that was defined in the simulated curve. Example: the correct threshold would be 2.4 and the average fitting result is 2.3 in 10 fitting procedures.

I use the following parameter:
stim_range = 0.8:.045:4.1
priorAlphaSteps = .05
priorBetaRange = 0.5:.1:7;
priorGammaRange = 0;
priorLambdaRange = 0;
UD_range_factor = [.75; 1.25];
... and the estimation routine looks like this:
1. Setting Up/Down method to define prior alpha range using PAL_AMUD_setupUD
2. Running Up/Down method using PAL_AMUD_updateUD (for 25 trials)
3. Analyze Up/Down method:

Code: Select all

data.UD_mean = PAL_AMUD_analyzeUD(UD,UD_stopCriterion,UD_meanNumber);
% Compute intensity range of trials used for mean
data.UD_range = [min(UD.x(end-UD_meanNumber-1:end)) max(UD.x(end-UD_meanNumber-1:end))];            
% Define prior alpha range ± UD_range_factor of up/down mean range
tmp_priorAlphaRange = data.UD_range(1)*UD_range_factor(1):priorAlphaSteps:data.UD_range(2)*UD_range_factor(2);
% Define priors for psychometric function fitting
grid.alpha = tmp_priorAlphaRange;
grid.beta = priorBetaRange;
grid.gamma = priorGammaRange;
grid.lambda = priorLambdaRange;
% Compute intensity - response frequency matrix of up/down method
data.x_resp_freq_UD = count_resp([UD.x' UD.response']);
% Fit psychometric function to up/down method data
[data.PF_params_UD, data.posterior_UD] = AL_PFBA_Fit(data.x_resp_freq_UD(:,1),data.x_resp_freq_UD(:,2),data.x_resp_freq_UD(:,3),grid,@PAL_Logistic)
4. Setting up PSI Adaptive

Code: Select all

% Shift prior alpha range
tmp_priorAlphaRange = tmp_priorAlphaRange + (data.PF_params_UD(1,1)-mean(tmp_priorAlphaRange));
% Restrict stimulus range to prior alpha
tmp_stim_range = stim_range(thr1F.stim_range>=min(tmp_priorAlphaRange));
tmp_stim_range = tmp_stim_range(tmp_stim_range<=max(tmp_priorAlphaRange));
PM = PAL_AMPM_setupPM('numtrials', 45, ...
                      'stimRange', tmp_stim_range, ...
                      'PF', PF, ...
                      'priorAlphaRange', tmp_priorAlphaRange, ...
                      'priorBetaRange', priorBetaRange, ...
                      'priorGammaRange', priorGammaRange, ...
                      'priorLambdaRange', priorLambdaRange, ...
                      'prior', data.posterior_UD);    
5. Running PSI method for 45 trials using PM = PAL_AMPM_updatePM(PM, response);

I experimented with different granularities of the stimulus range and increased the PSI method trials, but it did not help. Do you have any tip how I could improve the fitting procedure? Please let me know if you need any other info to understand the issue.
User avatar
Nick Prins
Site Admin
Posts: 28
Joined: Sun Feb 13, 2022 8:55 pm

Re: PAL_AMPM adaptive fitting estimates too low threshold

Post by Nick Prins »

Hmmm... There's a lof information here. Where is the unexpected estimate coming from? From the [P]AL_PFBA_Fit line in the code? Or the value of PM.threshold after running the PSI method? Or somewhere else yet? What would really help is some code that demonstrates the issue and that needs only Matlab and Palamedes to run and does not rely on code or variables that are not included. For example the code you used to check the results using simulated responses.
Nick Prins, Administrator
Post Reply