do not want same stimulus in a row but need overall random selection

Michiel Spape Michiel.Spape at nottingham.ac.uk
Wed Jan 27 11:19:00 UTC 2010


Hi,
There are several ways to go about doing this, but most indeed require you to use a) inline scripts (e.g. manually reselecting trials on the basis of past trials), b) pre-built trial lists or c) hard thinking. For a, you might, for example, think of building a list at the start of the experiment in which you just reshuffle until the same target does not come up twice in a row - which is by far the easiest, if not most efficient method one can think of. For example:

'this goes in userscript
Dim alltargets() as string 'declares an array which will hold your targets.
Dim I as integer 'for running loops
Dim justgo as boolean 
Dim trialnum

'this goes as a little inline before the rest of the experiment begins
For I = 1 to 20 '20 being the number of trials you have, right?
	If (I >= 1) and (I <= 4) then alltargets(i) = "red"
	If (I >= 1) and (I <= 4) then alltargets(i) = "green"
	If (I >= 1) and (I <= 4) then alltargets(i) = "blue"
	If (I >= 1) and (I <= 4) then alltargets(i) = "brown"
Next I 'after which the list is sorted
Justgo = true
While Justgo = true
	Randomizearray alltargets
	For I = 1 to 19
		If alltargets(i+1)  alltargets(i) then JustGo = true else Justgo = false
	Next i
Wend 

Granted, that's about as inefficient (possibly buggy?) algorithm you might get, but it does save a lot of thinking, and if you're paid for thinking about psychology rather than mathematics, I think it's not so bad to go for the road of least effort in this regard. Anyway, once you got your alltargets randomized, you merely select the next one every trial - put it in the triallist, if you like:
	
trialnum = trialnum + 1
c.SetAttrib "TheTarget", alltargets(trialnum)
if c.GetAttrib ("TheTarget") = c.GetAttrib ("TheWord") then c.SetAttrib "Congruency", "Contruent" else c.SetAttrib "Congruency", "Incongruent"

...

Anyway, I just read David wrote something about this too, so I'll let you figure that out. In the mean time, I'd like to add that it really isn't so problematic to have reoccurrences of trial types. Usually, the word repeats but not the colour (or vice versa), the chance of both repeating being 1/16th (in your case), and the Stroop effect is *far* too robust to be bothered by it. If you are anyway, my suggestion would be to actually just filter such trials out afterwards.

Best,
Mich




Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology


-----Original Message-----
From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Sarah
Sent: 26 January 2010 17:25
To: E-Prime
Subject: do not want same stimulus in a row but need overall random selection

I am making a simple stroop task with 4 colors, and about 20 trials (1
trial list and 1 trial procedure). I have already selected Random
Selection under the property pages for my trial list, but how do I
ensure that a red target won't come after another red target, or a
blue after a blue, etc? Is an inline necessary?

Thank you

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list