Equal number of items


Author
Message
abhi
abhi
Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


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
abhi - 8/24/2022
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


Define what you mean by "2 lists of 10 items each." That's ambiguous at best. At a minimum, show some example code that illustrates your setup.
abhi
abhi
Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Dave - 8/24/2022
abhi - 8/24/2022
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


Define what you mean by "2 lists of 10 items each." That's ambiguous at best. At a minimum, show some example code that illustrates your setup.

Sorry. Here it is

Actually is working fine. But in some runs in 'runmonkey', it is not equal. I.e. I want 5 + 5 (healthy + unhealthy) in 1-10 trials and 5 + 5 (healthy + unhealthy) in 12-21 trials but sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials.


<text Healthy>
/ items = Healthy
/ select = random
</text>

<item Healthy >
/ 1="A"
/ 2="B"
/ 3="C"
/ 4="D"
/ 5="E"
/ 6="F"
/ 7="G"
/ 8="H"
/ 9="I"
/ 10="J"
</item>

<text UnHealthy>
/ items = UnHealthy
/ select = random
</text>

<item UnHealthy >
/ 1="AA"
/ 2="BB"
/ 3="CC"
/ 4="DD"
/ 5="EE"
/ 6="FF"
/ 7="GG"
/ 8="HH"
/ 9="II"
/ 10="JJ"
</item>

