Difficulty with getting correct feedback messages


Author
Message
IanMahoney
IanMahoney
Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)
Group: Forum Members
Posts: 3, Visits: 22
I am running a categorization experiment and have difficulties setting up the trial outcomes and the corresponding messages in inquisit 5.

Ideally what will happen is:

1. 0.5sec Blank screen with a fixation cross.
2. 2 sec Stimulus (Image of category member). [Response captured after 50ms delay of stimulus onset (1950ms total to make a response)]
3. 2 sec Feedback (duration for each respectively 2 seconds) - 3 possible outcomes
                            - Correct decision -> Correct image shows for 2 seconds
                            - Incorrect decision -> Incorrect image shows for 2 seconds
                            - They fail to make a decision in time -> Too slow image shows for 2 seconds

Here is my attempt so far. I have been able to make a couple version of this work for correct/incorrect decisions but cannot impliment the too slow message.
All my attempts so far have had them able to make a response while the "too slow" image is shown.

<trial jupiterAA>
/ stimulustimes = [0=fixation; 500= stimulusimage; 2500= tooslowimage]
/ validresponse = ("j", "s", " ")
/ responsemessage = ("j", picture.correctanswer, 0)
/ responsemessage = ("s", picture.incorrectanswer, 0)
/ responsemessage = (" ", picture.incorrectanswer, 0)
/ posttrialpause = 2000
/ timeout = 2000
/ beginresponsetime = 550
</trial>

I know the too slow image will not work currently as it is going to be cleared off the screen immediately after being shown but I do not know what to do.

Thanks for your time.
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: 104K
IanMahoney - Friday, March 3, 2017
I am running a categorization experiment and have difficulties setting up the trial outcomes and the corresponding messages in inquisit 5.

Ideally what will happen is:

1. 0.5sec Blank screen with a fixation cross.
2. 2 sec Stimulus (Image of category member). [Response captured after 50ms delay of stimulus onset (1950ms total to make a response)]
3. 2 sec Feedback (duration for each respectively 2 seconds) - 3 possible outcomes
                            - Correct decision -> Correct image shows for 2 seconds
                            - Incorrect decision -> Incorrect image shows for 2 seconds
                            - They fail to make a decision in time -> Too slow image shows for 2 seconds

Here is my attempt so far. I have been able to make a couple version of this work for correct/incorrect decisions but cannot impliment the too slow message.
All my attempts so far have had them able to make a response while the "too slow" image is shown.

<trial jupiterAA>
/ stimulustimes = [0=fixation; 500= stimulusimage; 2500= tooslowimage]
/ validresponse = ("j", "s", " ")
/ responsemessage = ("j", picture.correctanswer, 0)
/ responsemessage = ("s", picture.incorrectanswer, 0)
/ responsemessage = (" ", picture.incorrectanswer, 0)
/ posttrialpause = 2000
/ timeout = 2000
/ beginresponsetime = 550
</trial>

I know the too slow image will not work currently as it is going to be cleared off the screen immediately after being shown but I do not know what to do.

Thanks for your time.

<block myblock>
/ trials = [1-3 = jupiteraa]
</block>

<trial jupiterAA>
/ stimulustimes = [0=fixation; 500= stimulus]
/ validresponse = ("j", "s", " ")
/ correctresponse = ("j")
/ timeout = 2500
/ beginresponsetime = 550
/ branch = [if (trial.jupiteraa.response == 0) trial.tooslowfb]
/ branch = [if (trial.jupiteraa.error) trial.errorfb]
/ branch = [if (trial.jupiteraa.correct) trial.correctfb]
</trial>

