STROOP not identifying incorrect responses


Author
Message
emmahazard
emmahazard
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 2, Visits: 3
I adapted the aggression Stroop from the library to be a suicide-specific emotional Stroop task, so 5 conditions (suicide, positive, negative, neutral, practice words) with two possible responses (blue and red). 

When I run it, if I choose a wrong answer it does not reliably identify it as incorrect—so definitely something has gone awry! I think it has to do with a certain area of code that I changed, but as I’m not sure. Here is one area of code I edited (because I was going from 4 colors down to 2) 

Under each condition section (e.g, suicide, neutral) I changed this code:

/ontrialend = [

    trial.NeutralWord.resetstimulusframes();
    values.target = text.NeutralWord.currentitem;
        if (text.NeutralWord.textcolor == yellow)
        values.color = "yellow"
    else if (text.NeutralWord.textcolor == red)
        values.color = "red"
    else if (text.NeutralWord.textcolor == blue)
        values.color = "blue"
    else
        values.color = "green";
      if (trial.NeutralWord.correct) {
        values.correct_neutralwords += 1;
        values.sumrt_neu += trial.neutralword.latency;}
]
/ errormessage = true(x, 400)

</trial>


To look like this:


/ontrialend = [

    trial.suicideword.resetstimulusframes();
    values.target = text.suicideword.currentitem;
    if (text.suicideword.textcolor == blue)
       values.color = "blue"
    else if (text.suicideword.textcolor == red)
        values.color = "red";
     if (trial.suicideword.correct) {
        values.correct_suicidewords += 1;
        values.sumrt_Sui += trial.suicideword.latency};
]
/ errormessage = true(x, 400)
</trial>


Any thoughts of what I may have done wrong? I also added the whole script below in case that is helpful. Thanks in advance, any help is so appreciated! 





Attachments
stroop 2_13_20.iqx (183 views, 26.00 KB)
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: 98K
emmahazard - 3/10/2020
I adapted the aggression Stroop from the library to be a suicide-specific emotional Stroop task, so 5 conditions (suicide, positive, negative, neutral, practice words) with two possible responses (blue and red). 

When I run it, if I choose a wrong answer it does not reliably identify it as incorrect—so definitely something has gone awry! I think it has to do with a certain area of code that I changed, but as I’m not sure. Here is one area of code I edited (because I was going from 4 colors down to 2) 

Under each condition section (e.g, suicide, neutral) I changed this code:

/ontrialend = [

    trial.NeutralWord.resetstimulusframes();
    values.target = text.NeutralWord.currentitem;
        if (text.NeutralWord.textcolor == yellow)
        values.color = "yellow"
    else if (text.NeutralWord.textcolor == red)
        values.color = "red"
    else if (text.NeutralWord.textcolor == blue)
        values.color = "blue"
    else
        values.color = "green";
      if (trial.NeutralWord.correct) {
        values.correct_neutralwords += 1;
        values.sumrt_neu += trial.neutralword.latency;}
]
/ errormessage = true(x, 400)

</trial>


To look like this:


/ontrialend = [

    trial.suicideword.resetstimulusframes();
    values.target = text.suicideword.currentitem;
    if (text.suicideword.textcolor == blue)
       values.color = "blue"
    else if (text.suicideword.textcolor == red)
        values.color = "red";
     if (trial.suicideword.correct) {
        values.correct_suicidewords += 1;
        values.sumrt_Sui += trial.suicideword.latency};
]
/ errormessage = true(x, 400)
</trial>


Any thoughts of what I may have done wrong? I also added the whole script below in case that is helpful. Thanks in advance, any help is so appreciated! 





The problem is in your /iscorrectresponse attributes where you have a trailing logical OR (||) that needs to be eliminated:

<trial practiceword>
...
/iscorrectresponse = [        (text.practiceword.textcolor == red && trial.practiceword.response == parameters.keyred) ||
                            (text.practiceword.textcolor == blue && trial.practiceword.response == parameters.keyblue) ||]
...
/ errormessage = true(x, 400)
</trial>

<trial suicideword>
...
/iscorrectresponse = [        (text.suicideword.textcolor == red && trial.suicideword.response == parameters.keyred) ||
                            (text.suicideword.textcolor == blue && trial.suicideword.response == parameters.keyblue) ||]
...
</trial>

<trial PositiveWord>
...
/iscorrectresponse = [        (text.PositiveWord.textcolor == red && trial.PositiveWord.response == parameters.keyred) ||
                            (text.PositiveWord.textcolor == blue && trial.PositiveWord.response == parameters.keyblue) ||]
...
</trial>

<trial NegativeWord>
...
/iscorrectresponse = [        (text.NegativeWord.textcolor == red && trial.NegativeWord.response == parameters.keyred) ||
                            (text.NegativeWord.textcolor == blue && trial.NegativeWord.response == parameters.keyblue) ||]
...
</trial>

<trial NeutralWord>
...
/iscorrectresponse = [        (text.NeutralWord.textcolor == red && trial.NeutralWord.response == parameters.keyred) ||
                            (text.NeutralWord.textcolor == blue && trial.NeutralWord.response == parameters.keyblue) ||]
...
</trial>
Attachments
stroop 2_13_20.iqx (175 views, 26.00 KB)
emmahazard
emmahazard
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 2, Visits: 3
Thank you so much, that fixed the problem! 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search