How to set "correctresponse" to an item in the code?


Author
Message
Clusi
Clusi
Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)
Group: Forum Members
Posts: 8, Visits: 19
Hello everyone!

I am currently programming a script where each of the 50 cue items has 1 corresponding response item. Throughout the paradigm, participants must learn their association, so when presented with the cue item, they should write down the response item in a textbox. Irrespective of whether they gave the correct answer, they will be presented with the correct answer after every trial. I would like to know 2 things:

1. How to set the corresponding response item as the correct response of the respective cue item? (So that I can let inquisit count the number of correctly recalled items)

2. How to deal with spelling mistakes? (Can I program for example that the responses should have 80% the correct letters?)

Below you find a shortened version of the elements (with just 5 items) that are relevant to this question.

Thank you all very much for your answers. ;) I am really stuck on these questions :/

Kind regards,

Clusi
---------------------------------
<item real_response_word>
/1 = "HOUR"
/2 = "NECKLACE"
/3 = "COTTON"
/4 = "BOURBON"
/5 = "CIGAR"
</item>

<item real_cue_word>
/1 = "ERRAND"
/2 = "CLUSTER"
/3 = "SNAG"
/4 = "RELIEF"
/5 = "VICE"
</item>

<text type_response_word>
/items = ("Type in the RESPONSE word")
/position = (50%, 70%)
/ fontstyle = ("Arial", 5%)
</text>

<text focuspoint>
/items = ("+")
/position = (50%, 50%)
/ fontstyle = ("Arial", 8%)
</text>

<text cue_word_testfeedback>
/ items = real_cue_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ select = noreplacenorepeat
</text>

<text response_word_testfeedback>
/ items = real_response_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ color = blue
/ select = text.cue_word_testfeedback.currentitemnumber
</text>

<openended testfeedback_phase>
/ stimulustimes = [0= text.focuspoint; 200=cue_word_testfeedback; 200=text.type_response_word]
/ response = correct
/ correctresponse = (text.response_word_testfeedback)
/ position = (50,90)
/ recorddata = true
/ timeout = 5400
</openended>

feedback
<trial testfeedback_phase_feedback_cycle1>
/stimulustimes = [200=response_word_testfeedback]
/timeout = 2200
/ posttrialpause = 300
</trial>


<block testfeedback_phase>
/ trials = [1-5= sequence(openended.testfeedback_phase, trial.testfeedback_phase_feedback_cycle1)]
</block>

<expt testfeedback>
/ blocks = [1=block.testfeedback_phase]
</expt>


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
Clusi - 8/3/2020
Hello everyone!

I am currently programming a script where each of the 50 cue items has 1 corresponding response item. Throughout the paradigm, participants must learn their association, so when presented with the cue item, they should write down the response item in a textbox. Irrespective of whether they gave the correct answer, they will be presented with the correct answer after every trial. I would like to know 2 things:

1. How to set the corresponding response item as the correct response of the respective cue item? (So that I can let inquisit count the number of correctly recalled items)

2. How to deal with spelling mistakes? (Can I program for example that the responses should have 80% the correct letters?)

Below you find a shortened version of the elements (with just 5 items) that are relevant to this question.

Thank you all very much for your answers. ;) I am really stuck on these questions :/

Kind regards,

Clusi
---------------------------------
<item real_response_word>
/1 = "HOUR"
/2 = "NECKLACE"
/3 = "COTTON"
/4 = "BOURBON"
/5 = "CIGAR"
</item>

<item real_cue_word>
/1 = "ERRAND"
/2 = "CLUSTER"
/3 = "SNAG"
/4 = "RELIEF"
/5 = "VICE"
</item>

<text type_response_word>
/items = ("Type in the RESPONSE word")
/position = (50%, 70%)
/ fontstyle = ("Arial", 5%)
</text>

<text focuspoint>
/items = ("+")
/position = (50%, 50%)
/ fontstyle = ("Arial", 8%)
</text>

<text cue_word_testfeedback>
/ items = real_cue_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ select = noreplacenorepeat
</text>

<text response_word_testfeedback>
/ items = real_response_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ color = blue
/ select = text.cue_word_testfeedback.currentitemnumber
</text>

<openended testfeedback_phase>
/ stimulustimes = [0= text.focuspoint; 200=cue_word_testfeedback; 200=text.type_response_word]
/ response = correct
/ correctresponse = (text.response_word_testfeedback)
/ position = (50,90)
/ recorddata = true
/ timeout = 5400
</openended>

feedback
<trial testfeedback_phase_feedback_cycle1>
/stimulustimes = [200=response_word_testfeedback]
/timeout = 2200
/ posttrialpause = 300
</trial>


<block testfeedback_phase>
/ trials = [1-5= sequence(openended.testfeedback_phase, trial.testfeedback_phase_feedback_cycle1)]
</block>

<expt testfeedback>
/ blocks = [1=block.testfeedback_phase]
</expt>


> 1. How to set the corresponding response item as the correct response of the respective cue item? (So that I can let inquisit count the number of correctly recalled items)

Per /iscorrectresponse:

<item real_response_word>
/1 = "HOUR"
/2 = "NECKLACE"
/3 = "COTTON"
/4 = "BOURBON"
/5 = "CIGAR"
</item>

<item real_cue_word>
/1 = "ERRAND"
/2 = "CLUSTER"
/3 = "SNAG"
/4 = "RELIEF"
/5 = "VICE"
</item>

<text type_response_word>
/items = ("Type in the RESPONSE word")
/position = (50%, 70%)
/ fontstyle = ("Arial", 5%)
</text>

<text focuspoint>
/items = ("+")
/position = (50%, 50%)
/ fontstyle = ("Arial", 8%)
</text>

<text cue_word_testfeedback>
/ items = real_cue_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ select = noreplacenorepeat
</text>

<text response_word_testfeedback>
/ items = real_response_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ color = blue
/ select = text.cue_word_testfeedback.currentitemnumber
</text>

<openended testfeedback_phase>
/ stimulustimes = [0= text.focuspoint; 200=cue_word_testfeedback; 200=text.type_response_word]
/ response = correct
/ iscorrectresponse = [
    toupper(openended.testfeedback_phase.response) == item.real_response_word.item(text.cue_word_testfeedback.currentindex);
]
/ position = (50,90)
/ recorddata = true
/ timeout = 5400
</openended>

feedback
<trial testfeedback_phase_feedback_cycle1>
/stimulustimes = [200=response_word_testfeedback]
/timeout = 2200
/ posttrialpause = 300
</trial>

<block testfeedback_phase>
/ trials = [1-5= sequence(openended.testfeedback_phase, trial.testfeedback_phase_feedback_cycle1)]
</block>

<expt testfeedback>
/ blocks = [1=block.testfeedback_phase]
</expt>

> 2. How to deal with spelling mistakes? (Can I program for example that the responses should have 80% the correct letters?)

In short: You don't. Longer answer: If you're feeling creative, you can see whatever you can come up with by elaborate use of the available string functions.

https://www.millisecond.com/support/docs/v6/html/language/expressions/functions.htm

Percentage of letters would be a bad metric. What you'd really want is a proper edit distance metric ( https://en.wikipedia.org/wiki/Edit_distance ) such as Levenshtein distance ( https://en.wikipedia.org/wiki/Levenshtein_distance ) or the more complex Damerau-Levenshtein distance metric ( https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance ). However, these algorithms aren't the easiest to implement and they can be quite costly computationally, so I'd probably opt for calculating these later during data analysis instead of on-the-fly if I were you.



Edited 4 Years Ago by Dave
Clusi
Clusi
Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)
Group: Forum Members
Posts: 8, Visits: 19
Dave - 8/3/2020
Clusi - 8/3/2020
Hello everyone!

I am currently programming a script where each of the 50 cue items has 1 corresponding response item. Throughout the paradigm, participants must learn their association, so when presented with the cue item, they should write down the response item in a textbox. Irrespective of whether they gave the correct answer, they will be presented with the correct answer after every trial. I would like to know 2 things:

1. How to set the corresponding response item as the correct response of the respective cue item? (So that I can let inquisit count the number of correctly recalled items)

2. How to deal with spelling mistakes? (Can I program for example that the responses should have 80% the correct letters?)

Below you find a shortened version of the elements (with just 5 items) that are relevant to this question.

Thank you all very much for your answers. ;) I am really stuck on these questions :/

Kind regards,

Clusi
---------------------------------
<item real_response_word>
/1 = "HOUR"
/2 = "NECKLACE"
/3 = "COTTON"
/4 = "BOURBON"
/5 = "CIGAR"
</item>

