Problem with per-trial weight adjustment using setweight
LaurensK90
ltk1 at live.nl
Mon Mar 31 11:59:52 UTC 2014
Hello,
I'm trying to create a task-switching experiment that requires participants
to categorize a face by either emotion or gender, as indicated by a
pre-stimulus cue. Repeat trials (emotion trial following an emotion trial,
or gender trial following a gender trial) need to be more common than
switch trials (emotion trial following a gender trial, etc.), with a 1:3
switch:repeat ratio. To achieve this, I wrote this script:
Dim e as integer
Dim g as integer
'Weighting trials to make repeats more likely than switches
If c.GetAttrib("TaskNr") = "0" Then
FaceList.SetWeight 1, "3"
FaceList.SetWeight 2, "1"
FaceList.SetWeight 3, "3"
FaceList.SetWeight 4, "1"
FaceList.SetWeight 5, "3"
FaceList.SetWeight 6, "1"
FaceList.SetWeight 7, "3"
FaceList.SetWeight 8, "1"
'Counter to keep track of how many consecutive emotion trials have occured
e = e+1
g = 0
ElseIf c.GetAttrib("TaskNr") = "1" Then
FaceList.SetWeight 1, "1"
FaceList.SetWeight 2, "3"
FaceList.SetWeight 3, "1"
FaceList.SetWeight 4, "3"
FaceList.SetWeight 5, "1"
FaceList.SetWeight 6, "3"
FaceList.SetWeight 7, "1"
FaceList.SetWeight 8, "3"
'Counter to keep track of how many consecutive gender trials have occured
g = g+1
e = 0
End If
'Set weights for emotion or gender trials to zero to prevent too many
repeats
'If e >= 5 Then
' FaceList.SetWeight 1, "0"
' FaceList.SetWeight 2, "1"
' FaceList.SetWeight 3, "0"
' FaceList.SetWeight 4, "1"
' FaceList.SetWeight 5, "0"
' FaceList.SetWeight 6, "1"
' FaceList.SetWeight 7, "0"
' FaceList.SetWeight 8, "1"
' e = 0
'ElseIf g >= 5 Then
' FaceList.SetWeight 1, "1"
' FaceList.SetWeight 2, "0"
' FaceList.SetWeight 3, "1"
' FaceList.SetWeight 4, "0"
' FaceList.SetWeight 5, "1"
' FaceList.SetWeight 6, "0"
' FaceList.SetWeight 7, "1"
' FaceList.SetWeight 8, "0"
' g = 0
'End If
The first If statement looks at the current trial type and increases the
weights of every same trial type to 3, and every other trial type to 1. The
trial types are in alternating rows in FaceList. The script is at the end
of the core experimental procedure, meaning that the weights are adjusted
after each trial is complete. If I've done this correctly, there should be
three times as many repeat trials as switch trials, but this doesn't seem
to happen. I ran the experiment with 768 trials, then copied the TaskNr
column (filled with 0s and 1s) out of the data file and pasted it in Excel.
Then I added every cell to the cell below it to determine whether the trial
was a repeat (0 or 2) or a switch (1), and counted those. This always
results in roughly equal numbers of 0s, 1s and 2s (a 1:2 switch
ratio) while running the task without the script gives you as many 1s as 0s
and 2s combined (a 1:1 switch ratio). So the switch ratio works as expected
without the script but not with it. I'm wondering if there's something
wrong with the way I'm counting these because changing the weights from 3
to 4 or 5 makes the maximum number of consecutive repeats increase. With
weights set to 3, 10 gender tasks in a row occur 20 times, and when set to
5, 10 in a row occur 46 times. So it's strange the actual switch ratio
isn't affected.
The second if statement tries to ensure that there are no more than 5
consecutive trials of the same type, by looking at a counter that
increments every time a trial passes of one type, and resets every time a
trial passes of the other type. If the counter reaches 5, it sets all the
trials of the same type to zero so it can't select them again. I haven't
tested this extensively but the first time I ran the experiment with it,
the number of consecutive repeats was even higher than normal! Have I made
a mistake in this script, or might this be the same problem as the previous
one?
I've asked official E-Prime support for help as well, a week ago, but
haven't heard back from them yet, so any additional assistance would be
appreciated.
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/fbc09c8c-cbb2-4250-80cf-d09e0d14f073%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20140331/5983b6a6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samples.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 70243 bytes
Desc: not available
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20140331/5983b6a6/attachment.xlsx>
More information about the Eprime
mailing list