Stroop with limited time for response & errormsg included


Author
Message
MystaK
MystaK
New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 83K
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.
MystaK
MystaK
New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Dave - 4/5/2022
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 83K
MystaK - 4/6/2022
Dave - 4/5/2022
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.

> The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't)

Where do you think your spreadsheet / calculations show that? Explain your math, please. Because I think you're working off mistaken assumptions here.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 83K
Dave - 4/6/2022
MystaK - 4/6/2022
Dave - 4/5/2022
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.

> The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't)

Where do you think your spreadsheet / calculations show that? Explain your math, please. Because I think you're working off mistaken assumptions here.

Adding a few general remarks: First, to understand the various components of trial timing, https://www.millisecond.com/support/docs/v5/html/howto/howtocontroltiming.htm is essential.
If you really want to nail timing, pre- and posttrialpause are important. Lastly, to double-check timing, the most exact method is calculating the difference between the timestamps https://www.millisecond.com/support/docs/v5/html/language/properties/timestamp.htm of trial N and trial N-1, i.e. the previous trial. Simple example code:

<values>
/ ts = 0
/ ts_prev = 0
/ ts_current = 0
/ calculated_duration_of_previous_trial = 0;
</values>

<block myblock>
/ trials = [1-10 = trial.mytrial; 11 = trial.end]
</block>

