Failed to randomly select the text itme (only the first one keeps showing up)


Author
Message
sodagreen_l
sodagreen_l
Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)
Group: Forum Members
Posts: 15, Visits: 29
Dear Dave,

We want to introduce participants to a target. For each participant, the name will be randomly drawn from two possible names. We also want to present the other name at some point of the experiment.

Here is the gist of our syntax that we hope can achieve the above goals.

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

<block myblock>
/ trials = [1 = target; 2=noveltarget]
</block>

<page page1>
</page>

<trial target>
/ stimulustimes=[0=targetname;3000=targetname]
/ timeout=3000
/ posttrialpause = 1000
</trial>

<trial noveltarget>
/ stimulustimes = [0 = noveltargetname;3000=noveltargetname]
/ timeout=3000
/ posttrialpause = 1000
</trial>

<text twopossiblenames>
/ items=("Akar","Toma")
/ select=noreplace
/ selectionrate = experiment
</text>

<text targetname>
/ items = ("This is <%text.twopossiblenames.currentitem%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 16pt, true, false, false, false, 5)
</text>

<text noveltargetname>
/ items = ("This is <%text.twopossiblenames.nextvalue%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 16pt, true, false, false, false, 5)
</text>

However, there seems to be two problems.
(1) The target name will always be “Akar”. It will never be randomly selected to be “Toma”.
(2) How can we present the other one that is not selected? Because we want to present it as a prime word somewhere in our Evaluative Priming Task. The text element has an attribute “currentitem”. But it does not have an attribute “next item”, only “next value” or “next index”. 

I have been struggled with it for the past 6 hours, it would be very helpful if you could provide any suggestions or insight!

Look forward to hearing back from you. Thank you so much :)

sodagreen_l
sodagreen_l
Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)
Group: Forum Members
Posts: 15, Visits: 29
sodagreen_l - 2/20/2022
Dear Dave,

We want to introduce participants to a target. For each participant, the name will be randomly drawn from two possible names. We also want to present the other name at some point of the experiment.

Here is the gist of our syntax that we hope can achieve the above goals.

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

<block myblock>
/ trials = [1 = target; 2=noveltarget]
</block>

<page page1>
</page>

<trial target>
/ stimulustimes=[0=targetname;3000=targetname]
/ timeout=3000
/ posttrialpause = 1000
</trial>

<trial noveltarget>
/ stimulustimes = [0 = noveltargetname;3000=noveltargetname]
/ timeout=3000
/ posttrialpause = 1000
</trial>

<text twopossiblenames>
/ items=("Akar","Toma")
/ select=noreplace
/ selectionrate = experiment
</text>

