Post by hong on Mar 31, 2023 13:27:23 GMT
I am currently conducting a maze task experiment (called “partM-20sent”), which is embedded in a survey(“partM-20sent”). In this experiment, participants are required to judge each word of a sentence based on its position (left or right). The experiment is designed to end when the participant presses a wrong button or does not respond within 5 seconds (TIMEOUT). However, I am encountering a problem with data storage. Only the correct key and the first wrong response are currently being stored in the download data, whereas I would like to store all the words of each sentence to maintain complete information for statistical analysis.
My goal is to ensure that all under-judgement words are stored, even if the participant presses the wrong button or TIMEOUT occurs. In such cases, I would like the task list to end, but the remaining words should be stored, and their response time (RT) should be recorded as NA. I am wondering if it is possible to achieve this through coding.
I am particularly concerned about the following part of the cde:o
if STATUS == WRONG, if STATUS == TIMEOUT
I am unsure what code would be appropriate to insert in these two conditions to achieve my goal before ending the task list.
I have attached a ZIP file containing all the experiment materials, including parts of my experiment code.
Part of the experiment codes:
part showPhrase
keys a l #a = 1 word in the left, l=2 -> word in the right
set $x random from 1 2
if $x == 1
draw off
show text @1 -250 25 255 255 255
show text @2 250 25 255 255 255
draw on
readkey @4 5000
save BLOCKORDER TASKNAME @3 TABLEROW @1 @2 @4 RT STATUS
fi
if $x == 2
draw off
show text @2 -250 25 255 255 255
show text @1 250 25 255 255 255
draw on
readkey @5 5000
save BLOCKORDER TASKNAME @3 TABLEROW @2 @1 @5 RT STATUS
fi
clear -1 -2 #clean up the last two "shows"
if STATUS == WRONG
if TABLEROW != 1 #if it's the first sentence, disregard the error
show text "INCORRECT!" 0 0 255 0 0
delay 1500
clear -1 #cleans up the last show
end tasklist # finishes the current task (sentence) and calls the next one
fi
fi
if STATUS == TIMEOUT
end tasklist # finishes the current task (sentence) and calls the next one
fi
My goal is to ensure that all under-judgement words are stored, even if the participant presses the wrong button or TIMEOUT occurs. In such cases, I would like the task list to end, but the remaining words should be stored, and their response time (RT) should be recorded as NA. I am wondering if it is possible to achieve this through coding.
I am particularly concerned about the following part of the cde:o
if STATUS == WRONG, if STATUS == TIMEOUT
I am unsure what code would be appropriate to insert in these two conditions to achieve my goal before ending the task list.
I have attached a ZIP file containing all the experiment materials, including parts of my experiment code.
Part of the experiment codes:
part showPhrase
keys a l #a = 1 word in the left, l=2 -> word in the right
set $x random from 1 2
if $x == 1
draw off
show text @1 -250 25 255 255 255
show text @2 250 25 255 255 255
draw on
readkey @4 5000
save BLOCKORDER TASKNAME @3 TABLEROW @1 @2 @4 RT STATUS
fi
if $x == 2
draw off
show text @2 -250 25 255 255 255
show text @1 250 25 255 255 255
draw on
readkey @5 5000
save BLOCKORDER TASKNAME @3 TABLEROW @2 @1 @5 RT STATUS
fi
clear -1 -2 #clean up the last two "shows"
if STATUS == WRONG
if TABLEROW != 1 #if it's the first sentence, disregard the error
show text "INCORRECT!" 0 0 255 0 0
delay 1500
clear -1 #cleans up the last show
end tasklist # finishes the current task (sentence) and calls the next one
fi
fi
if STATUS == TIMEOUT
end tasklist # finishes the current task (sentence) and calls the next one
fi