<item real_cue_word>
/1 = "ERRAND"
/2 = "CLUSTER"
/3 = "SNAG"
/4 = "RELIEF"
/5 = "VICE"
</item>

<text type_response_word>
/items = ("Type in the RESPONSE word")
/position = (50%, 70%)
/ fontstyle = ("Arial", 5%)
</text>

<text focuspoint>
/items = ("+")
/position = (50%, 50%)
/ fontstyle = ("Arial", 8%)
</text>

<text cue_word_testfeedback>
/ items = real_cue_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ select = noreplacenorepeat
</text>

<text response_word_testfeedback>
/ items = real_response_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ color = blue
/ select = text.cue_word_testfeedback.currentitemnumber
</text>

<openended testfeedback_phase>
/ stimulustimes = [0= text.focuspoint; 200=cue_word_testfeedback; 200=text.type_response_word]
/ response = correct
/ correctresponse = (text.response_word_testfeedback)
/ position = (50,90)
/ recorddata = true
/ timeout = 5400
</openended>

feedback
<trial testfeedback_phase_feedback_cycle1>
/stimulustimes = [200=response_word_testfeedback]
/timeout = 2200
/ posttrialpause = 300
</trial>


<block testfeedback_phase>
/ trials = [1-5= sequence(openended.testfeedback_phase, trial.testfeedback_phase_feedback_cycle1)]
</block>

<expt testfeedback>
/ blocks = [1=block.testfeedback_phase]
</expt>


> 1. How to set the corresponding response item as the correct response of the respective cue item? (So that I can let inquisit count the number of correctly recalled items)

Per /iscorrectresponse:

<item real_response_word>
/1 = "HOUR"
/2 = "NECKLACE"
/3 = "COTTON"
/4 = "BOURBON"
/5 = "CIGAR"
</item>

<item real_cue_word>
/1 = "ERRAND"
/2 = "CLUSTER"
/3 = "SNAG"
/4 = "RELIEF"
/5 = "VICE"
</item>

<text type_response_word>
/items = ("Type in the RESPONSE word")
/position = (50%, 70%)
/ fontstyle = ("Arial", 5%)
</text>

<text focuspoint>
/items = ("+")
/position = (50%, 50%)
/ fontstyle = ("Arial", 8%)
</text>

<text cue_word_testfeedback>
/ items = real_cue_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ select = noreplacenorepeat
</text>

<text response_word_testfeedback>
/ items = real_response_word
/ fontstyle = ("Arial", 8%)
/ position = (50%, 50%)
/ color = blue
/ select = text.cue_word_testfeedback.currentitemnumber
</text>

<openended testfeedback_phase>
/ stimulustimes = [0= text.focuspoint; 200=cue_word_testfeedback; 200=text.type_response_word]
/ response = correct
/ iscorrectresponse = [
    toupper(openended.testfeedback_phase.response) == item.real_response_word.item(text.cue_word_testfeedback.currentindex);
]
/ position = (50,90)
/ recorddata = true
/ timeout = 5400
</openended>

feedback
<trial testfeedback_phase_feedback_cycle1>
/stimulustimes = [200=response_word_testfeedback]
/timeout = 2200
/ posttrialpause = 300
</trial>

<block testfeedback_phase>
/ trials = [1-5= sequence(openended.testfeedback_phase, trial.testfeedback_phase_feedback_cycle1)]
</block>

<expt testfeedback>
/ blocks = [1=block.testfeedback_phase]
</expt>

> 2. How to deal with spelling mistakes? (Can I program for example that the responses should have 80% the correct letters?)

In short: You don't. Longer answer: If you're feeling creative, you can see whatever you can come up with by elaborate use of the available string functions.

https://www.millisecond.com/support/docs/v6/html/language/expressions/functions.htm

Percentage of letters would be a bad metric. What you'd really want is a proper edit distance metric ( https://en.wikipedia.org/wiki/Edit_distance ) such as Levenshtein distance ( https://en.wikipedia.org/wiki/Levenshtein_distance ) or the more complex Damerau-Levenshtein distance metric ( https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance ). However, these algorithms aren't the easiest to implement and they can be quite costly computationally, so I'd probably opt for calculating these later during data analysis instead of on-the-fly if I were you.



Hi Dave,

Thank you very much for your feedback on both of my questions, and also for all the other answers you have provided in this forum. You have solved many of my questions as a first-time inquisit user in previous posts. I am going to look nto the second question in more detail :)

Kind regards,

Clusi
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search