stroop windowsresponse


Author
Message
moon3
moon3
Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)
Group: Forum Members
Posts: 9, Visits: 63
Dear all,

I have been trying to change the original script from the Stroop task in order to just have into account the latencies between 200 and 5000 ms, but it's not working:

/ontrialend =[
       list.responses.insertitem(trial.redcongruent.correct,1);
       list.responses_congruent.insertitem(trial.redcongruent.correct,1);
       if (trial.redcongruent.correct)
       {
       if (trial.redcongruent.latency > 200 || trial.redcongruent.latency <5000)
       {
       list.latencies.insertitem (trial.redcongruent.latency,1);
       list.latencies_congruent.inseritem (trial.redcongruent.latency,1);
       }
       else
      {
      list.latencies_out.inseritem(trial.redcongruent.latency,1);
      values.discard +=1;
      }
}
]
Thank you in advance!!!













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: 13K, Visits: 105K
moon3 - Wednesday, March 1, 2017
Dear all,

I have been trying to change the original script from the Stroop task in order to just have into account the latencies between 200 and 5000 ms, but it's not working:

/ontrialend =[
       list.responses.insertitem(trial.redcongruent.correct,1);
       list.responses_congruent.insertitem(trial.redcongruent.correct,1);
       if (trial.redcongruent.correct)
       {
       if (trial.redcongruent.latency > 200 || trial.redcongruent.latency <5000)
       {
       list.latencies.insertitem (trial.redcongruent.latency,1);
       list.latencies_congruent.inseritem (trial.redcongruent.latency,1);
       }
       else
      {
      list.latencies_out.inseritem(trial.redcongruent.latency,1);
      values.discard +=1;
      }
}
]
Thank you in advance!!!













if (trial.redcongruent.latency > 200 || trial.redcongruent.latency <5000)

You don't want a logical OR ("||") here; you need a logical AND ("&&")

if (trial.redcongruent.latency > 200 && trial.redcongruent.latency <5000)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search