[solved] Feedback based on item with fastest response time
Hi again,
I'm building a forced choice experiment on my tablet. Every trial participants must choose between two words. Each word is linked to a categorical variable from 1 to 5 (for clearness: one of the factors from the BigFive personality theory) and trials never contain items of the same category.
At the end of the experiment i want to present a feedback frame that presents the items to which the participant responded the quickest for each of the five categories.
To tackle this i want to create a temporary variable that holds the item with the fastest response time for each category and compare it with the current reaction time after each trial:
# Get current RT and category
cur_rt = self.get('response_time_touch_response')
cur_item = self.get('touch_response')
cat1 = self.get('cat_stim1')
cat2 = self.get('cat_stim2')
cat_resp = ???
# Create variable that contains the fastest stimulus response per category, but only when RT is above the theshold of meaningful response
if cur_rt > 500
if cat_resp=1 & cur_rt < fast_rt
exp.set('feedback_cat1',cur_item)
cur_rt=fast_rt
elif cat_resp=2 & cur_rt < fast_rt
exp.set('feedback_cat2',cur_item)
cur_rt=fast_rt
elif cat_resp=3 & cur_rt < fast_rt
exp.set('feedback_cat3',cur_item)
cur_rt=fast_rt
elif cat_resp=4 & cur_rt < fast_rt
exp.set('feedback_cat4',cur_item)
cur_rt=fast_rt
elif cat_resp=5 & cur_rt < fast_rt
exp.set('feedback_cat5',cur_item)
cur_rt=fast_rt
else pass
else pass
However, i'm running in a few issues:
The location of the items (left or right on the screen) is randomized and the touch based response variable only collects the column of the raster that has been pressed. How do i link the response to the item?
The same goes for the category of the chosen item, cat_stim1 and cat_stim2 are the variables of the items but they are randomly localized on the screen, so how do i acquire cat_resp?
The first response for each category is obviously also the fastest, how do i implement that into the code above?
Any help or direction is much appreciated, also if you know a faster or more elegant way to implement this, please let me know!
- Laurent
Comments
I got it working, you can mark it as solved!
Good to hear you got it working, and thanks for letting us know!
Check out SigmundAI.eu for our OpenSesame AI assistant!