Referencing text from list in anchor property of likert element


Author
Message
Jakob
Jakob
Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)
Group: Forum Members
Posts: 14, Visits: 47
Hello,
I am having quite a complex script, in which I want to duplicate a likert element with different anchors depending on the trial. To make the script easier to adapt, I created a list. I want to reference from this list by the use of

<% list.listname.item %>

This works in text and item elements. However, this does not seem to work in the anchor property of the likert element. Is that impossible to do?

Here my script:

*creating list for each block containing the different colors that play a role as text elements
<list colors_text_01>
/ items = ("yellow", "blue")
/ selectionrate = block
</list>

*Trying to use the elements in likert scale
<likert likert_probability>
/ anchors = [1= "100% sure <%list.colors_text_01.items.1%>";
2= "90% sure <%list.colors_text_01.items.1%>";
3= "80% sure <%list.colors_text_01.items.1%>";
4= "70% sure <%list.colors_text_01.items.1%>";
5="60% sure <%list.colors_text_01.items.1%>";
6="undecided";
7= "60% sure <%list.colors_text_01.items.2%>";
8="70% sure <%list.colors_text_01.items.2%>";
9="80% sure <%list.colors_text_01.items.2%>";
10= "90% sure <%list.colors_text_01.items.2%>";
11 = "100% sure <%list.colors_text_01.items.2%>"]
/ stimulusframes = [1 = likert2]
/ fontstyle = ("Calibri", 1.7%)
/ numpoints = 11
/ inputdevice = mouse
/ position = (50,90)
</likert>

The anchors should read "100% sure yellow", "90% sure yellow", ..., "100% sure blue". However, this does not work.

This procedure works, however, in a text element:
<text instr>
/items = ("Please estimate which color will be displayed more frequently by the end (<%list.colors_text_01.items.1%> or <%list.colors_text_01.items.2%>)")
/ position = (50%, 20%)
/ fontstyle = ("Calibri", 2.6%)
/ erase = false
</text>

Here, it reads "Please estimate which color will be displayed more frequently by the end (yellow or blue)"

(In this form it probably does not look very practical to do so, but I want to be able to quickly change the text in the first list and reference to it at multiple instances in the script.)

Thank you very much!


Dave
Dave
Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)
Group: Administrators
Posts: 11K, Visits: 73K
Jakob - 2/1/2021
Hello,
I am having quite a complex script, in which I want to duplicate a likert element with different anchors depending on the trial. To make the script easier to adapt, I created a list. I want to reference from this list by the use of

<% list.listname.item %>

This works in text and item elements. However, this does not seem to work in the anchor property of the likert element. Is that impossible to do?

Here my script:

*creating list for each block containing the different colors that play a role as text elements
<list colors_text_01>
/ items = ("yellow", "blue")
/ selectionrate = block
</list>

*Trying to use the elements in likert scale
<likert likert_probability>
/ anchors = [1= "100% sure <%list.colors_text_01.items.1%>";
2= "90% sure <%list.colors_text_01.items.1%>";
3= "80% sure <%list.colors_text_01.items.1%>";
4= "70% sure <%list.colors_text_01.items.1%>";
5="60% sure <%list.colors_text_01.items.1%>";
6="undecided";
7= "60% sure <%list.colors_text_01.items.2%>";
8="70% sure <%list.colors_text_01.items.2%>";
9="80% sure <%list.colors_text_01.items.2%>";
10= "90% sure <%list.colors_text_01.items.2%>";
11 = "100% sure <%list.colors_text_01.items.2%>"]
/ stimulusframes = [1 = likert2]
/ fontstyle = ("Calibri", 1.7%)
/ numpoints = 11
/ inputdevice = mouse
/ position = (50,90)
</likert>

The anchors should read "100% sure yellow", "90% sure yellow", ..., "100% sure blue". However, this does not work.

