Millisecond Forums

setitem picture

https://forums.millisecond.com/Topic17754.aspx

By jens - 11/18/2015

Hello,

in a dot-probe experiment I want to present horizontally and vertically aligned dots. I have the problem that horizontal and vertical dots are not equally often presented.

So I first define the pictures
<picture dot.pic>
/items = ("DotHor.png", "DotVer.png")
</picture>

then I try to assign the pictures depending on some list-value (see attached files):
if (list.pos.tar.neg.right.nextvalue == 1)       {picture.dot.pic.setitem("DotHor.png", 1); values.file.name = "DotHor.png";}
                  else if (list.pos.tar.neg.right.nextvalue == 2) {picture.dot.pic.setitem("DotHor.png", 1); values.file.name = "DotHor.png";}
                  else if (list.pos.tar.neg.right.nextvalue == 3) {picture.dot.pic.setitem("DotVer.png", 1); values.file.name = "DotVer.png";}
                  else if (list.pos.tar.neg.right.nextvalue == 4) {picture.dot.pic.setitem("DotVer.png", 1); values.file.name = "DotVer.png";}]

However, a frequency table shows that DotVer.png is presented more often than DotHor.png.
                             soa166 soa32 soa83                                               DotHor.png target.neg.left        0     0     0           target.neg.right       6     6     6           target.neu.left        6     6     6           target.neu.right       0     0     0           target.pos.left        0     0     0           target.pos.right       0     0     0DotVer.png target.neg.left       12    12    12           target.neg.right       6     6     6           target.neu.left        6     6     6           target.neu.right      12    12    12           target.pos.left       12    12    12           target.pos.right      12    12    12
Running the experiment several times gives always the same frequency table. I can not find the programming error. Suggestions are heartily welcome.

Best wishes Jens


By Dave - 11/18/2015

You have subtle syntax mistakes in the majority of your <trial> elements. If you examine your data closely, you'll notice that the *only* two <trial> elements that function properly are <trial target.neu.left> and <trial target.neg.right>.

In all the other <trial> elements, your /ontrialbegin if-else if logic is broken due to missing closing braces.

Contrast the correct

<trial target.neg.right>
/ontrialbegin = [if (list.pos.tar.neg.right.nextvalue == 1)       {picture.dot.pic.hposition = values.left; values.pos = values.left; picture.dot.pic.setitem("DotHor.png", 1); values.file.name = "DotHor.png";}
                  else if (list.pos.tar.neg.right.nextvalue == 2) {picture.dot.pic.hposition = values.right; values.pos = values.right; picture.dot.pic.setitem("DotHor.png", 1); values.file.name = "DotHor.png";}
                  else if (list.pos.tar.neg.right.nextvalue == 3) {picture.dot.pic.hposition = values.left; values.pos = values.left; picture.dot.pic.setitem("DotVer.png", 1); values.file.name = "DotVer.png";}
                  else if (list.pos.tar.neg.right.nextvalue == 4) {picture.dot.pic.hposition = values.right; values.pos = values.right; picture.dot.pic.setitem("DotVer.png", 1); values.file.name = "DotVer.png";}] <- CORRECT } HERE
...
</trial>

versus the broken

<trial target.neu.right>
/ontrialbegin = [if (list.pos.tar.neu.right.nextvalue == 1)       {picture.dot.pic.hposition = values.left; values.pos = values.left; picture.dot.pic.setitem("DotHor.png", 1); values.file.name = "DotHor.png";}
                  else if (list.pos.tar.neu.right.nextvalue == 2) {picture.dot.pic.hposition = values.right; values.pos = values.right; picture.dot.pic.setitem("DotHor.png", 1); values.file.name = "DotHor.png";}
                  else if (list.pos.tar.neu.right.nextvalue == 3) {picture.dot.pic.hposition = values.left; values.pos = values.left; picture.dot.pic.setitem("DotVer.png", 1); values.file.name = "DotVer.png";}
                  else if (list.pos.tar.neu.right.nextvalue == 4) {picture.dot.pic.hposition = values.right; values.pos = values.right; picture.dot.pic.setitem("DotVer.png", 1)}; values.file.name = "DotVer.png";] <- MISSING } HERE
...
</trial>




By jens - 11/18/2015

Thanks a lot. Jens