NDCLab / fiu-toolbox

tool | standard experimental tasks for cognitive control
GNU Affero General Public License v3.0
0 stars 0 forks source link

preprocessing script: online flanker #2

Open georgebuzzell opened 2 years ago

georgebuzzell commented 2 years ago

@apoly1 Steps involved:

Load in raw csv file for a given participant Delete rows that are empty Of the remaining rows, these are trials. However, the first few rows, that are offset from the rest are practice trials and should be ignored Of the remaining experimental trials, create a selection vector to identify rows corresponding to congruent stimuli. Similarly, create an additional selection vector to identify rows corresponding to incongruent stimuli Using the congruent and incongruent selection vectors, pull out the RT and accuracy values, separately for congruent and incongruent trials. For the accuracy data, simply take the average across trials, seperately for congruent and incongruent. save these values For RT, you will similarly compute average RT, seperately for congruent and incongruent trials, but do this twice, once after log transforming (ln) and once using the raw rt values You should now have the following average values for this participant (one csv input per participant): congruent-mean-accuracy, incongruent-mean-accuracy, congruent-mean-rt, incongruent-mean-rt, congruent-mean-log-rt, incongruent-mean-log-rt. Using these values, you want to create a difference score for each pair of similar congruent/incongruent values by taking the incongruent value (e.g. incongruent-mean-accuracy) and subtracting the corresponding congruent value (e.g. congruent-mean-accuracy) and then naming this as "flanker-effect-measure" e.g. "flanker-effect-accuracy. you now have several mean scores, and several mean "flanker effect" scores for this participant. Store these in a data frame, with an additioanl column variable that is their id number, and repeat the process for the remaining participants, adding their mean and flanker effect scores to the same data frame