This procedure works, however, in a text element:
<text instr>
/items = ("Please estimate which color will be displayed more frequently by the end (<%list.colors_text_01.items.1%> or <%list.colors_text_01.items.2%>)")
/ position = (50%, 20%)
/ fontstyle = ("Calibri", 2.6%)
/ erase = false
</text>

Here, it reads "Please estimate which color will be displayed more frequently by the end (yellow or blue)"

(In this form it probably does not look very practical to do so, but I want to be able to quickly change the text in the first list and reference to it at multiple instances in the script.)

Thank you very much!


Anchors cannot be changed dynamically under Inquisit 4 and 5. The code you posted, however, would work under Inquisit 6.
Jakob
Jakob
Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)
Group: Forum Members
Posts: 14, Visits: 47
Dave - 2/1/2021
Jakob - 2/1/2021
Hello,
I am having quite a complex script, in which I want to duplicate a likert element with different anchors depending on the trial. To make the script easier to adapt, I created a list. I want to reference from this list by the use of

<% list.listname.item %>

This works in text and item elements. However, this does not seem to work in the anchor property of the likert element. Is that impossible to do?

Here my script:

*creating list for each block containing the different colors that play a role as text elements
<list colors_text_01>
/ items = ("yellow", "blue")
/ selectionrate = block
</list>

*Trying to use the elements in likert scale
<likert likert_probability>
/ anchors = [1= "100% sure <%list.colors_text_01.items.1%>";
2= "90% sure <%list.colors_text_01.items.1%>";
3= "80% sure <%list.colors_text_01.items.1%>";
4= "70% sure <%list.colors_text_01.items.1%>";
5="60% sure <%list.colors_text_01.items.1%>";
6="undecided";
7= "60% sure <%list.colors_text_01.items.2%>";
8="70% sure <%list.colors_text_01.items.2%>";
9="80% sure <%list.colors_text_01.items.2%>";
10= "90% sure <%list.colors_text_01.items.2%>";
11 = "100% sure <%list.colors_text_01.items.2%>"]
/ stimulusframes = [1 = likert2]
/ fontstyle = ("Calibri", 1.7%)
/ numpoints = 11
/ inputdevice = mouse
/ position = (50,90)
</likert>

The anchors should read "100% sure yellow", "90% sure yellow", ..., "100% sure blue". However, this does not work.

This procedure works, however, in a text element:
<text instr>
/items = ("Please estimate which color will be displayed more frequently by the end (<%list.colors_text_01.items.1%> or <%list.colors_text_01.items.2%>)")
/ position = (50%, 20%)
/ fontstyle = ("Calibri", 2.6%)
/ erase = false
</text>

Here, it reads "Please estimate which color will be displayed more frequently by the end (yellow or blue)"

(In this form it probably does not look very practical to do so, but I want to be able to quickly change the text in the first list and reference to it at multiple instances in the script.)

Thank you very much!


Anchors cannot be changed dynamically under Inquisit 4 and 5. The code you posted, however, would work under Inquisit 6.

Thank you for your quick response.
Dave
Dave
Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)Supreme Being (958K reputation)
Group: Administrators
Posts: 11K, Visits: 73K
Jakob - 2/1/2021
Dave - 2/1/2021
Jakob - 2/1/2021
Hello,
I am having quite a complex script, in which I want to duplicate a likert element with different anchors depending on the trial. To make the script easier to adapt, I created a list. I want to reference from this list by the use of

<% list.listname.item %>

This works in text and item elements. However, this does not seem to work in the anchor property of the likert element. Is that impossible to do?

Here my script:

*creating list for each block containing the different colors that play a role as text elements
<list colors_text_01>
/ items = ("yellow", "blue")
/ selectionrate = block
</list>

