Identifying if reaction times are 3 standard deviations away from mean
11 views (last 30 days)
have a data set of several thousand values.
There are 10 unique subj_indx, 1 through 10. Each one represents an experimental subject. Each subject has a bunch of reaction times, rt.
I am new to Matlab and don't understand how to write for loops. I know I need to run through the entire dataset, and identify outlier reaction time trials, without using isoutlier function. This is because I want to be ale to identify whether each RT trial is > 3 standard deviations away from the mean RT, and then mark that trial in a new vector as "1", otherwise, mark it as "0."
I know Matlab has standard deviation and mean functinos, but am not sure how to connect everything together for this code.
I don't know where to start other than:
for id = 1:length(subj_idx)%loop for each unique id value
%rtIdx = 1:length(rt)
currentid = rt(rtIdx);
rtIdx = 0;
and I'm not sure even that's correct.