<trial correctfb>
/ stimulustimes = [0=correctstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial errorfb>
/ stimulustimes = [0=errorstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial tooslowfb>
/ stimulustimes = [0=tooslowstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<text fixation>
/ items = ("+")
</text>

<text stimulus>
/ items = ("Stim A", "Stim B", "Stim C")
</text>

<text correctstim>
/ items = ("correct")
</text>

<text errorstim>
/ items = ("error")
</text>

<text tooslowstim>
/ items = ("too slow")
</text>



IanMahoney
IanMahoney
Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)
Group: Forum Members
Posts: 3, Visits: 22
Dave - Friday, March 3, 2017

Thanks Dave

This is working nicely and as intended. 

I notice that it in the datafile it gives a separate trial for each possible response (which makes sense since that is how it was scripted) but this also makes it hard for me to analyze the data in SPSS. Is there a way I can set a variable within the trial where the response was made so that I keep track of the response for the odd numbered trials?

I have been trying to make something like this work with the if statements but I am running into issues with defining/declaring them.

<trial jupiterQQ>
/ stimulustimes = [0=fixation; 500= crit1A, crit2A, middlemiddleRandom, pic3, pic4, pic5, pic6, pic7, pic8]
/ validresponse = ("j", "s", " ")
/ correctresponse = ("j")
/ timeout = 2500
/ beginresponsetime = 550
/ if (trial.jupiterQQ.response == 0)
values.r = 1

/ branch = [if (trial.jupiterQQ.response == 0) trial.tooslowfb]
/ branch = [if (trial.jupiterQQ.error) trial.errorfb]
/ branch = [if (trial.jupiterQQ.correct) trial.correctfb]
</trial>

Thanks again for your help it is much 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: 13K, Visits: 104K
IanMahoney - Saturday, March 4, 2017
Dave - Friday, March 3, 2017

Thanks Dave

This is working nicely and as intended. 

I notice that it in the datafile it gives a separate trial for each possible response (which makes sense since that is how it was scripted) but this also makes it hard for me to analyze the data in SPSS. Is there a way I can set a variable within the trial where the response was made so that I keep track of the response for the odd numbered trials?

I have been trying to make something like this work with the if statements but I am running into issues with defining/declaring them.

<trial jupiterQQ>
/ stimulustimes = [0=fixation; 500= crit1A, crit2A, middlemiddleRandom, pic3, pic4, pic5, pic6, pic7, pic8]
/ validresponse = ("j", "s", " ")
/ correctresponse = ("j")
/ timeout = 2500
/ beginresponsetime = 550
/ if (trial.jupiterQQ.response == 0)
values.r = 1

/ branch = [if (trial.jupiterQQ.response == 0) trial.tooslowfb]
/ branch = [if (trial.jupiterQQ.error) trial.errorfb]
/ branch = [if (trial.jupiterQQ.correct) trial.correctfb]
</trial>

Thanks again for your help it is much appreciated!

You can set /recorddata = false in the three feedback <trial> elements to keep the data file cleaner. The data for the regular "non-feedback" trials tells you all you need to know (which response occurred: the response column -- if that is 0, no response occurred, i.e. too slow; the correct column tells you whether the response was correct).

IanMahoney
IanMahoney
Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)Partner Member (574 reputation)
Group: Forum Members
Posts: 3, Visits: 22
Hi Dave,

We have used your code in our experiment and it has been running perfectly!
Unfortunately, our current categorization is too hard for the participants and we are trying to add feedback (correct/incorrect with the stimuli) to the responses. The stimuli are an amalgamation of many random features (taken from several picture lists) so we are unable know what to reproduce on the timed out feedback trials.

Possible Solutions:
Is there a way to keep track of the images shown from the picture list and then be able to reproduce all of them on the feedback trials?
Is there a way to prevent the screen from clearing the image after every trial, more specifically between the response trial and the feedback trial?

Thanks again!
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: 104K
IanMahoney - Friday, March 24, 2017
Hi Dave,

We have used your code in our experiment and it has been running perfectly!
Unfortunately, our current categorization is too hard for the participants and we are trying to add feedback (correct/incorrect with the stimuli) to the responses. The stimuli are an amalgamation of many random features (taken from several picture lists) so we are unable know what to reproduce on the timed out feedback trials.

Possible Solutions:
Is there a way to keep track of the images shown from the picture list and then be able to reproduce all of them on the feedback trials?
Is there a way to prevent the screen from clearing the image after every trial, more specifically between the response trial and the feedback trial?

Thanks again!

> Is there a way to keep track of the images shown from the picture list and then be able to reproduce all of them on the feedback trials?

Surely. You can store the respective item numbers in global variables (<values>) and use the value(s) in /select attributes to reproduce the selection in the previous trial.

<block myblock>
/ trials = [1-3 = jupiteraa]
</block>

// three items
<list itemnumbers>
/ items = (1,2,3)
</list>

// here we store the item number
<values>
/ itemnumber = 1
</values>

// here we perform the selection of an the item number from the list
<trial jupiterAA>
/ ontrialbegin = [
    values.itemnumber = list.itemnumbers.nextvalue;
]

/ stimulustimes = [0=fixation; 500= stimulus]
/ validresponse = ("j", "s", " ")
/ correctresponse = ("j")
/ timeout = 2500
/ beginresponsetime = 550
/ branch = [if (trial.jupiteraa.response == 0) trial.tooslowfb]
/ branch = [if (trial.jupiteraa.error) trial.errorfb]
/ branch = [if (trial.jupiteraa.correct) trial.correctfb]
</trial>

// no selection of item number, i.e. displays same item
<trial correctfb>
/ stimulustimes = [0=stimulus, correctstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

// no selection of item number, i.e. displays same item
<trial errorfb>
/ stimulustimes = [0=stimulus, errorstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

// no selection of item number, i.e. displays same item
<trial tooslowfb>
/ stimulustimes = [0=stimulus, tooslowstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<text fixation>
/ items = ("+")
</text>

// selects item indicated by values.itemnumber
<text stimulus>
/ items = ("Stim A", "Stim B", "Stim C")
/ select = values.itemnumber
</text>

<text correctstim>
/ items = ("correct")
/ position = (50%, 70%)
</text>

<text errorstim>
/ items = ("error")
/ position = (50%, 70%)
</text>

<text tooslowstim>
/ items = ("too slow")
/ position = (50%, 70%)
</text>

> Is there a way to prevent the screen from clearing the image after every trial, more specifically between the response trial and the feedback trial?

Yes. If you want to prevent a stimulus from being automatically erased at the end of a trial, set the stimulus element's /erase attribute to false.

<block myblock>
/ trials = [1-3 = jupiteraa]
</block>

<trial jupiterAA>
/ stimulustimes = [0=fixation; 500= stimulus]
/ validresponse = ("j", "s", " ")
/ correctresponse = ("j")
/ timeout = 2500
/ beginresponsetime = 550
/ branch = [if (trial.jupiteraa.response == 0) trial.tooslowfb]
/ branch = [if (trial.jupiteraa.error) trial.errorfb]
/ branch = [if (trial.jupiteraa.correct) trial.correctfb]
</trial>

<trial correctfb>
/ stimulustimes = [0=correctstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial errorfb>
/ stimulustimes = [0=errorstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial tooslowfb>
/ stimulustimes = [0=tooslowstim]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<text fixation>
/ items = ("+")
/ size = (100%, 100%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text stimulus>
/ items = ("Stim A", "Stim B", "Stim C")
/ erase = false
</text>

<text correctstim>
/ items = ("correct")
/ position = (50%, 70%)
</text>

<text errorstim>
/ items = ("error")
/ position = (50%, 70%)
</text>

<text tooslowstim>
/ items = ("too slow")
/ position = (50%, 70%)
</text>


Edited 7 Years Ago by Dave
Thao Pham
Thao Pham
Associate Member (211 reputation)Associate Member (211 reputation)Associate Member (211 reputation)Associate Member (211 reputation)Associate Member (211 reputation)Associate Member (211 reputation)Associate Member (211 reputation)Associate Member (211 reputation)Associate Member (211 reputation)
Group: Forum Members
Posts: 11, Visits: 28
Hi Dave,
I have a similar question with this topic so I thought I should post it here.  I have followed your instructions above with the correct vs. error feedback. At the moment, my script looks like this:

<text practice_response>
/ items = ("Your answer:")
/ position = (50%, 70%)
/ fontstyle = ("Arial", 2.33%, false, false, false, false, 5, 0)
/ txcolor = (0, 0, 0)
/ txbgcolor = (255, 255, 255)
</text>

<text correctfb_text>
/ items = ("Correct!")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 10%, false, false, false, false, 5, 0)
/ txcolor = (0, 255, 0)
/ txbgcolor = (255, 255, 255)
</text>

<text errorfb_text>
/ items = ("Incorrect")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 10%, false, false, false, false, 5, 0)
/ txcolor = (255, 0, 0)
/ txbgcolor = (255, 255, 255)
</text>

<trial correctfb>
/ stimulustimes = [0=correctfb_text]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial errorfb>
/ stimulustimes = [0=errorfb_text]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<openended practice_1>
/ stimulusframes=[1= practice_picture_1, practice_response]
/ position = (50, 80)
/ linelength = 30
/ numlines = 1
/ inputdevice=keyboard
/ validresponse = ("0", "1", "2", "3", "4")
/ correctresponse = ("3")
/ recorddata = false
/ branch = [if (trial.practice_1.error) trial.errorfb]
/ branch = [if (trial.practice_1.correct) trial.correctfb]
/ ontrialend = [ values.correct_practice += trial.practice_1.correct]
/ buttonlabel = "Press Enter to continue"
</openended>

However, no matter what the input is (either correct or not), there was only one feedback:  Correct!  Can you tell me what I am doing wrong here?
Thank you!

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: 104K
Thao Pham - 2/27/2020
Hi Dave,
I have a similar question with this topic so I thought I should post it here.  I have followed your instructions above with the correct vs. error feedback. At the moment, my script looks like this:

<text practice_response>
/ items = ("Your answer:")
/ position = (50%, 70%)
/ fontstyle = ("Arial", 2.33%, false, false, false, false, 5, 0)
/ txcolor = (0, 0, 0)
/ txbgcolor = (255, 255, 255)
</text>

<text correctfb_text>
/ items = ("Correct!")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 10%, false, false, false, false, 5, 0)
/ txcolor = (0, 255, 0)
/ txbgcolor = (255, 255, 255)
</text>

<text errorfb_text>
/ items = ("Incorrect")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 10%, false, false, false, false, 5, 0)
/ txcolor = (255, 0, 0)
/ txbgcolor = (255, 255, 255)
</text>

<trial correctfb>
/ stimulustimes = [0=correctfb_text]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial errorfb>
/ stimulustimes = [0=errorfb_text]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<openended practice_1>
/ stimulusframes=[1= practice_picture_1, practice_response]
/ position = (50, 80)
/ linelength = 30
/ numlines = 1
/ inputdevice=keyboard
/ validresponse = ("0", "1", "2", "3", "4")
/ correctresponse = ("3")
/ recorddata = false
/ branch = [if (trial.practice_1.error) trial.errorfb]
/ branch = [if (trial.practice_1.correct) trial.correctfb]
/ ontrialend = [ values.correct_practice += trial.practice_1.correct]
/ buttonlabel = "Press Enter to continue"
</openended>

However, no matter what the input is (either correct or not), there was only one feedback:  Correct!  Can you tell me what I am doing wrong here?
Thank you!

/ branch = [if (trial.practice_1.error) trial.errorfb]
/ branch = [if (trial.practice_1.correct) trial.correctfb]

It's an <openended> element, not a <trial> element. Your /branch attributes need to read

/ branch = [if (openended.practice_1.error) trial.errorfb]
/ branch = [if (openended.practice_1.correct) trial.correctfb]
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search