Hello! Hope all are good!
I’m trying here to calculate de median of RT, but having some issues.
What I’ve tried?
At Begin Experiment
# importing statistics module
At Begin Routine
median_latency = round(statistics.median(rt))
At End Routine
This is the following error:
is rt a list?
Ok, there is one approach. Define a list that that stores the rt in the Begin experiment tab
rtList = 
In the End routine tab of the rt-trial insert
Change key_resp.rt to the name of your rt-component. Add a routine following your rt-loop and insert the following a Begin routine tab
median_latency = np.median(rtList)
thisExp.addData('median latency', median_latency)
BTW, I used numpy instead of statistics for computing the median.
Best wishes Jens
Thank u a lot!
That worked perfectly