¬°ERROR!

The program t_reaccion2histog_carpenter was wrong. All Carpenter-like plots in previous posts are wrong.

Carpenter plots of Subject 1, raw

>> load S1_bruto
>> cd ..
>> [corr_S1(1),proc_S1(1)]=salida2procesados(S1_f50);
>> [corr_S1(2),proc_S1(2)]=salida2procesados(S1_f80);
>> corr_S1=correctos2correctos_filtrado(corr_S1,[1 1.5]);
>> t_reaccion2histog_carpenter(corr_S1(1).t_reaccion(:,1),20)
>> hold on
>> t_reaccion2histog_carpenter(corr_S1(2).t_reaccion(corr_S1(2).dcha,1),20,’r.-‘)
>> t_reaccion2histog_carpenter(corr_S1(2).t_reaccion(~corr_S1(2).dcha,1),20,’k.-‘)

Advertisement

Learning in the reaction times experiments

>> clear
>> cd resultados
>> load S1_bruto
>> cd ..
>> [corr_S1(1),proc_S1(1)]=salida2procesados(S1_f50);
>> [corr_S1(2),proc_S1(2)]=salida2procesados(S1_f80);
>> corr_S1=correctos2correctos_filtrado(corr_S1,[1 1.5]);
>> apren1=correctos2aprendizaje(corr_S1(1),100,3);

First box is the ratio between reaction time to the right and reaction time to the left (errorbars are a bit cutres, and might be wrong. But should represent the 95% confidence interval). Second box is correlation coefficient between reaction time and time between the two stimuli. Third box is the p-value of this correlation. In this case both sides were 50%.

Case with 80% right, 20% left:

>> apren2=correctos2aprendizaje(corr_S1(2),100,3);

Comparison of reaction times ratios:

>> close all
>> errorbar(apren1.ratiotiempos(1,:),apren1.ratiotiempos(2,:))
>> hold on
>> errorbar(apren2.ratiotiempos(1,:),apren2.ratiotiempos(2,:),’r’)
>> legend(‘50% – 50%’,’80% – 20%’)

Study of the reaction times, depending on the parameters of the Bayesian estimator

Depending on x:

>> clear
>> x=10.^(-1:-1:-8);
>> umbral=1-10.^(0:-1:-8);
>> sigma=[.5 1 2 4 8];
>> for c_x=1:length(x)
[time{c_x},s,Ph]=tiempo_TH(10^3,10,1000,2,0,1,x(c_x),.99);
media(c_x)=mean(time{c_x});
desvest(c_x)=std(time{c_x});
end

I think the problem with high x is that the probability never passes the threshold. I repeat with lower threshold:

for c_x=1:length(x)
[time{c_x},s,Ph]=tiempo_TH(10^3,10,1000,2,0,1,x(c_x),.9);
media(c_x)=mean(time{c_x});
desvest(c_x)=std(time{c_x});
end
>> plot(log10(x),media)

>> plot(log10(x),desvest)

>> plot(log10(x),desvest./media)

THRESHOLD:

>> for c=1:length(umbral)
[time{c},s,Ph]=tiempo_TH(10^3,10,1000,2,0,1,1/10^4,umbral(c));
media(c)=mean(time{c});
desvest(c)=std(time{c});
end
>> plot(log10(1-umbral),media)

>> plot(log10(1-umbral),desvest)

>> plot(log10(1-umbral),desvest./media)

SIGMA:

>> clear media desvest
>> for c=1:length(sigma)
[time{c},s,Ph]=tiempo_TH(10^3,10,1000,sigma(c),0,1,1/10^4,1-10^-2);
media(c)=mean(time{c});
desvest(c)=std(time{c});
end
>> plot(sigma,media)

>> plot(sigma,desvest)

>> plot(sigma,desvest./media)

The last point is not valid. It is due to the fact that there are no more than 1000 timepoints.

First carpenter-like experiment

Subject: Myself

80% of stimuli at right-hand side, 20% at left-hand side.
Time between stimuli follows a uniform distribution between 0.5 and 1.5 seconds (just like Carpenter)
Keys used: 1=left, 2=right (in the numerical keypad).

200 trials. 199 correct, 1 confused the side of the second stimulus.

>> load(‘c:\hipertec\decisionmaking\Resultados\APE_20090513T174355_sesgo08.mat’)
>> [correctos,procesados]=salida2procesados(salida);

Scale in the 4th box is multiplied times 10^-3.
One timing of the first stimulus has an abnormally high uncertainty (box 3). However, it is still lower than needed:
errorbar(1:199,correctos.t_entrestim(:,1),correctos.t_entrestim(:,2),’.’)

The strange point is the one with appreciable errorbars, still very small compared with the overall scale.

Accuracy of reaction times is also high enough:
>> errorbar(1:199,correctos.t_reaccion(:,1),correctos.t_reaccion(:,2),’.’)

Although all results are valid, I would say that accuracies were higher last day. Probably this is due to having other programs open (especially firefox). In the following, one should do the experiments with all other programs closed.

Overall reaction times show the skewness:
>> hist(correctos.t_reaccion(:,1))

Separating right and left stimuli, skewness is mantained, and the expected shift occurs.
>> subplot(2,1,1)
>> hist(correctos.t_reaccion(correctos.dcha,1))
>> subplot(2,1,2)
>> hist(correctos.t_reaccion(~correctos.dcha,1))

The correlation between reaction time and interval between both stimuli is clear, both for the global dataset and when separating the two kinds of stimuli:

>> ploterr(correctos.t_reaccion(:,1),correctos.t_entrestim(:,1),correctos.t_reaccion(:,2),correctos.t_entrestim(:,2),’.’)
>> xlabel(‘Reaction time (s)’)
>> ylabel(‘Time b/w stimuli (s)’)

>> ploterr(correctos.t_reaccion(correctos.dcha,1),correctos.t_entrestim(correctos.dcha,1),correctos.t_reaccion(correctos.dcha,2),correctos.t_entrestim(correctos.dcha,2),’.’)
>> hold on
>> ploterr(correctos.t_reaccion(~correctos.dcha,1),correctos.t_entrestim(~correctos.dcha,1),correctos.t_reaccion(~correctos.dcha,2),correctos.t_entrestim(~correctos.dcha,2),’r.’)

 

Experiments of decision-making. First try

Subject: Myself

The timing between both stimuli is taken from a uniform distribution ranging between 0 and 3 seconds.

>>[t_estimulo1,t_estimulo2,t_reaccion,t_est_ideal,t_finespera,latencia_flip]=estimulo(100);
>> hist(t_reaccion(:,1)-t_estimulo2(:,1),20)

Histogram of all reaction times:

The point near zero is in fact a false positive (I pushed the key before seeing the second stimulus, but it appeared between my decision and the actual push).

plot(t_reaccion(:,1)-t_estimulo2(:,1),t_estimulo2(:,1)-t_estimulo1(:,1),’.’)

Reaction time (y) versus time between the two stimuli (x):

There is a trend of longer latency for smaller time between stimuli. However, my feeling is not the one of “increasing prior”, but that early stimuli arrive “before expected”, surprising me. Obviously, more experiments are needed.