By pawelstrojny - 6/15/2014
Hi, I found a topic from about 2004 which states that it is not possible but maybe after few years it became...
So, I have 20 sentences and want to ask participants to rank them on a basis of their importance from 1 to 20.
Is that possible to do that on the one display? For example by allowing participants to write the number next to each sentence or (even better) by dragging&dropping sentences. Or maybe by other way.
Basically I need to have all sentences on one screen and let participants to rank them somehow.
I'll be glad if you can help me.
|
By Dave - 6/15/2014
If you want to build a drag & drop mechanic, study the "Tower of London" script available from the Task Library. Be warned: This isn't trivial.
If you want to go with the "assign numbers" option, consider using <surveypage>s with a bunch of <caption>s, <textbox>es, <dropdown>s plus validation logic. See e.g. http://www.millisecond.com/forums/FindPost7561.aspx & https://www.millisecond.com/forums/FindPost7524.aspx
|
By pawelstrojny - 6/16/2014
Thanks Dave,
This solution https://www.millisecond.com/forums/Topic7520.aspx#bm7524 seems fine to me.
Because my sentences are many and quite long they don't fit the screen, I decided to reduce the ranking to top10, so participants are asked to rank the first 10 sentences (out of 20).
In that case your "demo" script wouldn't work because it demands every one's sentence appearance, right?
Do you have any idea how to reverse that demand? I mean, to change 20 "contains(values.rankstring,"sentencenumber")==true &&" into something like: "does not contain "sentencenumber" more than one"
|
By Dave - 6/16/2014
I don't understand the question, I'm afraid.
The scripts I referred you to enforce that every available rank (1,2,3 and 4 in the examples) is assigned *exactly once*.
|
By pawelstrojny - 6/16/2014
Yes and let's say that we want to force participants to choose only two of four (e.g. 1 & 2 or 1 & 3 but no 1 & 1 nor 1, 4, & 3).
In that case I can't use your script directly because in it participant have to "use" every answer exactly once. I need to change it to let participants to choose only two of four answers (no matter which) and not to repeat the answer chosen before.
Do you understand now?
|
By Dave - 6/16/2014
Yes, understood. Thanks for the clarification. Should be doable. However, here's what I don't "get": If you are ranking 2 out of 4 elements, you only have *two ranks* to assign (1 and 2). What sense does it make to allow for something like 1 and 3? Obviously, there *is* an element in this case with *implicit* rank 2 -- otherwise you would not have been able to assign rank 3 to another element.
|
By pawelstrojny - 6/16/2014
Now I understand what you don't :)
It's because I reversed "roles" in your script, because of my English limitation it would be easier to clarify it on the example; let's say we have four things (apple, orange, strawberry, apricot) and instruction says "Choose two most liked and rank that two", I'm not interested in the two less liked.
In order to do that I prepared two"dropdown" elements, first says "The most liked fruit" and the second "The second most liked fruit" and in options I have four fruits. My intention is to let participants choose one as "most liked", another one as "second" and to leave the rest unranked. As you see there is the reversion - what was the options in original script (Most liked, Second...) is the content of the "question" here and vice versa.
I decided to reverse it because it should be easier to choose between sentences than numbers in "dropdown" elements, but if it is difficult - I can go back to the original conception.
That's exactly my situation (but 20 sentences and participants need to rank 10 most important).
|
By Dave - 6/16/2014
Well, the original (assign rank to object) would be much easier (and thus preferable) to implement than the reverse (assign object to rank).
|
By Dave - 6/16/2014
For the sake of completeness, though, if you absolutely *must* go down the other route, something along the lines of
<values> / rankstring = "" / validranking = false </values>
<block myblock> / trials = [1=mypage] </block>
<text debug> / items = ("<%values.rankstring%>") / position = (50%, 5%) </text>
<surveypage mypage> / stimulusframes = [1=debug] / questions = [1=r01; 2=r02] / ontrialbegin = [values.rankstring=""] / ontrialend = [values.rankstring=concat(concat(values.rankstring,dropdown.r01.response),dropdown.r02.response)] / ontrialend = [if ( length(values.rankstring) == 2 && length(replaceall(values.rankstring, dropdown.r01.response, "")) == 1 && length(replaceall(values.rankstring, dropdown.r02.response, "")) == 1 ) values.validranking = true else values.validranking = false] / branch = [if ( values.validranking == false) surveypage.mypage] </surveypage>
<dropdown r01> / caption = "Rank 1" / options = ("Object A", "Object B", "Object C", "Object D") / optionvalues = ("A", "B", "C", "D") / required = true </dropdown>
<dropdown r02> / caption = "Rank 2" / options = ("Object A", "Object B", "Object C", "Object D") / optionvalues = ("A", "B", "C", "D") / required = true </dropdown>
should be workable.
|
By pawelstrojny - 6/16/2014
Thank you,
One more question - is that possible to change the script in the way that if participant makes mistake (e.g. skip one question) the script will communicate that but save the other answers? I expect to be really annoying when sb find that 19 answers are deleted and he must do it again :/
|
By Dave - 6/16/2014
Communicating a mistake: Yes. Adjust the /branch to some page or trial displaying a suitable error message. From there then /branch to the ranking page again.
Storing (or rather "restoring") previous answers: No.
|
By pawelstrojny - 6/17/2014
That's not a good news :/ Maybe there is a solution to "stop" script if two equal ranks are given? Like when you don't answer obligatory question?
|
By Dave - 6/17/2014
What's the point then in trying to validate responses at all? But alas, feel free to define a suitable /stop attribute.
|
By pawelstrojny - 6/17/2014
Basically we are interested in the proportion of categories of the chosen sentences (there are two categories).
I think I didn't explain it well. My point is to prepare a solution which will prevent participant from assigning ranks again when he make a mistake. Now if all conditions aren't met (the rank is doubled) the script goes back to the beginning of ranking task (erases all assigned ranks). My goal is to change it - the best would be if we can make script which simply won't go forward (and backward) - just like in case when one (or more) answer is missing; in the basic setup in that situation the missing question is marked red and "next" button doesn't react, could we do that - mark "doubled" ranks and wait for corrections without erasing all assigned ranks?
|
By Dave - 6/17/2014
Thanks for the useful clarification. I'm afraid, though, that isn't really possible. The only thing you *could* do, is run the <surveypage> via a <survey> element (instead of a <block>):
<values> / rankstring = "" / validranking = false </values>
<survey mysurvey> / pages = [1=mypage] / showbackbutton = false / showpagenumbers = false </survey>
<text debug> / items = ("<%values.rankstring%>") / position = (50%, 5%) </text>
<surveypage mypage> / stimulusframes = [1=debug] / questions = [1=r01; 2=r02] / ontrialbegin = [values.rankstring=""] / ontrialend = [values.rankstring=concat(concat(values.rankstring,dropdown.r01.response),dropdown.r02.response)] / ontrialend = [if ( length(values.rankstring) == 2 && length(replaceall(values.rankstring, dropdown.r01.response, "")) == 1 && length(replaceall(values.rankstring, dropdown.r02.response, "")) == 1 ) values.validranking = true else values.validranking = false] / branch = [if ( values.validranking == false) surveypage.mypage] </surveypage>
<dropdown r01> / caption = "Rank 1" / options = ("Object A", "Object B", "Object C", "Object D") / optionvalues = ("A", "B", "C", "D") / required = true </dropdown>
<dropdown r02> / caption = "Rank 2" / options = ("Object A", "Object B", "Object C", "Object D") / optionvalues = ("A", "B", "C", "D") / required = true </dropdown>
That will preserve previous responses, but it has other drawbacks: (1) The results will end up in a separate, differently formatted data file and (2) you will not get any record of how many times a given person had to adjust the ranking until he/she got it right.
|
By pawelstrojny - 6/19/2014
That's perfect solution for me. Thank you.
|
|