noreplace and noreplacenorepeat


Author
Message
raven
raven
Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)
Group: Forum Members
Posts: 36, Visits: 78
Hi Dave,
I've checked the Inquisit Language Reference, but can't seem to find much information or examples on using the noreplace and noreplacenorepeat functions.
So, I have three main questions:
1. In the following script, if using noreplace, will that mean each of the three trials is run through randomly four times?
2. If I use noreplacenorepeat instead of noreplace, will that mean each of the three trials is run through randomly four times, but the only change is that a given trial will not run directly after itself (e.g., there will be no trial_a followed directly by another trial_a). Does noreplacenorepeat have any other effect?
3. Does the script run through the items in each trial in sequential order, or are they run in random order? (e.g., For trial_a, will the items run through sequentially as /1 = "A", /2 = "B", /3 = "C"). Does using noreplace or noreplacenorepeat affect the order in which the items within a trial are run? Is it possible that a given item will ever be run directly after itself (e.g., /1 = "A" followed directly by another /1 = "A" which this trial_a is run)?

Thanks in advance!

<trial trial_a>
/ stimulusframes = [1=clearscreen, stimulus_a]
/ validresponse = (" ")
</trial>

<trial trial_b>
/ stimulusframes = [1=clearscreen, stimulus_b]
/ validresponse = (" ")
</trial>

<trial trial_c>
/ stimulusframes = [1=clearscreen, stimulus_c]
/ validresponse = (" ")
</trial>

<text stimulus_a>
/ items = letters
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
</text>

<item letters>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
</item>

<text stimulus_b>
/ items = numbers
/ txcolor = (255, 0, 0)
/ txbgcolor = (255, 255, 255)
</text>

<item numbers>
/ 1 = "1"
/ 2 = "2"
/ 3 = "3"
</item>

<text stimulus_c>
/ items = words
/ txcolor = (0, 255, 0)
/ txbgcolor = (255, 255, 255)
</text>

<item words>
/ 1 = "dog"
/ 2 = "cat"
/ 3 = "horse"
</item>

<block block_1>
/ trials = [1-12 = noreplace(trial.trial_a, trial.trial_b, trial.trial_c)]
</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
raven - 2/23/2024
Hi Dave,
I've checked the Inquisit Language Reference, but can't seem to find much information or examples on using the noreplace and noreplacenorepeat functions.
So, I have three main questions:
1. In the following script, if using noreplace, will that mean each of the three trials is run through randomly four times?
2. If I use noreplacenorepeat instead of noreplace, will that mean each of the three trials is run through randomly four times, but the only change is that a given trial will not run directly after itself (e.g., there will be no trial_a followed directly by another trial_a). Does noreplacenorepeat have any other effect?
3. Does the script run through the items in each trial in sequential order, or are they run in random order? (e.g., For trial_a, will the items run through sequentially as /1 = "A", /2 = "B", /3 = "C"). Does using noreplace or noreplacenorepeat affect the order in which the items within a trial are run? Is it possible that a given item will ever be run directly after itself (e.g., /1 = "A" followed directly by another /1 = "A" which this trial_a is run)?

Thanks in advance!

<trial trial_a>
/ stimulusframes = [1=clearscreen, stimulus_a]
/ validresponse = (" ")
</trial>

<trial trial_b>
/ stimulusframes = [1=clearscreen, stimulus_b]
/ validresponse = (" ")
</trial>

<trial trial_c>
/ stimulusframes = [1=clearscreen, stimulus_c]
/ validresponse = (" ")
</trial>

<text stimulus_a>
/ items = letters
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
</text>

<item letters>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
</item>

<text stimulus_b>
/ items = numbers
/ txcolor = (255, 0, 0)
/ txbgcolor = (255, 255, 255)
</text>

<item numbers>
/ 1 = "1"
/ 2 = "2"
/ 3 = "3"
</item>

