Adding a Stop-Signal into Mental Arithmetic Task


Author
Message
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
Dave - Monday, July 24, 2017
catithomas - Monday, July 24, 2017
Dave - Wednesday, July 19, 2017
catithomas - Wednesday, July 19, 2017
Dave - Thursday, July 13, 2017
catithomas - Thursday, July 13, 2017
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks

Sure. You can change the color of the <text mathanswer> element via /ontrialbegin logic. Set up a list with the two display colors black and red

<list answercolor>
/ items = (black, orangered)
/ poolsize = parameters.maxnr_mathproblems
</list>

with as many items as there are math problems per its /poolsize (40 is the default), i.e. here the list will contain 20 x the color black and 20 x the color red.

Then set the text.mathanswer.textcolor to a color sampled from the list /ontrialbegin:

<trial 1digit1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

<trial 2digits1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

and so forth.

Hi again Dave,

Got the colours working now some follow up questions:

1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

2) In the original task feedback is provided to pts (green O for correct, red X for incorrect) I would like the task to state pts should NOT respond to any answers displayed in colour (i.e. inhibit a spacebar press to 50% of the answers displayed) in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not. If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

Thank you

> 1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange
> but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

The solution outlined in my original response should do just that. 50% in red, regardless of level. What exactly did you implement instead and how?

> in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not.

You should modify the <trial>s' /iscorrectresponse logic accordingly. I.e., the the given trial is a "stop"-trial (response displayed in red color), no response (0) should be taken as the correct response.

> If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

If you'd rather suppress feedback entirely, remove the /correctmessage and /erromessage attributes from the <trial> elements.

Thanks have sorted the colour issue.
What exactly should I modify in that logic to say that if they respond correctly to a black answer they are given a green O and if the do not respond to a red answer they are given a green O
/ iscorrectresponse = [(values.correctness == 1 && trial.1digit1digit.response == parameters.correctresponsekey) ||
(values.correctness == 2 && trial.1digit1digit.response == 0)]

First you should add a value (cf. the <values> element in the script) and associated logic that indicates whether the given trial is a "stop" trial or not. Then you would change the /iscorrectresponse logic to something along the lines of:

/ iscorrectresponse = [(values.isstoptrial==false && values.correctness == 1 && trial.1digit1digit.response == parameters.correctresponsekey) ||
(values.isstoptrial==false && values.correctness == 2 && trial.1digit1digit.response == 0) || (values.isstoptrial==true &&  trial.1digit1digit.response == 0)]

Perhaps a more complete code example is more useful: In short, I'd probably set up  a single list that encodes whether a trial is supposed to be a "stop" trial (true) or not "false".

<list isstoptrial>
/ items = (false, true)
/ poolsize = parameters.maxnr_mathproblems
</list>

Then sample an item -- either true or false -- from the list at the start of each trial and store it in a global variable (a <values> entry), set the text color of the math answer accordingly:

<values>
/ isstoptrial = false
</values>

<trial 1digit1digit>
/ ontrialbegin = [
    values.isstoptrial = list.isstoptrial.nextvalue;
]

/ ontrialbegin = [
    if (values.isstoptrial) text.mathanswer.textcolor = orangered else text.mathanswer.textcolor = black;
]

/ ontrialbegin = [
    values.difficulty = 1;
    values.foiladjustment = 1;
    expressions.1digitA;
    expressions.1digitB;
    if (parameters.runoperation == 1)
        values.operation = "+";
    else if (parameters.runoperation == 2)
        values.operation = "-";
    else
        expressions.operation;
    if (values.operation == "-" && values.number1 < values.number2) {
        values.helper = values.number1;
        values.number1 = values.number2;
        values.number2 = values.helper;
    };
    expressions.generatemathproblem;
    values.correctsolution = evaluate(values.mathproblem);
    values.correctness = list.correctness.nextvalue;
    if (values.correctness == 1)
        values.presentedsolution = values.correctsolution;
    else
        expressions.generatefoilanswer;
    trial.1digit1digit.insertstimulustime(clearscreen, parameters.mathproblemduration);
    trial.1digit1digit.insertstimulustime(text.equal, parameters.mathproblemduration);
    trial.1digit1digit.insertstimulustime(text.mathanswer, (parameters.mathproblemduration + parameters.equalsignduration));
]   

/ stimulusframes = [1 = mathproblem]
/ beginresponsetime = parameters.mathproblemduration + parameters.equalsignduration
/ response = timeout(parameters.mathanswerduration)
/ validresponse = (parameters.correctresponsekey, 0)
/ iscorrectresponse = [(values.isstoptrial==false && values.correctness == 1 && trial.1digit1digit.response == parameters.correctresponsekey) ||
    (values.isstoptrial==false && values.correctness == 2 && trial.1digit1digit.response == 0) ||
    (values.isstoptrial==true &&  trial.1digit1digit.response == 0)]

/ ontrialend = [
    trial.1digit1digit.resetstimulusframes();
    if (trial.1digit1digit.correct)
        values.countcorrect += 1;
    values.countmathproblems += 1;
    values.count_diff1 += 1;
]   
/ correctmessage = (correctfeedback, 500)
/ errormessage = (incorrectfeedback, 500)
/ branch = [
    if (trial.1digit1digit.correct)
        trial.2digits1digit;
    else
        trial.1digit1digit;
]
/ posttrialpause = parameters.iti
</trial>

The attached modification of the original script has this implemented for all trials and logs the stop-trial variable to the raw data file.

Attachments
math_with_stop_signal.iqx (200 views, 36.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: 13K, Visits: 105K
catithomas - Monday, July 24, 2017
Dave - Wednesday, July 19, 2017
catithomas - Wednesday, July 19, 2017
Dave - Thursday, July 13, 2017
catithomas - Thursday, July 13, 2017
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks

Sure. You can change the color of the <text mathanswer> element via /ontrialbegin logic. Set up a list with the two display colors black and red

<list answercolor>
/ items = (black, orangered)
/ poolsize = parameters.maxnr_mathproblems
</list>

with as many items as there are math problems per its /poolsize (40 is the default), i.e. here the list will contain 20 x the color black and 20 x the color red.

Then set the text.mathanswer.textcolor to a color sampled from the list /ontrialbegin:

<trial 1digit1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

<trial 2digits1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

and so forth.

Hi again Dave,

Got the colours working now some follow up questions:

1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

2) In the original task feedback is provided to pts (green O for correct, red X for incorrect) I would like the task to state pts should NOT respond to any answers displayed in colour (i.e. inhibit a spacebar press to 50% of the answers displayed) in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not. If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

Thank you

> 1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange
> but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

The solution outlined in my original response should do just that. 50% in red, regardless of level. What exactly did you implement instead and how?

> in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not.

You should modify the <trial>s' /iscorrectresponse logic accordingly. I.e., the the given trial is a "stop"-trial (response displayed in red color), no response (0) should be taken as the correct response.

> If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

If you'd rather suppress feedback entirely, remove the /correctmessage and /erromessage attributes from the <trial> elements.

Thanks have sorted the colour issue.
What exactly should I modify in that logic to say that if they respond correctly to a black answer they are given a green O and if the do not respond to a red answer they are given a green O
/ iscorrectresponse = [(values.correctness == 1 && trial.1digit1digit.response == parameters.correctresponsekey) ||
(values.correctness == 2 && trial.1digit1digit.response == 0)]

First you should add a value (cf. the <values> element in the script) and associated logic that indicates whether the given trial is a "stop" trial or not. Then you would change the /iscorrectresponse logic to something along the lines of:

/ iscorrectresponse = [(values.isstoptrial==false && values.correctness == 1 && trial.1digit1digit.response == parameters.correctresponsekey) ||
(values.isstoptrial==false && values.correctness == 2 && trial.1digit1digit.response == 0) || (values.isstoptrial==true &&  trial.1digit1digit.response == 0)]
catithomas
catithomas
Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)
Group: Forum Members
Posts: 4, Visits: 16
Dave - Wednesday, July 19, 2017
catithomas - Wednesday, July 19, 2017
Dave - Thursday, July 13, 2017
catithomas - Thursday, July 13, 2017
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks

Sure. You can change the color of the <text mathanswer> element via /ontrialbegin logic. Set up a list with the two display colors black and red

<list answercolor>
/ items = (black, orangered)
/ poolsize = parameters.maxnr_mathproblems
</list>

with as many items as there are math problems per its /poolsize (40 is the default), i.e. here the list will contain 20 x the color black and 20 x the color red.

Then set the text.mathanswer.textcolor to a color sampled from the list /ontrialbegin:

<trial 1digit1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

<trial 2digits1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

and so forth.

Hi again Dave,

Got the colours working now some follow up questions:

1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

2) In the original task feedback is provided to pts (green O for correct, red X for incorrect) I would like the task to state pts should NOT respond to any answers displayed in colour (i.e. inhibit a spacebar press to 50% of the answers displayed) in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not. If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

Thank you

> 1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange
> but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

The solution outlined in my original response should do just that. 50% in red, regardless of level. What exactly did you implement instead and how?

> in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not.

You should modify the <trial>s' /iscorrectresponse logic accordingly. I.e., the the given trial is a "stop"-trial (response displayed in red color), no response (0) should be taken as the correct response.

> If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

If you'd rather suppress feedback entirely, remove the /correctmessage and /erromessage attributes from the <trial> elements.