*Trying to use the elements in likert scale
<likert likert_probability>
/ anchors = [1= "100% sure <%list.colors_text_01.items.1%>";
2= "90% sure <%list.colors_text_01.items.1%>";
3= "80% sure <%list.colors_text_01.items.1%>";
4= "70% sure <%list.colors_text_01.items.1%>";
5="60% sure <%list.colors_text_01.items.1%>";
6="undecided";
7= "60% sure <%list.colors_text_01.items.2%>";
8="70% sure <%list.colors_text_01.items.2%>";
9="80% sure <%list.colors_text_01.items.2%>";
10= "90% sure <%list.colors_text_01.items.2%>";
11 = "100% sure <%list.colors_text_01.items.2%>"]
/ stimulusframes = [1 = likert2]
/ fontstyle = ("Calibri", 1.7%)
/ numpoints = 11
/ inputdevice = mouse
/ position = (50,90)
</likert>

The anchors should read "100% sure yellow", "90% sure yellow", ..., "100% sure blue". However, this does not work.

This procedure works, however, in a text element:
<text instr>
/items = ("Please estimate which color will be displayed more frequently by the end (<%list.colors_text_01.items.1%> or <%list.colors_text_01.items.2%>)")
/ position = (50%, 20%)
/ fontstyle = ("Calibri", 2.6%)
/ erase = false
</text>

Here, it reads "Please estimate which color will be displayed more frequently by the end (yellow or blue)"

(In this form it probably does not look very practical to do so, but I want to be able to quickly change the text in the first list and reference to it at multiple instances in the script.)

Thank you very much!


Anchors cannot be changed dynamically under Inquisit 4 and 5. The code you posted, however, would work under Inquisit 6.

Thank you for your quick response.

What you can do under Inquisit 4 is building a custom likert scale using standard <text>, <trial>, etc. elements. You can use <text> elements as the anchors, and those can be changed dynamically.

*creating list for each block containing the different colors that play a role as text elements
<list colors_text_01>
/ items = ("yellow", "blue")
/ selectionrate = block
</list>

<block myblock>
/ trials = [1=example_likert]
</block>

<trial example_likert>
/ stimulusframes = [1=q, line, a01, a02, a03, a04, a05, 01, 02, 03, 04, 05]
/ inputdevice = mouse
/ validresponse = (01, 02, 03, 04, 05)
</trial>

<text q>
/ items = ("Some question...")
</text>

<shape line>
/ shape = rectangle
/ color = black
/ size = (60%, 1%)
/ position = (50%, 75%)
</shape>

<text 01>
/ items = ("1")
/ txbgcolor = grey
/ size = (4%,4%)
/ position = (20%, 75%)
/ vjustify = center
</text>

<text 02>
/ items = ("2")
/ txbgcolor = grey
/ size = (4%,4%)
/ position = (35%, 75%)
/ vjustify = center
</text>

<text 03>
/ items = ("3")
/ txbgcolor = grey
/ size = (4%,4%)
/ position = (50%, 75%)
/ vjustify = center
</text>

<text 04>
/ items = ("4")
/ txbgcolor = grey
/ size = (4%,4%)
/ position = (65%, 75%)
/ vjustify = center
</text>

<text 05>
/ items = ("5")
/ txbgcolor = grey
/ size = (4%,4%)
/ position = (80%, 75%)
/ vjustify = center
</text>

<text a01>
/ items = ("100% sure <%list.colors_text_01.items.1%>")
/ txbgcolor = grey
/ position = (20%, 65%)
</text>

<text a02>
/ items = ("60% sure <%list.colors_text_01.items.1%>")
/ txbgcolor = grey
/ position = (35%, 65%)
</text>

<text a03>
/ items = ("undecided")
/ txbgcolor = grey
/ position = (50%, 65%)
</text>

<text a04>
/ items = ("60% sure <%list.colors_text_01.items.2%>")
/ txbgcolor = grey
/ position = (65%, 65%)
</text>

<text a05>
/ items = ("100% sure <%list.colors_text_01.items.2%>")
/ txbgcolor = grey
/ position = (80%, 65%)
</text>

Jakob
Jakob
Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)Partner Member (525 reputation)
Group: Forum Members
Posts: 14, Visits: 47
Thank you very much. I will consider doing this.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search