<trial mytrial>
/ ontrialbegin = [
    values.ts = trial.mytrial.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ stimulustimes = [0=mytext; 500=clearscreen]
/ beginresponsetime = -1
/ responseinterrupt = frames
/ posttrialpause = 1000
/ trialduration = 2500
/ validresponse = (57, 0)
</trial>


<text mytext>
/ items = ("Press SPACE")
/ erase = false
</text>

<trial end>
/ ontrialbegin = [
    values.ts = trial.end.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ trialduration = 1000
/ validresponse = (0)
</trial>

<data>
/ columns = (date time subject group trialnum trialcode response latency
    trialduration values.ts values.calculated_duration_of_previous_trial)
    / separatefiles = true
</data>


Example data:





MystaK
MystaK
New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Dave - 4/6/2022
MystaK - 4/6/2022
Dave - 4/5/2022
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.

> The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't)

Where do you think your spreadsheet / calculations show that? Explain your math, please. Because I think you're working off mistaken assumptions here.
For my understanding, elapsed time is in ms. The table calculations is just me double checking If what I coded gives me the results and protocol I want. For my understanding, between subsequent stimuli (which are set to last 2500ms), the difference between those elapsed times in subsequent rows should also be 2500, regardless of when the response was made (since there is only 2500 given for each trial, with response included in that time). I am subtracting 2500 (trial duration) from the current elapsed time [left coloured column] eg. 15801 and it should give me the elapsed time for the previous stimuli, eg. 13301 [right coloured column]. Exemplar rows were made with no key response to a stimuli, however when a response occurs (row with a stimuli which has a latency of 741 ms), elapsed times do not "add up" when I run my double check. Maybe my double check is wrong, I am lost at this point. 

Regardless of my calculations there, I try to code display of all stimuli for 1000ms and 400ms for errormessage - all within trial duration=2500 to implement my criteria, however I receive errors when I am attempting to code it in various ways.

I am just looking for help and any way to design Stroop in Inquisit with 1080 trials lasting 2500 ms (including: stimuli display + response + error message for 'no response' & 'incorrect response') to achieve exactly 45 min duration of the experiment. With a current code I have, experiment does not last 45 min.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 83K
MystaK - 4/6/2022
Dave - 4/6/2022
MystaK - 4/6/2022
Dave - 4/5/2022
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.

> The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't)

Where do you think your spreadsheet / calculations show that? Explain your math, please. Because I think you're working off mistaken assumptions here.
For my understanding, elapsed time is in ms. The table calculations is just me double checking If what I coded gives me the results and protocol I want. For my understanding, between subsequent stimuli (which are set to last 2500ms), the difference between those elapsed times in subsequent rows should also be 2500, regardless of when the response was made (since there is only 2500 given for each trial, with response included in that time). I am subtracting 2500 (trial duration) from the current elapsed time [left coloured column] eg. 15801 and it should give me the elapsed time for the previous stimuli, eg. 13301 [right coloured column]. Exemplar rows were made with no key response to a stimuli, however when a response occurs (row with a stimuli which has a latency of 741 ms), elapsed times do not "add up" when I run my double check. Maybe my double check is wrong, I am lost at this point. 

Regardless of my calculations there, I try to code display of all stimuli for 1000ms and 400ms for errormessage - all within trial duration=2500 to implement my criteria, however I receive errors when I am attempting to code it in various ways.

I am just looking for help and any way to design Stroop in Inquisit with 1080 trials lasting 2500 ms (including: stimuli display + response + error message for 'no response' & 'incorrect response') to achieve exactly 45 min duration of the experiment. With a current code I have, experiment does not last 45 min.

> Exemplar rows were made with no key response to a stimuli, however when a response occurs (row with a stimuli which has a latency of 741 ms), elapsed times do not "add up" when I run my double check.

You are taking elapsed time at the time the trial logs its data. If there is no response, that occurs at the end of the 2500ms trialduration. If there is a response, data logging occurs earlier, after the response. Data logging occurs when the trial doesn't have anything to log anymore, at the earliest time possible.

MystaK
MystaK
New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Dave - 4/6/2022
Dave - 4/6/2022
MystaK - 4/6/2022
Dave - 4/5/2022
[quote]
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.

> The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't)

Where do you think your spreadsheet / calculations show that? Explain your math, please. Because I think you're working off mistaken assumptions here.

Adding a few general remarks: First, to understand the various components of trial timing, https://www.millisecond.com/support/docs/v5/html/howto/howtocontroltiming.htm is essential.
If you really want to nail timing, pre- and posttrialpause are important. Lastly, to double-check timing, the most exact method is calculating the difference between the timestamps https://www.millisecond.com/support/docs/v5/html/language/properties/timestamp.htm of trial N and trial N-1, i.e. the previous trial. Simple example code:

<values>
/ ts = 0
/ ts_prev = 0
/ ts_current = 0
/ calculated_duration_of_previous_trial = 0;
</values>

<block myblock>
/ trials = [1-10 = trial.mytrial; 11 = trial.end]
</block>

<trial mytrial>
/ ontrialbegin = [
    values.ts = trial.mytrial.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ stimulustimes = [0=mytext; 500=clearscreen]
/ beginresponsetime = -1
/ responseinterrupt = frames
/ posttrialpause = 1000
/ trialduration = 2500
/ validresponse = (57, 0)
</trial>


<text mytext>
/ items = ("Press SPACE")
/ erase = false
</text>

<trial end>
/ ontrialbegin = [
    values.ts = trial.end.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ trialduration = 1000
/ validresponse = (0)
</trial>

<data>
/ columns = (date time subject group trialnum trialcode response latency
    trialduration values.ts values.calculated_duration_of_previous_trial)
    / separatefiles = true
</data>


Example data:

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 83K
MystaK - 4/6/2022
Dave - 4/6/2022
Dave - 4/6/2022
MystaK - 4/6/2022
Dave - 4/5/2022
[quote]
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.

> The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't)

Where do you think your spreadsheet / calculations show that? Explain your math, please. Because I think you're working off mistaken assumptions here.

Adding a few general remarks: First, to understand the various components of trial timing, https://www.millisecond.com/support/docs/v5/html/howto/howtocontroltiming.htm is essential.
If you really want to nail timing, pre- and posttrialpause are important. Lastly, to double-check timing, the most exact method is calculating the difference between the timestamps https://www.millisecond.com/support/docs/v5/html/language/properties/timestamp.htm of trial N and trial N-1, i.e. the previous trial. Simple example code:

<values>
/ ts = 0
/ ts_prev = 0
/ ts_current = 0
/ calculated_duration_of_previous_trial = 0;
</values>

<block myblock>
/ trials = [1-10 = trial.mytrial; 11 = trial.end]
</block>

<trial mytrial>
/ ontrialbegin = [
    values.ts = trial.mytrial.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ stimulustimes = [0=mytext; 500=clearscreen]
/ beginresponsetime = -1
/ responseinterrupt = frames
/ posttrialpause = 1000
/ trialduration = 2500
/ validresponse = (57, 0)
</trial>


<text mytext>
/ items = ("Press SPACE")
/ erase = false
</text>

<trial end>
/ ontrialbegin = [
    values.ts = trial.end.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ trialduration = 1000
/ validresponse = (0)
</trial>

<data>
/ columns = (date time subject group trialnum trialcode response latency
    trialduration values.ts values.calculated_duration_of_previous_trial)
    / separatefiles = true
</data>


Example data:


If there is a question or something else here, I am not seeing it. Repost whatever it is clearly, please
MystaK
MystaK
New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)New Member (13 reputation)
Group: Forum Members
Posts: 5, Visits: 14
Dave - 4/6/2022
MystaK - 4/6/2022
Dave - 4/6/2022
Dave - 4/6/2022
MystaK - 4/6/2022
Dave - 4/5/2022
[quote]
MystaK - 4/5/2022
Hi,

I am trying to run an experiment with Stroop which should last 45 minutes and have the same amount of trials for each participant. This would involve 1080 trials which last 2500 ms (including time for user's response)
Ideally, I am looking for total single trial duration which lasts 2500ms and has parameters:
* 1000 ms of stimulus display eg. RED
* 1500 ms of blank screen
Here, from the stimulus onset (1 frame), participant has 1700 ms (1000ms of stimulus display + 700ms taken from the blank screen time) to make a response 
With a missed/lapsed response  after 1700 ms from the stimulus onset the "X" is displayed for 400 ms, and also when incorrect response (as already in-built)

--> I tried /timeout = 1700 but I see error saying I cannot have timeout & trialduration at the same time.
--> With my previous modifications I have noticed, that /trialduration = 2500 would not include the timing of /error message, which lasts 400 ms, so it with errorr msg it exceeds initial 45 min.
--> I have also tried with adding a /correct message which would last 400 ms and be simply a blank screen (and steal these 400 ms from trialduration to still fit into 45 min), however then I do not get any error message once there is 'no key response' by user (which also is an incorrect answer).

After all this, I have modified the code for all trials to look as the one below, [unfortunately without timeout 1700 ms], which shows /error message for both [incorrect AND no response]. For no responses (so when the script runs without any keyboard reaction) numbers add up to have 2500ms, however when a response is made, I subtract the recorded script.elapsedtime and the numbers are simply not adding up, so I do not reach 45 min, but more.

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 0
/ stimulustimes = [1=redcongruent, redreminder, greenreminder, bluereminder, blackreminder]
/ correctresponse = ("d")
/ validresponse = ("d", "f", "j", "k")
/ errormessage = true(x, 0)
/ posttrialpause = 400
/ trialduration = 2500
/ontrialend = [
    list.responses.insertitem(trial.redcongruent.correct, 1);
    list.responses_congruent.insertitem(trial.redcongruent.correct, 1);

    if (trial.redcongruent.correct) {
        list.latencies.insertitem(trial.redcongruent.latency, 1);
        list.latencies_congruent.insertitem(trial.redcongruent.latency, 1);
    }
]
</trial>

Any help would be greatly appreciated.

I'm not sure what your questions are and what the calculations in the spreadsheet screenshot you posted are supposed to convey. Please clarify.

Hi Dave,
thank you for the prompt reply.
As described earlier, I am trying to change the code of the Stroop [English version] for it to last 45 min, so each participant gets the same amount of the stimuli. Here it would be 1080 stimuli which last 2500 ms (exposion of the stimuli + response + errormessage + eventual post or peritrialpause), with additional requierement for a timeout (a response since the stimuli exposition) = 1700 ms within those 2500ms. However, all ma attempts are unsuccessful so far.
The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't) so I cannot achieve 45 min with 1080 stimuli, but more or less, which is not my aim. 

My question is, if there is a way to code these requirements in Inquisit.

> The picture shows that even if the trial duration is set to last 2500 ms, not all trials last those 2500 ms (colours on the picture show elapsed time + 2500ms, which should add up as response has to be made within the trialduration, and the rest should be filled in until the end of the 2500ms, however it doesn't)

Where do you think your spreadsheet / calculations show that? Explain your math, please. Because I think you're working off mistaken assumptions here.

Adding a few general remarks: First, to understand the various components of trial timing, https://www.millisecond.com/support/docs/v5/html/howto/howtocontroltiming.htm is essential.
If you really want to nail timing, pre- and posttrialpause are important. Lastly, to double-check timing, the most exact method is calculating the difference between the timestamps https://www.millisecond.com/support/docs/v5/html/language/properties/timestamp.htm of trial N and trial N-1, i.e. the previous trial. Simple example code:

<values>
/ ts = 0
/ ts_prev = 0
/ ts_current = 0
/ calculated_duration_of_previous_trial = 0;
</values>

<block myblock>
/ trials = [1-10 = trial.mytrial; 11 = trial.end]
</block>

<trial mytrial>
/ ontrialbegin = [
    values.ts = trial.mytrial.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ stimulustimes = [0=mytext; 500=clearscreen]
/ beginresponsetime = -1
/ responseinterrupt = frames
/ posttrialpause = 1000
/ trialduration = 2500
/ validresponse = (57, 0)
</trial>


<text mytext>
/ items = ("Press SPACE")
/ erase = false
</text>

<trial end>
/ ontrialbegin = [
    values.ts = trial.end.timestamp;
    values.ts_prev = values.ts_current;
    values.ts_current = values.ts;
    if (values.ts_prev != 0) {
        values.calculated_duration_of_previous_trial = values.ts_current - values.ts_prev;
    };
]
/ pretrialpause = 500
/ trialduration = 1000
/ validresponse = (0)
</trial>

<data>
/ columns = (date time subject group trialnum trialcode response latency
    trialduration values.ts values.calculated_duration_of_previous_trial)
    / separatefiles = true
</data>


Example data:


If there is a question or something else here, I am not seeing it. Repost whatever it is clearly, please
Apologies if I am not clear.
post & pretrial pause takes up time from the trialduration and

So far, I tried, without success, to code Stroop to achieve 1080 trials lasting 2500ms and giving me 45 min of total experiment. Is there a way to code Stroop to achieve a design like in the picture below?

If not, then is there a way to code Stroop with (not sure if these amendments would make this possible):
*stimuli presented for 1700 ms (not to disappear after 1000ms),
AND error message [(400ms) after incorrect response within 1700 ms or no response until 1700 ms of the trial], AND no message once the answer is correct within the 1700ms
AND blank screen until the end of trial
AND above to fit in within the total trial time (2500ms)? 

OR

*stimuli presented for 1700 ms (not to disappear after 1000ms),
AND error message [until the end of trial after incorrect response within 1700 ms or no response until 1700 ms of the trial], AND no message once the answer is correct within the 1700 ms
AND blank screen until the end of trial
AND above to fit in within the total trial time (2500ms)?

OR

*any other?

I hope this makes it clearer.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search