<text targetname>
/ items = ("This is <%text.twopossiblenames.currentitem%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 16pt, true, false, false, false, 5)
</text>

<text noveltargetname>
/ items = ("This is <%text.twopossiblenames.nextvalue%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 16pt, true, false, false, false, 5)
</text>

However, there seems to be two problems.
(1) The target name will always be “Akar”. It will never be randomly selected to be “Toma”.
(2) How can we present the other one that is not selected? Because we want to present it as a prime word somewhere in our Evaluative Priming Task. The text element has an attribute “currentitem”. But it does not have an attribute “next item”, only “next value” or “next index”. 

I have been struggled with it for the past 6 hours, it would be very helpful if you could provide any suggestions or insight!

Look forward to hearing back from you. Thank you so much :)

Sorry, I meant "item" in the subject title
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
sodagreen_l - 2/20/2022
Dear Dave,

We want to introduce participants to a target. For each participant, the name will be randomly drawn from two possible names. We also want to present the other name at some point of the experiment.

Here is the gist of our syntax that we hope can achieve the above goals.

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

<block myblock>
/ trials = [1 = target; 2=noveltarget]
</block>

<page page1>
</page>

<trial target>
/ stimulustimes=[0=targetname;3000=targetname]
/ timeout=3000
/ posttrialpause = 1000
</trial>

<trial noveltarget>
/ stimulustimes = [0 = noveltargetname;3000=noveltargetname]
/ timeout=3000
/ posttrialpause = 1000
</trial>

<text twopossiblenames>
/ items=("Akar","Toma")
/ select=noreplace
/ selectionrate = experiment
</text>

<text targetname>
/ items = ("This is <%text.twopossiblenames.currentitem%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 16pt, true, false, false, false, 5)
</text>

<text noveltargetname>
/ items = ("This is <%text.twopossiblenames.nextvalue%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 16pt, true, false, false, false, 5)
</text>

However, there seems to be two problems.
(1) The target name will always be “Akar”. It will never be randomly selected to be “Toma”.
(2) How can we present the other one that is not selected? Because we want to present it as a prime word somewhere in our Evaluative Priming Task. The text element has an attribute “currentitem”. But it does not have an attribute “next item”, only “next value” or “next index”. 

I have been struggled with it for the past 6 hours, it would be very helpful if you could provide any suggestions or insight!

Look forward to hearing back from you. Thank you so much :)

Refer back to https://www.millisecond.com/forums/FindPost33945.aspx

In the same way the target name is selected, you can select the other name at some other point.

sodagreen_l
sodagreen_l
Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)
Group: Forum Members
Posts: 15, Visits: 29
I see, the code you provided in the previous post works greatly, which randomly presented one of the two target names from the pool. However, the baseline name that I want to select should always be different from the target name that I have presented already to the audience, which is a bit slightly different from the code that you provided. I have tried with different approach (please refer to the code below), but either the first item would not show up, or I cannot select the other name.

Thank you so much!!

<values>
/ targetname = ""
/ baselinename = ""
/ targetnameindex=0
</values>


<list pool1>
/ items = ("Akar", "Toma")
/ selectionrate = experiment
</list>

****Description of the target****
<item nomind>
/ 1 = "This target belongs to the group <%values.targetname%>."
/ 2 = "This <%values.targetname%> is brand-new."
/ 3 = "This <%values.targetname%> is durable."
/ 4 = "This <%values.targetname%> has different functions."
/ 5 = "This <%values.targetname%> has a pleasant scent."
/ 6 = "This <%values.targetname%> is light and handy."
/ 7 = "This <%values.targetname%> is mechanical."
/ 8 = "This <%values.targetname%> is automatic."
/ 9 = "This <%values.targetname%> is stationery."
</item>

<expt>
/ onexptbegin = [values.targetname = list.pool1.targetnameindex;values.baselinename=list.pool1.nextvalue]
/ blocks = [1=example]
</expt>

<block example>
/ trials = [1= targetdescriptiontrial;2=baselinedescriptiontrial]
</block>

<trial targetdescriptiontrial>
/ stimulusframes = [1=targetdescriptiontext]
/ validresponse = (57)
</trial>

<trial baselinedescriptiontrial>
/ stimulusframes = [1=baselinedescriptiontext]
/ validresponse = (57)
</trial>



<text targetdescriptiontext>
/ items = nomind
/ select = sequence
</text>

<text baselinedescriptiontext>
/ items = baseline
/ select = random
</text>

<item baseline>
/ 1 = "This target belongs to the group <%values.baselinename%>."
/ 2 = "This <%values.baselinename%> is brand-new."
/ 3 = "This <%values.baselinename%> is durable."
/ 4 = "This <%values.baselinename%> has different functions."
/ 5 = "This <%values.baselinename%> has a pleasant scent."
/ 6 = "This <%values.baselinename%> is light and handy."
/ 7 = "This <%values.baselinename%> is mechanical."
/ 8 = "This <%values.baselinename%> is automatic."
/ 9 = "This <%values.baselinename%> is stationery."
</item>
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
sodagreen_l - 2/28/2022
I see, the code you provided in the previous post works greatly, which randomly presented one of the two target names from the pool. However, the baseline name that I want to select should always be different from the target name that I have presented already to the audience, which is a bit slightly different from the code that you provided. I have tried with different approach (please refer to the code below), but either the first item would not show up, or I cannot select the other name.

Thank you so much!!

<values>
/ targetname = ""
/ baselinename = ""
/ targetnameindex=0
</values>


<list pool1>
/ items = ("Akar", "Toma")
/ selectionrate = experiment
</list>

****Description of the target****
<item nomind>
/ 1 = "This target belongs to the group <%values.targetname%>."
/ 2 = "This <%values.targetname%> is brand-new."
/ 3 = "This <%values.targetname%> is durable."
/ 4 = "This <%values.targetname%> has different functions."
/ 5 = "This <%values.targetname%> has a pleasant scent."
/ 6 = "This <%values.targetname%> is light and handy."
/ 7 = "This <%values.targetname%> is mechanical."
/ 8 = "This <%values.targetname%> is automatic."
/ 9 = "This <%values.targetname%> is stationery."
</item>

<expt>
/ onexptbegin = [values.targetname = list.pool1.targetnameindex;values.baselinename=list.pool1.nextvalue]
/ blocks = [1=example]
</expt>

<block example>
/ trials = [1= targetdescriptiontrial;2=baselinedescriptiontrial]
</block>

<trial targetdescriptiontrial>
/ stimulusframes = [1=targetdescriptiontext]
/ validresponse = (57)
</trial>

<trial baselinedescriptiontrial>
/ stimulusframes = [1=baselinedescriptiontext]
/ validresponse = (57)
</trial>



<text targetdescriptiontext>
/ items = nomind
/ select = sequence
</text>

<text baselinedescriptiontext>
/ items = baseline
/ select = random
</text>

<item baseline>
/ 1 = "This target belongs to the group <%values.baselinename%>."
/ 2 = "This <%values.baselinename%> is brand-new."
/ 3 = "This <%values.baselinename%> is durable."
/ 4 = "This <%values.baselinename%> has different functions."
/ 5 = "This <%values.baselinename%> has a pleasant scent."
/ 6 = "This <%values.baselinename%> is light and handy."
/ 7 = "This <%values.baselinename%> is mechanical."
/ 8 = "This <%values.baselinename%> is automatic."
/ 9 = "This <%values.baselinename%> is stationery."
</item>

<list pool1>
/ items = ("Akar", "Toma")
/ selectionrate = experiment
</list>


You've restricted the list to only allow for a single selection during the entire experiment. That's wrong, the selectionrate ought to be set to always.
sodagreen_l
sodagreen_l
Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)
Group: Forum Members
Posts: 15, Visits: 29
Dear Dave, I changed the selectionrate to always, however the <%values.targetname%> appeared empty, so it showed up as "This target belongs to the group.", but the second one <%values.baselinename%> worked, showing the proper name, either Akar or Toma.

