Millisecond Forums

Can I use an openended response as a number?

https://forums.millisecond.com/Topic2440.aspx

By syzygy42 - 1/28/2009

Okay, here's the story:

I ask participants to answer a few hundred questions (for each trial, they click on one of two text stimuli).  At the end, I want to be able to retrieve one of their responses based upon the trial number that I specify.  Ideally, I'd like to type in the desired trial number.  Then, I'd like to display the participant's response to trial I specified.

I know that I can make a list (<item>) of participants' responses.  I know further that I can display any item from this list through a text element by specifying the list name and desired list position. However, I can't figure out how to dictate, via input, which trial I'm interested in.  That is, I can't figure out how to use an openended response as a means for selecting an item from a list.

Any advice?

-Andrea
By Dave - 1/29/2009

Hi Andrea,

that's a nice, little problem - especially considering Inquisit 2.0's rather restricted set of features (compared to version 3). But - quite surprisingly - this is actually possible. The solution certainly can be deemed 'abusive' from a programmer's point of view, but hey - it does the job. Here's some sample code to illustrate (pay close attention to the comments):

*** Trial To Collect Responses From Subjects ***

<trial mytrial>
/ pretrialpause = 500
/ stimulusframes = [1=yes, no]
/ inputdevice = mouse
/ validresponse = (yes, no)
</trial>

<text yes>
/ items = ("YES")
/ position = (40, 50)
</text>

<text no>
/ items = ("NO")
/ position = (60, 50)
</text>

*** Item Element To Store Responses From Subjects ***

<item mytrialresponse>
/ items = mytrial
</item>

*** Openended Element For Experimenter:
*** Enter <% item.mytrialresponse.1 %>
*** to retrieve the response made
*** on the first trial.
*** Enter <% item.mytrialresponse.2 %>
*** to retrieve the response made
*** on the second trial.

<openended answerselect>
/ stimulusframes=[1=trialselect]
/ position = (50, 50)
/ charlimit = 100
/ linelength = 40
/ numlines = 2
/ validresponse = (anyresponse)
/ responsetrial = (anyresponse, returnanswer)
</openended>

<text trialselect>
/ items = ("Select Response From Previous Trial:")
/ position = (50, 35)
</text>

<trial returnanswer>
/ stimulusframes = [1=returnanswer]
/ validresponse = (noresponse)
/ timeout = 5000
</trial>

<text returnanswer>
/ items = select
/ position = (50, 50)
</text>

<item select>
/ items = answerselect
</item>

*** Block Element Definition ***

<block myblock>
/ trials = [1-2=mytrial; 3=answerselect]
</block>

*** End of Code ***

Best wishes from a fellow Inquisit user,
~Dave
By syzygy42 - 1/30/2009

Dave,

Thanks for the suggestion...... Your program works when I run it, but as soon as I change one of your text items to one of mine, it only returns "0.00" when I try to retrieve the trial.  So, if I change your line
/ items = ("YES")
to
/ items = ("Receiving $200.00 in 37 days")
it stops working if that is the response that should be returned. 

Any insight?

-Andrea
By Dave - 1/30/2009

Hi Andrea,

I've tried to replicate the problem you described, but - alas - I couldn't. Even when changing

/ items = ("YES")

to
/ items = ("Receiving $200.00 in 37 days")

as you suggested, the response is returned correctly on my system. Have you made sure you're using the latest Inquisit version available?

Best wishes,
~Dave
By syzygy42 - 2/1/2009

The problem persists for me, and I checked - I am running the latest release of Inquisit 2 (2.0.61004.7).....

Does anyone have any ideas?  This is so frustrating. :(
By Dave - 2/2/2009

Andrea,



can you attach the full, non-working script to this thread? I'd have to
see the whole thing in order to develop further ideas, because right now I haven't
got a clue...



Best wishes from a fellow Inquisit user,

~Dave

Note to self.: Yay, 300 posts...;-)
By seandr - 2/6/2009

Sorry for the frustration Andrea. If you post your script, we can help.


P.S. to Dave: 300 posts? Wow.