Thanks have sorted the colour issue.
What exactly should I modify in that logic to say that if they respond correctly to a black answer they are given a green O and if the do not respond to a red answer they are given a green O
/ iscorrectresponse = [(values.correctness == 1 && trial.1digit1digit.response == parameters.correctresponsekey) ||
(values.correctness == 2 && trial.1digit1digit.response == 0)]

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
catithomas - Wednesday, July 19, 2017
Dave - Thursday, July 13, 2017
catithomas - Thursday, July 13, 2017
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks

Sure. You can change the color of the <text mathanswer> element via /ontrialbegin logic. Set up a list with the two display colors black and red

<list answercolor>
/ items = (black, orangered)
/ poolsize = parameters.maxnr_mathproblems
</list>

with as many items as there are math problems per its /poolsize (40 is the default), i.e. here the list will contain 20 x the color black and 20 x the color red.

Then set the text.mathanswer.textcolor to a color sampled from the list /ontrialbegin:

<trial 1digit1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

<trial 2digits1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

and so forth.

Hi again Dave,

Got the colours working now some follow up questions:

1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

2) In the original task feedback is provided to pts (green O for correct, red X for incorrect) I would like the task to state pts should NOT respond to any answers displayed in colour (i.e. inhibit a spacebar press to 50% of the answers displayed) in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not. If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

Thank you

> 1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange
> but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

The solution outlined in my original response should do just that. 50% in red, regardless of level. What exactly did you implement instead and how?

> in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not.

You should modify the <trial>s' /iscorrectresponse logic accordingly. I.e., the the given trial is a "stop"-trial (response displayed in red color), no response (0) should be taken as the correct response.

> If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

If you'd rather suppress feedback entirely, remove the /correctmessage and /erromessage attributes from the <trial> elements.

catithomas
catithomas
Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)
Group: Forum Members
Posts: 4, Visits: 16
Dave - Thursday, July 13, 2017
catithomas - Thursday, July 13, 2017
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks

Sure. You can change the color of the <text mathanswer> element via /ontrialbegin logic. Set up a list with the two display colors black and red

<list answercolor>
/ items = (black, orangered)
/ poolsize = parameters.maxnr_mathproblems
</list>

with as many items as there are math problems per its /poolsize (40 is the default), i.e. here the list will contain 20 x the color black and 20 x the color red.

Then set the text.mathanswer.textcolor to a color sampled from the list /ontrialbegin:

<trial 1digit1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

<trial 2digits1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

and so forth.

Hi again Dave,

Got the colours working now some follow up questions:

1) Is it possible to randomise the colour presentation across all levels of difficulty at the moment for example all 2digit-1digit answers will be displayed in orange but is there a way to make it so 50% of all presented items regardless of the difficulty level will display in orange and be randomised?

2) In the original task feedback is provided to pts (green O for correct, red X for incorrect) I would like the task to state pts should NOT respond to any answers displayed in colour (i.e. inhibit a spacebar press to 50% of the answers displayed) in doing so correct inhibition should display with a green O but at the moment it still reflects whether the actual answer was correct or not. If it's not possible to set this up what part of the script should I remove to get rid of the feedback all together?

Thank you

catithomas
catithomas
Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)
Group: Forum Members
Posts: 4, Visits: 16
Dave - Thursday, July 13, 2017
catithomas - Thursday, July 13, 2017
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks

Sure. You can change the color of the <text mathanswer> element via /ontrialbegin logic. Set up a list with the two display colors black and red

<list answercolor>
/ items = (black, orangered)
/ poolsize = parameters.maxnr_mathproblems
</list>

with as many items as there are math problems per its /poolsize (40 is the default), i.e. here the list will contain 20 x the color black and 20 x the color red.

Then set the text.mathanswer.textcolor to a color sampled from the list /ontrialbegin:

<trial 1digit1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

<trial 2digits1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

and so forth.

Thanks Dave! First time using this program so I'll give that a go and see how it works out - thanks for the quick reply.

Cati :)
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
catithomas - Thursday, July 13, 2017
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks

Sure. You can change the color of the <text mathanswer> element via /ontrialbegin logic. Set up a list with the two display colors black and red

<list answercolor>
/ items = (black, orangered)
/ poolsize = parameters.maxnr_mathproblems
</list>

with as many items as there are math problems per its /poolsize (40 is the default), i.e. here the list will contain 20 x the color black and 20 x the color red.

Then set the text.mathanswer.textcolor to a color sampled from the list /ontrialbegin:

<trial 1digit1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

<trial 2digits1digit>
/ ontrialbegin = [
    text.mathanswer.textcolor = list.answercolor.nextvalue;
]
...
</trial>

and so forth.

catithomas
catithomas
Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)Respected Member (444 reputation)
Group: Forum Members
Posts: 4, Visits: 16
Hi,

Does anyone know if its possible to change the colour of 50% of the answers displayed in Turner's mental maths task? Am hoping to use a change of colour as a stop signal. Any advice or tips would be appreciated!

Thanks
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search