<values>
/ targetname = ""
/ baselinename = ""
</values>


<list pool1>
/ items = ("Akar", "Toma")
/ selectionrate = always
</list>

****Description of the target****
<item nomind>
/ 1 = "This target belongs to the group <%values.targetname%>."
/ 2 = "This <%values.targetname%> is brand-new."
/ 3 = "This <%values.targetname%> is durable."
/ 4 = "This <%values.targetname%> has different functions."
/ 5 = "This <%values.targetname%> has a pleasant scent."
/ 6 = "This <%values.targetname%> is light and handy."
/ 7 = "This <%values.targetname%> is mechanical."
/ 8 = "This <%values.targetname%> is automatic."
/ 9 = "This <%values.targetname%> is stationery."
</item>

<expt>
/ onexptbegin = [values.targetname = list.pool1.currentvalue; values.baselinename=list.pool1.nextvalue]
/ blocks = [1=example]
</expt>

<block example>
/ trials = [1= targetdescriptiontrial;2=baselinedescriptiontrial]
</block>

<trial targetdescriptiontrial>
/ stimulusframes = [1=targetdescriptiontext]
/ validresponse = (57)
</trial>

<trial baselinedescriptiontrial>
/ stimulusframes = [1=baselinedescriptiontext]
/ validresponse = (57)
</trial>

<text targetdescriptiontext>
/ items = nomind
/ select = sequence
</text>

<text baselinedescriptiontext>
/ items = baseline
/ select = sequence
</text>

<item baseline>
/ 1 = "This target belongs to the group <%values.baselinename%>."
/ 2 = "This <%values.baselinename%> is brand-new."
/ 3 = "This <%values.baselinename%> is durable."
/ 4 = "This <%values.baselinename%> has different functions."
/ 5 = "This <%values.baselinename%> has a pleasant scent."
/ 6 = "This <%values.baselinename%> is light and handy."
/ 7 = "This <%values.baselinename%> is mechanical."
/ 8 = "This <%values.baselinename%> is automatic."
/ 9 = "This <%values.baselinename%> is stationery."
</item>
sodagreen_l
sodagreen_l
Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)Associate Member (199 reputation)
Group: Forum Members
Posts: 15, Visits: 29
Problem solved! I just changed the onexptbegin.

<expt>
/ onexptbegin = [values.targetname = list.pool1.nextvalue;values.baselinename=list.pool1.nextvalue]
/ blocks = [1=example]
</expt>

Thank you so much!



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
sodagreen_l - 3/1/2022
Problem solved! I just changed the onexptbegin.

<expt>
/ onexptbegin = [values.targetname = list.pool1.nextvalue;values.baselinename=list.pool1.nextvalue]
/ blocks = [1=example]
</expt>

Thank you so much!



Yes, that was the issue. By way of explanation: nextvalue causes a new sample to be taken from the list. currentvalue does not cause a new sample, it returns the currently selected value (i.e. a sample must have been caused previously).

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search