<text stimulus_c>
/ items = words
/ txcolor = (0, 255, 0)
/ txbgcolor = (255, 255, 255)
</text>

<item words>
/ 1 = "dog"
/ 2 = "cat"
/ 3 = "horse"
</item>

<block block_1>
/ trials = [1-12 = noreplace(trial.trial_a, trial.trial_b, trial.trial_c)]
</block>

> 1. In the following script, if using noreplace, will that mean each of the three trials is run through randomly four times?

Yes.

> 2. If I use noreplacenorepeat instead of noreplace, will that mean each of the three trials is run through randomly four times, but the only change is that a given trial will not run directly after itself (e.g., there will be no trial_a followed directly by another trial_a).

Yes, if possible.

> Does noreplacenorepeat have any other effect?

No.

> 3. Does the script run through the items in each trial in sequential order, or are they run in random order?

Random sampling without replacement is the default. If you want something else, you need to specify /select accordingly.

> Does using noreplace or noreplacenorepeat affect the order in which the items within a trial are run?

No. How trials are sampled by the block and how items are sampled by stimulus element  displayed in a given trial are entirely separate and different things.

> Is it possible that a given item will ever be run directly after itself (e.g., /1 = "A" followed directly by another /1 = "A" which this trial_a is run)?

Yes. Will happen when, near the end of the block, only two "A" trials are left in the selection pool, the 11th trial sampled item 1 (the 11th trial would be the 3rd A trial overall, so the 1st and 2nd A trial would have had to sample items 2 and 3); now, since there are only three items, for the 4th "A" trial (12th trial in the block), all three items are available to sample, so it could sample item 1 again.



Edited 2 Months Ago by Dave
raven
raven
Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)
Group: Forum Members
Posts: 36, Visits: 78
Thanks for your reply, Dave!

With Question 2, you said that noreplacenorepeat won’t repeat a given trial directly after itself if possible.

Is there a way to ensure that this does not happen ?
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
raven - 2/23/2024
Thanks for your reply, Dave!With Question 2, you said that noreplacenorepeat won’t repeat a given trial directly after itself if possible. Is there a way to ensure that this does not happen ?

No. If you want to exclude that possibility, you need to either specifiy a fixed trial sequence that satisfies your various constraints or you need to come up with and implement an algorithm that reliably (and reasonably quickly) generates trial sequences that satisfy your various constraints.

For general background, read https://forums.millisecond.com/Topic6419.aspx

raven
raven
Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)
Group: Forum Members
Posts: 36, Visits: 78
Thanks for explaining, Dave.

Much appreciated!
raven
raven
Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)
Group: Forum Members
Posts: 36, Visits: 78
Actually, after just reading about the / select attribute, I have another question.

If I include the select attribute as per the following for trial_an items, along with the noreplacenorepeat attribute in the trial, wouldn’t that ensure that “A” is never shown consecutively?


/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ select = noreplacenorepeat


Further, if I use:

/ select = sequence(1, 2, 3)

Wouldn’t that also ensure that “A” is never shown consecutively as well? (Just without randomization)

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
raven - 2/23/2024
Actually, after just reading about the / select attribute, I have another question. If I include the select attribute as per the following for trial_an items, along with the noreplacenorepeat attribute in the trial, wouldn’t that ensure that “A” is never shown consecutively? / 1 = "A"/ 2 = "B"/ 3 = "C"/ select = noreplacenorepeatFurther, if I use:/ select = sequence(1, 2, 3)Wouldn’t that also ensure that “A” is never shown consecutively as well? (Just without randomization)

<item> elements don't have a /select attribute. <item> elements do not perform selection, the stimulus element using the item element is responsible for the selection.

As I already said, you can define a fixed sequence to avoid repeats. That is true for trials and, of course, items selected by a stimulus as well.
Edited 2 Months Ago by Dave
raven
raven
Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)Respected Member (466 reputation)
Group: Forum Members
Posts: 36, Visits: 78
Thanks, that makes sense.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search