<surveypage Healthy>
/ stimulustimes = [1= Healthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<surveypage UnHealthy>
/ stimulustimes = [1= UnHealthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<block Healthiness>
/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]
/ responsemode = correct
/ recorddata = true
</block>

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
abhi - 8/24/2022
Dave - 8/24/2022
abhi - 8/24/2022
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


Define what you mean by "2 lists of 10 items each." That's ambiguous at best. At a minimum, show some example code that illustrates your setup.

Sorry. Here it is

Actually is working fine. But in some runs in 'runmonkey', it is not equal. I.e. I want 5 + 5 (healthy + unhealthy) in 1-10 trials and 5 + 5 (healthy + unhealthy) in 12-21 trials but sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials.


<text Healthy>
/ items = Healthy
/ select = random
</text>

<item Healthy >
/ 1="A"
/ 2="B"
/ 3="C"
/ 4="D"
/ 5="E"
/ 6="F"
/ 7="G"
/ 8="H"
/ 9="I"
/ 10="J"
</item>

<text UnHealthy>
/ items = UnHealthy
/ select = random
</text>

<item UnHealthy >
/ 1="AA"
/ 2="BB"
/ 3="CC"
/ 4="DD"
/ 5="EE"
/ 6="FF"
/ 7="GG"
/ 8="HH"
/ 9="II"
/ 10="JJ"
</item>

<surveypage Healthy>
/ stimulustimes = [1= Healthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<surveypage UnHealthy>
/ stimulustimes = [1= UnHealthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<block Healthiness>
/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]
/ responsemode = correct
/ recorddata = true
</block>

> sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials

Provide a data file that shows that, please. If the code is is what you posted, that's simply not possible.

abhi
abhi
Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Dave - 8/24/2022
abhi - 8/24/2022
Dave - 8/24/2022
abhi - 8/24/2022
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


Define what you mean by "2 lists of 10 items each." That's ambiguous at best. At a minimum, show some example code that illustrates your setup.

Sorry. Here it is

Actually is working fine. But in some runs in 'runmonkey', it is not equal. I.e. I want 5 + 5 (healthy + unhealthy) in 1-10 trials and 5 + 5 (healthy + unhealthy) in 12-21 trials but sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials.


<text Healthy>
/ items = Healthy
/ select = random
</text>

<item Healthy >
/ 1="A"
/ 2="B"
/ 3="C"
/ 4="D"
/ 5="E"
/ 6="F"
/ 7="G"
/ 8="H"
/ 9="I"
/ 10="J"
</item>

<text UnHealthy>
/ items = UnHealthy
/ select = random
</text>

<item UnHealthy >
/ 1="AA"
/ 2="BB"
/ 3="CC"
/ 4="DD"
/ 5="EE"
/ 6="FF"
/ 7="GG"
/ 8="HH"
/ 9="II"
/ 10="JJ"
</item>

<surveypage Healthy>
/ stimulustimes = [1= Healthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<surveypage UnHealthy>
/ stimulustimes = [1= UnHealthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<block Healthiness>
/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]
/ responsemode = correct
/ recorddata = true
</block>

> sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials

Provide a data file that shows that, please. If the code is is what you posted, that's simply not possible.

Here it is. Look at Column S. The ones in blue and yellow should be 5 before the break and 5 after the break. 

sometimes it is 4+6 from list A and B (not 5+5)


Attachments
Sample Data.xlsx (181 views, 13.00 KB)
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
abhi - 8/25/2022
Dave - 8/24/2022
abhi - 8/24/2022
Dave - 8/24/2022
abhi - 8/24/2022
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


Define what you mean by "2 lists of 10 items each." That's ambiguous at best. At a minimum, show some example code that illustrates your setup.

Sorry. Here it is

Actually is working fine. But in some runs in 'runmonkey', it is not equal. I.e. I want 5 + 5 (healthy + unhealthy) in 1-10 trials and 5 + 5 (healthy + unhealthy) in 12-21 trials but sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials.


<text Healthy>
/ items = Healthy
/ select = random
</text>

<item Healthy >
/ 1="A"
/ 2="B"
/ 3="C"
/ 4="D"
/ 5="E"
/ 6="F"
/ 7="G"
/ 8="H"
/ 9="I"
/ 10="J"
</item>

<text UnHealthy>
/ items = UnHealthy
/ select = random
</text>

<item UnHealthy >
/ 1="AA"
/ 2="BB"
/ 3="CC"
/ 4="DD"
/ 5="EE"
/ 6="FF"
/ 7="GG"
/ 8="HH"
/ 9="II"
/ 10="JJ"
</item>

<surveypage Healthy>
/ stimulustimes = [1= Healthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<surveypage UnHealthy>
/ stimulustimes = [1= UnHealthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<block Healthiness>
/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]
/ responsemode = correct
/ recorddata = true
</block>

> sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials

Provide a data file that shows that, please. If the code is is what you posted, that's simply not possible.

Here it is. Look at Column S. The ones in blue and yellow should be 5 before the break and 5 after the break. 

sometimes it is 4+6 from list A and B (not 5+5)


Thanks, but that cannot have been generated with code that looks like this:

/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]

The two bolded bits are two entirely separate selection pools, each consisting of no more and no fewer than 5 x "Healthy" trials and 5 x "Unhealthy" trials. There is no way for a trial to somehow wander from pool 1 to pool 2 and vice versa. (Whether the data was generated by the monkey or not is immaterial here; the monkey does not change anything about how selection pools function). You are guaranteed to see exactly 5 x "Healthy" and 5 x "Unhealthy" in random order for trials 1 to 10, Same for trials 12 to 21, which are sampled from the 2nd selection pool.

For data like you attached to happen, there would have to be a single common selection pool, e.g.

/ trials = [1-10, 12-21 = random (Healthy, UnHealthy); 11 = TakeaBreak;]

which defines one selection pool consisting of exactly 10 x "Healhty" trials and exactly 10 x "Unhealthy" trials. Here, you are guaranteed to see exactly 10 x "Healthy" and 10 x "Unhealthy" in random order for the 20 trials that are sampled from this single pool. It does not (and should not!) guarantee 5 x "Healthy" and 5 x "Unhealthy" for the 1st 10 samples taken from the pool.

Edited 2 Years Ago by Dave
abhi
abhi
Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)Guru (7.3K reputation)
Group: Forum Members
Posts: 114, Visits: 558
Dave - 8/25/2022
abhi - 8/25/2022
Dave - 8/24/2022
abhi - 8/24/2022
Dave - 8/24/2022
abhi - 8/24/2022
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


Define what you mean by "2 lists of 10 items each." That's ambiguous at best. At a minimum, show some example code that illustrates your setup.

Sorry. Here it is

Actually is working fine. But in some runs in 'runmonkey', it is not equal. I.e. I want 5 + 5 (healthy + unhealthy) in 1-10 trials and 5 + 5 (healthy + unhealthy) in 12-21 trials but sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials.


<text Healthy>
/ items = Healthy
/ select = random
</text>

<item Healthy >
/ 1="A"
/ 2="B"
/ 3="C"
/ 4="D"
/ 5="E"
/ 6="F"
/ 7="G"
/ 8="H"
/ 9="I"
/ 10="J"
</item>

<text UnHealthy>
/ items = UnHealthy
/ select = random
</text>

<item UnHealthy >
/ 1="AA"
/ 2="BB"
/ 3="CC"
/ 4="DD"
/ 5="EE"
/ 6="FF"
/ 7="GG"
/ 8="HH"
/ 9="II"
/ 10="JJ"
</item>

<surveypage Healthy>
/ stimulustimes = [1= Healthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<surveypage UnHealthy>
/ stimulustimes = [1= UnHealthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<block Healthiness>
/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]
/ responsemode = correct
/ recorddata = true
</block>

> sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials

Provide a data file that shows that, please. If the code is is what you posted, that's simply not possible.

Here it is. Look at Column S. The ones in blue and yellow should be 5 before the break and 5 after the break. 

sometimes it is 4+6 from list A and B (not 5+5)


Thanks, but that cannot have been generated with code that looks like this:

/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]

The two bolded bits are two entirely separate selection pools, each consisting of no more and no less than 5 x "Healthy" trials and 5 x "Unhealthy" trials. There is no way for a trial to somehow wander from pool 1 to pool 2 and vice versa. (Whether the data was generated by the monkey or not is immaterial here, the monkey does not change anything about how selection pools function). For data like you attached to happen, there would have to be a single common selection pool, e.g.

/ trials = [1-10, 12-21 = random (Healthy, UnHealthy); 11 = TakeaBreak;]




Oops. This is exactly what I did.
Inially it was this - trials = [1-10, 12-21 = random (Healthy, UnHealthy); 11 = TakeaBreak;]
Then I changed it to -  trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]

I didn't realise they both are different (as the trial sequence is still the same to me). And yes, it has sorted out the issue. It is working fine.

Thanks for the clarification.
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
abhi - 8/25/2022
Dave - 8/25/2022
abhi - 8/25/2022
Dave - 8/24/2022
abhi - 8/24/2022
Dave - 8/24/2022
abhi - 8/24/2022
Hi, 

I have 2 lists of 10 items each (list A and list B).
Block A - I want to present 5 items from each list (random) 
Break 
Block B - I want to present the rest of the 5 items (random, norepeat)
Can you please suggest, which command can be used to do this? Any past scripts to guide me here?

Thanks 


Define what you mean by "2 lists of 10 items each." That's ambiguous at best. At a minimum, show some example code that illustrates your setup.

Sorry. Here it is

Actually is working fine. But in some runs in 'runmonkey', it is not equal. I.e. I want 5 + 5 (healthy + unhealthy) in 1-10 trials and 5 + 5 (healthy + unhealthy) in 12-21 trials but sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials.


<text Healthy>
/ items = Healthy
/ select = random
</text>

<item Healthy >
/ 1="A"
/ 2="B"
/ 3="C"
/ 4="D"
/ 5="E"
/ 6="F"
/ 7="G"
/ 8="H"
/ 9="I"
/ 10="J"
</item>

<text UnHealthy>
/ items = UnHealthy
/ select = random
</text>

<item UnHealthy >
/ 1="AA"
/ 2="BB"
/ 3="CC"
/ 4="DD"
/ 5="EE"
/ 6="FF"
/ 7="GG"
/ 8="HH"
/ 9="II"
/ 10="JJ"
</item>

<surveypage Healthy>
/ stimulustimes = [1= Healthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<surveypage UnHealthy>
/ stimulustimes = [1= UnHealthy]
/ fontstyle = ("Arial", 2.5%, false, true)
/ questions=[1=WTP]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
/ nextbuttonposition = (48%, 75%)
</surveypage>

<block Healthiness>
/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]
/ responsemode = correct
/ recorddata = true
</block>

> sometimes it gives 4+6 (healthy + unhealthy) in 1-10 trials and 6+4 (healthy + unhealthy) in 12-21 trials

Provide a data file that shows that, please. If the code is is what you posted, that's simply not possible.

Here it is. Look at Column S. The ones in blue and yellow should be 5 before the break and 5 after the break. 

sometimes it is 4+6 from list A and B (not 5+5)


Thanks, but that cannot have been generated with code that looks like this:

/ trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]

The two bolded bits are two entirely separate selection pools, each consisting of no more and no less than 5 x "Healthy" trials and 5 x "Unhealthy" trials. There is no way for a trial to somehow wander from pool 1 to pool 2 and vice versa. (Whether the data was generated by the monkey or not is immaterial here, the monkey does not change anything about how selection pools function). For data like you attached to happen, there would have to be a single common selection pool, e.g.

/ trials = [1-10, 12-21 = random (Healthy, UnHealthy); 11 = TakeaBreak;]




Oops. This is exactly what I did.
Inially it was this - trials = [1-10, 12-21 = random (Healthy, UnHealthy); 11 = TakeaBreak;]
Then I changed it to -  trials = [1-10 = random (Healthy, UnHealthy); 11 = TakeaBreak; 12-21 = random (Healthy, UnHealthy)]

I didn't realise they both are different (as the trial sequence is still the same to me). And yes, it has sorted out the issue. It is working fine.

Thanks for the clarification.

Thank you for the confirmation! Glad we were able to clear that up.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search