use of values for responsekey and position of stimuli


Author
Message
juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

Attachments
study_valueSTSR_2003_pb.exp (371 views, 71.00 KB)
study_valueSTSR_2003_pb2.exp (379 views, 70.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: 13K, Visits: 104K
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


ok thanks - I tried before but it did not work - hope this time it will.



juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


ok thanks - I tried before but it did not work - hope this time it will.


juju - Wednesday, March 20, 2019
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


ok thanks - I tried before but it did not work - hope this time it will.



Maybe there is some subtle thing I did not get but it still does not work -
I used
<expt>
/onexptbegin = [values.cond=1]
/subjects = (1 of 4)
<expt>

and then

<block prepare>
/trials = [1=setvalue]
/onblockend = [if (values.cond==1) values.keyiat =1;values.keyfamsr=1;values.order=1;values.pair=1;values.pairfamsr=1]
/onblockend = [if (values.cond==2) values.keyiat =2;values.keyfamsr=2;values.order=2;values.pair=2;values.pairfamsr=2]
</block>

and

<block familiar1>
/ bgstim = (instr_F, instr_J, TARG1_l, TARG2_l)
/ trials = [1= inst_induc1; 2-21=random(SAT_TARG1, SAT_TARG2)]
/onblockbegin = [if (values.keyfamsr == 1) text.TARG1_l.hposition = "20%";text.TARG2_l.hposition = "80%"]
/onblockbegin = [if (values.keyfamsr == 1) values.srsidetarg1 = 2; values.srsidetarg2 = 1]
/onblockbegin = [if (values.keyfamsr == 2) text.TARG1_l.hposition = "80%";text.TARG2_l.hposition = "20%"]
/onblockbegin = [if (values.keyfamsr == 2) values.srsidetarg1 = 1; values.srsidetarg2 = 2]
/onblockbegin = [values.block = 1]
/onblockbegin = [values.numitem = 10]
/onblockbegin = [if(values.blockf == 1)text.compito1.textcolor=white]
/onblockbegin = [if(values.blockf == 1)text.compito2.textcolor=white]
/onblockbegin = [if(values.blockf == 1)text.compito3.textcolor=white]
/errormessage = true(error,200)
/onblockend = [values.block = 0]
/onblockend = [values.blockf = values.blockf + 1]
/onblockend = [if(values.order == 1)values.pairfamsr==2]
/onblockend = [if(values.order == 2)values.pairfamsr==1]
</block>

but whatever the number of cond (1 or 2) does not change the position of the background stimulus

Thanks in advance


Attachments
study_valueSTSR_2003.exp (425 views, 73.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: 13K, Visits: 104K
juju - Wednesday, March 20, 2019
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


ok thanks - I tried before but it did not work - hope this time it will.


juju - Wednesday, March 20, 2019
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


ok thanks - I tried before but it did not work - hope this time it will.



Maybe there is some subtle thing I did not get but it still does not work -
I used
<expt>
/onexptbegin = [values.cond=1]
/subjects = (1 of 4)
<expt>

and then

<block prepare>
/trials = [1=setvalue]
/onblockend = [if (values.cond==1) values.keyiat =1;values.keyfamsr=1;values.order=1;values.pair=1;values.pairfamsr=1]
/onblockend = [if (values.cond==2) values.keyiat =2;values.keyfamsr=2;values.order=2;values.pair=2;values.pairfamsr=2]
</block>

and

<block familiar1>
/ bgstim = (instr_F, instr_J, TARG1_l, TARG2_l)
/ trials = [1= inst_induc1; 2-21=random(SAT_TARG1, SAT_TARG2)]
/onblockbegin = [if (values.keyfamsr == 1) text.TARG1_l.hposition = "20%";text.TARG2_l.hposition = "80%"]
/onblockbegin = [if (values.keyfamsr == 1) values.srsidetarg1 = 2; values.srsidetarg2 = 1]
/onblockbegin = [if (values.keyfamsr == 2) text.TARG1_l.hposition = "80%";text.TARG2_l.hposition = "20%"]
/onblockbegin = [if (values.keyfamsr == 2) values.srsidetarg1 = 1; values.srsidetarg2 = 2]
/onblockbegin = [values.block = 1]
/onblockbegin = [values.numitem = 10]
/onblockbegin = [if(values.blockf == 1)text.compito1.textcolor=white]
/onblockbegin = [if(values.blockf == 1)text.compito2.textcolor=white]
/onblockbegin = [if(values.blockf == 1)text.compito3.textcolor=white]
/errormessage = true(error,200)
/onblockend = [values.block = 0]
/onblockend = [values.blockf = values.blockf + 1]
/onblockend = [if(values.order == 1)values.pairfamsr==2]
/onblockend = [if(values.order == 2)values.pairfamsr==1]
</block>

but whatever the number of cond (1 or 2) does not change the position of the background stimulus

Thanks in advance


There are some syntax issues with your code (none of which have anything to do with the values set /onexptbegin, by the way). First, whenever you wish to execute multiple actions under a single condition, you ought to use curly braces. I.e.

<block prepare>
/trials = [1=setvalue]
/onblockend = [if (values.cond==1) values.keyiat =1; values.keyfamsr=1;values.order=1;values.pair=1;values.pairfamsr=1]
/onblockend = [if (values.cond==2) values.keyiat =2; values.keyfamsr=2;values.order=2;values.pair=2;values.pairfamsr=2]
</block>

is wrong. Only the the two bolded statements are conditional, the rest is unconditional. To work properly, this ought to read:

<block prepare>
/trials = [1=setvalue]
/onblockend = [if (values.cond==1) {values.keyiat =1;values.keyfamsr=1;values.order=1;values.pair=1;values.pairfamsr=1}]
/onblockend = [if (values.cond==2) {values.keyiat =2;values.keyfamsr=2;values.order=2;values.pair=2;values.pairfamsr=2}]
</block>

Virtually all /onblockbegin statements throughout the script suffer from that mistake. I've fixed that in the attached script.

Attachments
study_valueSTSR_2003.exp (390 views, 73.00 KB)
juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


ok thanks - I tried before but it did not work - hope this time it will.


juju - Wednesday, March 20, 2019
Dave - Wednesday, March 20, 2019
juju - Wednesday, March 20, 2019
Hi,

I am trying to manipulate, at the level of the block, the position of background stimuli and define correct response depending on the condition in which the subject is.
But I am stuck because it seems as if the values cannot be set at the beginning of the experiment.
I tried two solutions without success (attached - I shorten the experiment to focus on the problem).
Could someone tell me what I am doing wrong?

The <variables> element is the wrong syntax construct to use. To set values at the start of an <expt>, use /onexptbegin attributes like so:

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (1 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 1;]
/subjects = (2 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (3 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>

<expt>
/ onexptbegin = [values.cond = 2;]
/subjects = (4 of 4)
/ blocks = [1=prepare;2=familiar1; 3=familiar2]
</expt>


ok thanks - I tried before but it did not work - hope this time it will.



Maybe there is some subtle thing I did not get but it still does not work -
I used
<expt>
/onexptbegin = [values.cond=1]
/subjects = (1 of 4)
<expt>

and then

<block prepare>
/trials = [1=setvalue]
/onblockend = [if (values.cond==1) values.keyiat =1;values.keyfamsr=1;values.order=1;values.pair=1;values.pairfamsr=1]
/onblockend = [if (values.cond==2) values.keyiat =2;values.keyfamsr=2;values.order=2;values.pair=2;values.pairfamsr=2]
</block>

and

<block familiar1>
/ bgstim = (instr_F, instr_J, TARG1_l, TARG2_l)
/ trials = [1= inst_induc1; 2-21=random(SAT_TARG1, SAT_TARG2)]
/onblockbegin = [if (values.keyfamsr == 1) text.TARG1_l.hposition = "20%";text.TARG2_l.hposition = "80%"]
/onblockbegin = [if (values.keyfamsr == 1) values.srsidetarg1 = 2; values.srsidetarg2 = 1]
/onblockbegin = [if (values.keyfamsr == 2) text.TARG1_l.hposition = "80%";text.TARG2_l.hposition = "20%"]
/onblockbegin = [if (values.keyfamsr == 2) values.srsidetarg1 = 1; values.srsidetarg2 = 2]
/onblockbegin = [values.block = 1]
/onblockbegin = [values.numitem = 10]
/onblockbegin = [if(values.blockf == 1)text.compito1.textcolor=white]
/onblockbegin = [if(values.blockf == 1)text.compito2.textcolor=white]
/onblockbegin = [if(values.blockf == 1)text.compito3.textcolor=white]
/errormessage = true(error,200)
/onblockend = [values.block = 0]
/onblockend = [values.blockf = values.blockf + 1]
/onblockend = [if(values.order == 1)values.pairfamsr==2]
/onblockend = [if(values.order == 2)values.pairfamsr==1]
</block>

but whatever the number of cond (1 or 2) does not change the position of the background stimulus

Thanks in advance


There are some syntax issues with your code (none of which have anything to do with the values set /onexptbegin, by the way). First, whenever you wish to execute multiple actions under a single condition, you ought to use curly braces. I.e.

<block prepare>
/trials = [1=setvalue]
/onblockend = [if (values.cond==1) values.keyiat =1; values.keyfamsr=1;values.order=1;values.pair=1;values.pairfamsr=1]
/onblockend = [if (values.cond==2) values.keyiat =2; values.keyfamsr=2;values.order=2;values.pair=2;values.pairfamsr=2]
</block>

is wrong. Only the the two bolded statements are conditional, the rest is unconditional. To work properly, this ought to read:

<block prepare>
/trials = [1=setvalue]
/onblockend = [if (values.cond==1) {values.keyiat =1;values.keyfamsr=1;values.order=1;values.pair=1;values.pairfamsr=1}]
/onblockend = [if (values.cond==2) {values.keyiat =2;values.keyfamsr=2;values.order=2;values.pair=2;values.pairfamsr=2}]
</block>

Virtually all /onblockbegin statements throughout the script suffer from that mistake. I've fixed that in the attached script.

Thank you very much for your help!


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search