Millisecond Online Community

Forums & Feeds
Welcome to Millisecond Online Community Sign in | Join | Help
in Search

Problem with radiobuttons.q1.response

Last post 09-08-2008, 8:51 AM by Dave. 7 replies.
Sort Posts: Previous Next
  •  08-31-2008, 7:00 PM 1881

    Problem with radiobuttons.q1.response

    I think I may have uncovered a bug in the response part of radiobuttons.  When I run the following script, it will correctly tell me which stimuli I picked in the second trial but it won't report back what I picked in the radiobutton. In fact, none of the survey stuff seems to work (options, optionvalue and also dropdown, etc.)

    <expt >
    / blocks = [1=stuff]
    </expt>

    <block stuff>
    / trials = [1=florida_ed2; 2=choices; 3=some]
    </block>
    <surveypage florida_ed2>
    / caption = "Please answer the following demographic questions (continued)"
    / questions = [1=florida_ed1]
    </surveypage>

    <trial some>
    / inputdevice = mouse
    / stimulusframes = [1=sometext]
    / validresponse = (sometext)
    </trial>

    <text sometext>
    / items= ("response = <% radiobuttons.florida_ed1.response %>; trial=<% trial.choices.response %>")
    </text>

    <text choiceA>
    / items = ("Pick A")
    / size = (60%, 9%)
    / position = (50%,45%)
    / valign = bottom
    / txcolor = blue
    </text>

    <text choiceB>
    / items= ("Pick B")
    / size = (60%, 9%)
    / position = (50%, 55%)
    / valign = bottom
    / txcolor = blue
    </text>

    <trial choices>
    / stimulusframes = [1=choiceA, choiceB]
    / validresponse = (choiceA, choiceB)
    / inputdevice = mouse
    </trial>

    <radiobuttons florida_ed1>
    / fontstyle = ("Arial", 1.5%)
    / caption = "What was the last college that you attended in Florida?"
    / options = ("Barry University","Beacon College","Bethune-Cookman College","Eckerd College","Embry-Riddle","Flagler College",
    "Florida A&M Law School","Florida A&M University","Florida Agriculture & Mechanical University","Florida Atlantic University",
    "Florida Coastal School of Law","Florida Gulf Coast University","Florida Institute of Technology","Florida International University",
    "Florida International University School of Law","Florida Southern College","Florida State University","New College of Florida",
    "Nova Southeastern University","St Thomas University School of Law","Stetson University","University of Central Florida",
    "University of Florida","University of Miami","University of North Florida","University of South Florida","University of West Florida")
    </radiobuttons>

    <data >
    / file = "C:"
    </data>
  •  09-01-2008, 2:10 AM 1882 in reply to 1881

    Re: Problem with radiobuttons.q1.response

    I've also noticed this behavior described by Michael and I have some additional observations: The properties of survey questions appear to be inaccessible only when running them like standard trial elements (i.e. as part of the /trials listing in a <block> element). If - instead - you run the survey questions / pages from a <survey> element, all the properties can be accessed. Maybe this could be a temporary workaround for you, Michael? Here's some code to try out:

    *** Survey Start ***

    <survey florida_ed>
    /pages = [1=florida_ed2; 2=checkresponse]
    </survey>

    <surveypage florida_ed2>
    / caption = "Please answer the following demographic questions (continued)"
    / questions = [1=florida_ed1]
    </surveypage>

    <radiobuttons florida_ed1>
    / fontstyle = ("Arial", 1.5%)
    / caption = "What was the last college that you attended in Florida?"
    / options = ("Barry University","Beacon College","Bethune-Cookman College","Eckerd College","Embry-Riddle","Flagler College",
    "Florida A&M Law School","Florida A&M University","Florida Agriculture & Mechanical University","Florida Atlantic University",
    "Florida Coastal School of Law","Florida Gulf Coast University","Florida Institute of Technology","Florida International University",
    "Florida International University School of Law","Florida Southern College","Florida State University","New College of Florida",
    "Nova Southeastern University","St Thomas University School of Law","Stetson University","University of Central Florida",
    "University of Florida","University of Miami","University of North Florida","University of South Florida","University of West Florida")
    </radiobuttons>

    <surveypage checkresponse>
    / questions = [1=check]
    </surveypage>

    <caption check>
    / caption = "response = <% radiobuttons.florida_ed1.response %>"
    </caption>

    *** Survey End ***

    Sean, is this behavior intended? In a related matter: I think it would be great to have separate properties for accessing response 'options' and 'optionvalues'. Specifying numerical '/ optionvalues' is great for data recording and analysis, but if you want to give participants feedback on some of their choices, a numerical value sometimes isn't what you want. To clarify:

    <radiobuttons q1>
    / caption="Who was the first president of the United States:"
    / options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
    </radiobuttons>

    In this case <% radiobuttons.q1.response %> will give you "George Washington" (at least if the participant is reasonably smart...). But when setting

    <radiobuttons q1>
    / caption="Who was the first president of the United States:"
    / options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
    / optionvalues=("1", "2", "3")
    </radiobuttons>

    <% radiobuttons.q1.response %>  will give you "1" with no (easy) way to retrieve the original response text "George Washington". I'd basically like to have both options at all times via different properties such as <% radiobuttons.q1.response %> for the response text and <% radiobuttons.q1.responsevalue %> for the associated numerical value. Any thoughts?

    Best,
    ~Dave
  •  09-01-2008, 8:44 AM 1883 in reply to 1882

    Re: Problem with radiobuttons.q1.response

    Michael,

    here's some code for another workaround, this time keeping the <expt > structure. The trick is to write the responses from the survey to an <item> element before presenting them in a <trial> element (changes are highlighted).

    *** Code Starts Here ***

    <expt >
    / blocks = [1=stuff]
    </expt>

    <block stuff>
    / trials = [1=florida_ed2; 2=choices; 3=some]
    </block>

    <surveypage florida_ed2>
    / caption = "Please answer the following demographic questions (continued)"
    / questions = [1=florida_ed1]
    / ontrialend = [item.florida_ed1_response.item = radiobuttons.florida_ed1.response]
    </surveypage>

    <trial some>
    / inputdevice = mouse
    / stimulusframes = [1=sometext]
    / validresponse = (sometext)
    </trial>

    <text sometext>
    / items= ("response = <% item.florida_ed1_response.item.1 %>; trial=<% trial.choices.response %>")
    </text>

    <item florida_ed1_response>
    </item>


    <text choiceA>
    / items = ("Pick A")
    / size = (60%, 9%)
    / position = (50%,45%)
    / valign = bottom
    / txcolor = blue
    </text>

    <text choiceB>
    / items= ("Pick B")
    / size = (60%, 9%)
    / position = (50%, 55%)
    / valign = bottom
    / txcolor = blue
    </text>

    <trial choices>
    / stimulusframes = [1=choiceA, choiceB]
    / validresponse = (choiceA, choiceB)
    / inputdevice = mouse
    </trial>

    <radiobuttons florida_ed1>
    / fontstyle = ("Arial", 1.5%)
    / caption = "What was the last college that you attended in Florida?"
    / options = ("Barry University","Beacon College","Bethune-Cookman College","Eckerd College","Embry-Riddle","Flagler College",
    "Florida A&M Law School","Florida A&M University","Florida Agriculture & Mechanical University","Florida Atlantic University",
    "Florida Coastal School of Law","Florida Gulf Coast University","Florida Institute of Technology","Florida International University",
    "Florida International University School of Law","Florida Southern College","Florida State University","New College of Florida",
    "Nova Southeastern University","St Thomas University School of Law","Stetson University","University of Central Florida",
    "University of Florida","University of Miami","University of North Florida","University of South Florida","University of West Florida")
    </radiobuttons>

    *** Code Ends Here ***

    Hope this helps,
    ~Dave
  •  09-02-2008, 12:18 PM 1889 in reply to 1883

    Re: Problem with radiobuttons.q1.response

    Thanks for reporting this bug. I am working on the fix and plan to release an update as soon as possible.

    -Sean

  •  09-02-2008, 12:33 PM 1891 in reply to 1889

    Re: Problem with radiobuttons.q1.response

    Dave, thanks for the work around.  It's gotten me over that stumbling block.

    Sean, great.  I'm sure future users will appreciate it.

     - Mike
  •  09-03-2008, 6:25 AM 1892 in reply to 1882

    Re: Problem with radiobuttons.q1.response

    Michael: I'm glad that one of the workarounds posted did the trick for you.

    Sean: I don't mean to bother you (knowing that you're a busy person), but could I get your thoughts on this matter:

    Dave:
    I think it would be great to have separate properties for accessing response 'options' and 'optionvalues'. Specifying numerical '/ optionvalues' is great for data recording and analysis, but if you want to give participants feedback on some of their choices, a numerical value sometimes isn't what you want. To clarify:

    <radiobuttons q1>
    / caption="Who was the first president of the United States:"
    / options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
    </radiobuttons>

    In this case <% radiobuttons.q1.response %> will give you "George Washington" (at least if the participant is reasonably smart...). But when setting

    <radiobuttons q1>
    / caption="Who was the first president of the United States:"
    / options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
    / optionvalues=("1", "2", "3")
    </radiobuttons>

    <% radiobuttons.q1.response %>  will give you "1" with no (easy) way to retrieve the original response text "George Washington". I'd basically like to have both options at all times via different properties such as <% radiobuttons.q1.response %> for the response text and <% radiobuttons.q1.responsevalue %> for the associated numerical value.



    Cheers,
    ~Dave
  •  09-08-2008, 8:08 AM 1910 in reply to 1892

    Re: Problem with radiobuttons.q1.response

    Hi Dave,

    Great suggestion, I think the value is obvious. Currently, there are "option" and "optionvalue" properties that allow you to access each option by index. You could write an expression that compares the response to each of the values and returns the matching one. Needless to say, that's a bit cumbersome.

    I could see two new properties - "responsetext" and "responsevalue" - that return the caption and the underlying value assigned to the response respectively. Not difficult to add, I'll try to get this into the next update.

    -Sean

  •  09-08-2008, 8:51 AM 1911 in reply to 1910

    Re: Problem with radiobuttons.q1.response

    seandr:
    You could write an expression that compares the response to each of the values and returns the matching one.


    Which is basically what I ended up doing. I also ended up thinking "so many lines of code for such a small thing", so I'm glad to hear that this will be much easier in the (near) future.

    Many thanks,
    ~Dave
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems