>> t_reaccion=bayestim_medias_nosave(10^5,10,1000,2,0,1,10^-3,.995);

>> hist(t_reaccion,0:1000)

>> t_reaccion2histog_carpenter(t_reaccion,20,’r.-‘);

>> t_reaccion=bayestim_medias_nosave(10^5,10,1000,2,0,1,10^-3,.995);

>> hist(t_reaccion,0:1000)

>> t_reaccion2histog_carpenter(t_reaccion,20,’r.-‘);

Advertisements

In previous posts, I made a mistake: I used the transposed of the chemical connectivity matrix. Fortunately, it seems there is not a fundamental difference:

Transposed,

>> M=conectividad2matrizsistema(todas.A_chem’,todas.A_ej,todas.GABA,1,1,30);

>> solucion=matrizsistema2solucion(M,V0);

>> plot(solucion.autovalores,’.’)

Not transposed:

>> M=conectividad2matrizsistema(todas.A_chem,todas.A_ej,todas.GABA,1,1,30);

solucion=matrizsistema2solucion(M,V0);

plot(solucion.autovalores,’.’)

It turns out that the sum of normally distributed and exponentially distributed random numbers gives rise to Carpenter’s distribution:

>> t=.2+.02*randn(1,10000) + exprnd(.05,[1 10000]);

>> hist(t,30)

>> hist(1./t,30)

>> t_reaccion2histog_carpenter(t,20,’r.-‘);

First, with all distractions having the same duration:

>> estimulo=generaestimulo(10000,[1 2]);

>> [t_reaccion,mom_despistes,t_reaccion_intrinseco]=estimulo2reaccion(estimulo,[.2 .03],[3 .2]);

>> hist(t_reaccion,30)

>> hist(1./t_reaccion,30)

>> t_reaccion2histog_carpenter(t_reaccion,20,’r.-‘);

The problem is that distractions produce a plateau which is not very natural. Let’s see a very clear case:

>> [t_reaccion,mom_despistes,t_reaccion_intrinseco]=estimulo2reaccion(estimulo,[.2 .03],[1 .2]);

>> hist(t_reaccion,30)

A more natural situation is that in which distractions have different durations:

Subject: Alfonso

More statistics (1000 trials) and better focused in the relevant region.

>> salida=estimulo_tiempofijo(1000,.5,[.05 .3],.05,’Sujeto:Alfonso. Ordenador: Alfonso’);

>> save APE_1000_01jun09_1524

>> cd ..

>> [atiempo,todos]=salida_tiempofijo2procesados(salida);

>> [prob,bins]=atiempo2probcorrecto(atiempo,20,1);

Conclusions:

– Rests are needed.

– The relevant region seems to be b/w 0.15 and 0.3.

– Looks nice, but in order to see the form of the function, MUCH MORE data are needed.

There are two possible ways of modelling this:

1. One can only identify the side when the decision signal reaches the threshold on time. Thus, I would think that the curve above should be related to the cumulative distribution of latency times.

2. One guesses the side from the available information. So the curve that we get is something closely related to the decision signal.

From my experience, I would say that number 1 is more likely. When I have to guess, I use more the information of previous trials (I tend to repeat if I got it right, and to change if I missed it).

And this brings the following idea: It seems to me that estimation of the prior (right/left) is made in real time, rather than realizing that stimuli are independent on each other (at least for this case, that is 50%-50%). I feel inevitable to think that if a choice failed in the previous trial, I should change my guess (and also, but weaker, that if a choice has been successful for a while, it is time to change). Does anybody take this into account? Maybe we could try develop a “dynamic prior” model.

Experiment design: The subject must press the button at a fixed time (indicated by the moment a bar reaches a mark). Some time before (uniformly random between 0.05 and 0.3 seconds), a circle appears either on the right or on the left. The subject must indicate the side at which the circle appeared, at the fixed time. If the subject fails to press some button at the right moment with an interval of (0,05 seconds), the measurement is rejected. Then, we count how many times the subject guessed correctly the position of the circle, as a function of the time between the aparison of the circle and the key pulsation.

First experiment, subject Alfonso:

>> load(‘c:\hipertec\decisionmaking\Resultados_tiempofijo\APE_01jun09_1243.mat’)

>> cd ..

>> [atiempo,todos]=salida_tiempofijo2procesados(salida);

>> [prob,bins]=atiempo2probcorrecto(atiempo,10,1);

Sara:

>> load(‘c:\hipertec\decisionmaking\resultados\SARA_20090518T173630_sesgo08.mat’)

>> cd ..

>> [correctos,procesados]=salida2procesados(salida,salida.teclascorrectas);

>> t_reaccion2histog_carpenter(correctos.t_reaccion(~correctos.dcha,1),20,’r.-‘);

>> hold on

>> t_reaccion2histog_carpenter(correctos.t_reaccion(correctos.dcha,1),20,’.-‘);

Agh!

I take only the last 250 trials (see post “Learning for Sara”):

>> buenos=false(1,size(correctos.t_reaccion,1));

>> buenos(250:end)=true;

>> t_reaccion2histog_carpenter(correctos.t_reaccion(~correctos.dcha & buenos’,1),20,’r.-‘);

>> hold on

>> t_reaccion2histog_carpenter(correctos.t_reaccion(correctos.dcha & buenos’,1),20,’.-‘);