Avoid participants clicking


Author
Message
JessicaEMFarias
JessicaEMFarias
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 22, Visits: 49
Hi everyone!

I have created a script for an experiment in which participants are shown a series of 20 images of squares with 20 dots inside of each of them. The squares are divided by a vertical line and participants should answer in which side there are more dots. The images are shown for only one second, for they are not supposed to count the dots to give the answer.

Subjects are rewarded in different ways according to the answer they give. For example, if they answer that the left side has more dots, they receive 1 cent. But if they answer the right side has more dots, they receive 5 cents. In the end of the experiment, they will receive the amount of money they have earned during the 20 trials.

I have been able to implement that. The problem is that, when people click in one of the options (left side or right side) more the once, they are being rewarded for as many times they have clicked in each item, when they were supposed to be rewarded just once per trial. For example, if a person clicks ten times in the left option before submitting the answer, in the next screen he or she will receive 10 cents instead of just 1. 

Does anyone know how to solve this? I have attached the script below. 



Attachments
Teste.iqx (362 views, 11.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
JessicaEMFarias - 8/14/2019
Hi everyone!

I have created a script for an experiment in which participants are shown a series of 20 images of squares with 20 dots inside of each of them. The squares are divided by a vertical line and participants should answer in which side there are more dots. The images are shown for only one second, for they are not supposed to count the dots to give the answer.

Subjects are rewarded in different ways according to the answer they give. For example, if they answer that the left side has more dots, they receive 1 cent. But if they answer the right side has more dots, they receive 5 cents. In the end of the experiment, they will receive the amount of money they have earned during the 20 trials.

I have been able to implement that. The problem is that, when people click in one of the options (left side or right side) more the once, they are being rewarded for as many times they have clicked in each item, when they were supposed to be rewarded just once per trial. For example, if a person clicks ten times in the left option before submitting the answer, in the next screen he or she will receive 10 cents instead of just 1. 

Does anyone know how to solve this? I have attached the script below. 



You need to change this logic in <trial lado>

/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo"; values.account_balance+=0.01;} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito"; values.account_balance+=0.05;} else {shape.direitobg.color = black}; ]

to something like this:

<trial lado>
/ ontrialbegin = [values.runcount = values.runcount += 1;]
/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};]

/ stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection]
/ inputdevice = mouse
/ validresponse = (esquerdo, direito, enviar)
/ isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ]
/ branch = [if (trial.lado.response != "enviar") trial.lado]
/ recorddata = false
</trial>

You'll also want to reset values.selecteditem and values.runcount at the start of each "round", i.e. in <trial dot>:

<trial dot>
/ ontrialbegin = [values.selecteditem = ""; values.runcount = 0;]
/ stimulusframes = [1=dot]
/ validresponse = (noresponse)
/ trialduration = values.dotduration + values.pretrialpause
</trial>

(In the future,please always provide any and all external files a given script requires to run.)

Attachments
Teste.iqx (363 views, 12.00 KB)
JessicaEMFarias
JessicaEMFarias
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 22, Visits: 49
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
o mHi everyone!

I have created a script for an experiment in which participants are shown a series of 20 images of squares with 20 dots inside of each of them. The squares are divided by a vertical line and participants should answer in which side there are more dots. The images are shown for only one second, for they are not supposed to count the dots to give the answer.

Subjects are rewarded in different ways according to the answer they give. For example, if they answer that the left side has more dots, they receive 1 cent. But if they answer the right side has more dots, they receive 5 cents. In the end of the experiment, they will receive the amount of money they have earned during the 20 trials.

I have been able to implement that. The problem is that, when people click in one of the options (left side or right side) more the once, they are being rewarded for as many times they have clicked in each item, when they were supposed to be rewarded just once per trial. For example, if a person clicks ten times in the left option before submitting the answer, in the next screen he or she will receive 10 cents instead of just 1. 

Does anyone know how to solve this? I have attached the script below. 



You need to change this logic in <trial lado>

/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo"; values.account_balance+=0.01;} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito"; values.account_balance+=0.05;} else {shape.direitobg.color = black}; ]

to something like this:

<trial lado>
/ ontrialbegin = [values.runcount = values.runcount += 1;]
/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};]

/ stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection]
/ inputdevice = mouse
/ validresponse = (esquerdo, direito, enviar)
/ isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ]
/ branch = [if (trial.lado.response != "enviar") trial.lado]
/ recorddata = false
</trial>

You'll also want to reset values.selecteditem and values.runcount at the start of each "round", i.e. in <trial dot>:

<trial dot>
/ ontrialbegin = [values.selecteditem = ""; values.runcount = 0;]
/ stimulusframes = [1=dot]
/ validresponse = (noresponse)
/ trialduration = values.dotduration + values.pretrialpause
</trial>

(In the future,please always provide any and all external files a given script requires to run.)

Thank you so much, Dave!! It works like a charm!

I have an additional question though. Do you know what I can do to update the balance ("saldo") as soon as the participant clicks on the button (left side or right side)? Right now, the balance is only updated after hitting the submit button ("enviar"), on the next page. 

I have attached all files now.
Attachments
Script2.rar (335 views, 293.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
JessicaEMFarias - 8/14/2019
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
o mHi everyone!

I have created a script for an experiment in which participants are shown a series of 20 images of squares with 20 dots inside of each of them. The squares are divided by a vertical line and participants should answer in which side there are more dots. The images are shown for only one second, for they are not supposed to count the dots to give the answer.

Subjects are rewarded in different ways according to the answer they give. For example, if they answer that the left side has more dots, they receive 1 cent. But if they answer the right side has more dots, they receive 5 cents. In the end of the experiment, they will receive the amount of money they have earned during the 20 trials.

I have been able to implement that. The problem is that, when people click in one of the options (left side or right side) more the once, they are being rewarded for as many times they have clicked in each item, when they were supposed to be rewarded just once per trial. For example, if a person clicks ten times in the left option before submitting the answer, in the next screen he or she will receive 10 cents instead of just 1. 

Does anyone know how to solve this? I have attached the script below. 



You need to change this logic in <trial lado>

/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo"; values.account_balance+=0.01;} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito"; values.account_balance+=0.05;} else {shape.direitobg.color = black}; ]

to something like this:

<trial lado>
/ ontrialbegin = [values.runcount = values.runcount += 1;]
/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};]

/ stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection]
/ inputdevice = mouse
/ validresponse = (esquerdo, direito, enviar)
/ isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ]
/ branch = [if (trial.lado.response != "enviar") trial.lado]
/ recorddata = false
</trial>

You'll also want to reset values.selecteditem and values.runcount at the start of each "round", i.e. in <trial dot>:

<trial dot>
/ ontrialbegin = [values.selecteditem = ""; values.runcount = 0;]
/ stimulusframes = [1=dot]
/ validresponse = (noresponse)
/ trialduration = values.dotduration + values.pretrialpause
</trial>

(In the future,please always provide any and all external files a given script requires to run.)

Thank you so much, Dave!! It works like a charm!

I have an additional question though. Do you know what I can do to update the balance ("saldo") as soon as the participant clicks on the button (left side or right side)? Right now, the balance is only updated after hitting the submit button ("enviar"), on the next page. 

I have attached all files now.

You've coded the trial such as to *deliberately* allow for participants to revise and change their choice (left or right) as often as they want to. Otherwise there would be no reason for a submit button. Since the decision is not final until a participant clicks "submit", I don't see how updating the balance before that makes any sense. Please explain.

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
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
o mHi everyone!

I have created a script for an experiment in which participants are shown a series of 20 images of squares with 20 dots inside of each of them. The squares are divided by a vertical line and participants should answer in which side there are more dots. The images are shown for only one second, for they are not supposed to count the dots to give the answer.

Subjects are rewarded in different ways according to the answer they give. For example, if they answer that the left side has more dots, they receive 1 cent. But if they answer the right side has more dots, they receive 5 cents. In the end of the experiment, they will receive the amount of money they have earned during the 20 trials.

I have been able to implement that. The problem is that, when people click in one of the options (left side or right side) more the once, they are being rewarded for as many times they have clicked in each item, when they were supposed to be rewarded just once per trial. For example, if a person clicks ten times in the left option before submitting the answer, in the next screen he or she will receive 10 cents instead of just 1. 

Does anyone know how to solve this? I have attached the script below. 



You need to change this logic in <trial lado>

/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo"; values.account_balance+=0.01;} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito"; values.account_balance+=0.05;} else {shape.direitobg.color = black}; ]

to something like this:

<trial lado>
/ ontrialbegin = [values.runcount = values.runcount += 1;]
/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};]

/ stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection]
/ inputdevice = mouse
/ validresponse = (esquerdo, direito, enviar)
/ isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ]
/ branch = [if (trial.lado.response != "enviar") trial.lado]
/ recorddata = false
</trial>

You'll also want to reset values.selecteditem and values.runcount at the start of each "round", i.e. in <trial dot>:

<trial dot>
/ ontrialbegin = [values.selecteditem = ""; values.runcount = 0;]
/ stimulusframes = [1=dot]
/ validresponse = (noresponse)
/ trialduration = values.dotduration + values.pretrialpause
</trial>

(In the future,please always provide any and all external files a given script requires to run.)

Thank you so much, Dave!! It works like a charm!

I have an additional question though. Do you know what I can do to update the balance ("saldo") as soon as the participant clicks on the button (left side or right side)? Right now, the balance is only updated after hitting the submit button ("enviar"), on the next page. 

I have attached all files now.

You've coded the trial such as to *deliberately* allow for participants to revise and change their choice (left or right) as often as they want to. Otherwise there would be no reason for a submit button. Since the decision is not final until a participant clicks "submit", I don't see how updating the balance before that makes any sense. Please explain.

You can work with a temporary copy of the account balance if that's what you want. See attached.

Attachments
Teste.iqx (338 views, 12.00 KB)
JessicaEMFarias
JessicaEMFarias
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 22, Visits: 49
Dave - 8/14/2019
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
o mHi everyone!

I have created a script for an experiment in which participants are shown a series of 20 images of squares with 20 dots inside of each of them. The squares are divided by a vertical line and participants should answer in which side there are more dots. The images are shown for only one second, for they are not supposed to count the dots to give the answer.

Subjects are rewarded in different ways according to the answer they give. For example, if they answer that the left side has more dots, they receive 1 cent. But if they answer the right side has more dots, they receive 5 cents. In the end of the experiment, they will receive the amount of money they have earned during the 20 trials.

I have been able to implement that. The problem is that, when people click in one of the options (left side or right side) more the once, they are being rewarded for as many times they have clicked in each item, when they were supposed to be rewarded just once per trial. For example, if a person clicks ten times in the left option before submitting the answer, in the next screen he or she will receive 10 cents instead of just 1. 

Does anyone know how to solve this? I have attached the script below. 



You need to change this logic in <trial lado>

/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo"; values.account_balance+=0.01;} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito"; values.account_balance+=0.05;} else {shape.direitobg.color = black}; ]

to something like this:

<trial lado>
/ ontrialbegin = [values.runcount = values.runcount += 1;]
/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};]

/ stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection]
/ inputdevice = mouse
/ validresponse = (esquerdo, direito, enviar)
/ isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ]
/ branch = [if (trial.lado.response != "enviar") trial.lado]
/ recorddata = false
</trial>

You'll also want to reset values.selecteditem and values.runcount at the start of each "round", i.e. in <trial dot>:

<trial dot>
/ ontrialbegin = [values.selecteditem = ""; values.runcount = 0;]
/ stimulusframes = [1=dot]
/ validresponse = (noresponse)
/ trialduration = values.dotduration + values.pretrialpause
</trial>

(In the future,please always provide any and all external files a given script requires to run.)

Thank you so much, Dave!! It works like a charm!

I have an additional question though. Do you know what I can do to update the balance ("saldo") as soon as the participant clicks on the button (left side or right side)? Right now, the balance is only updated after hitting the submit button ("enviar"), on the next page. 

I have attached all files now.

You've coded the trial such as to *deliberately* allow for participants to revise and change their choice (left or right) as often as they want to. Otherwise there would be no reason for a submit button. Since the decision is not final until a participant clicks "submit", I don't see how updating the balance before that makes any sense. Please explain.

You can work with a temporary copy of the account balance if that's what you want. See attached.

That's exactly what I want. And I want that because the experiment is aimed at measuring dishonesty. I think that the effect of displaying the updated balance on the screen may work as an additional incentive for people to cheat and chose the side which will provide them with the higher reward. Thank you so much!




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
JessicaEMFarias - 8/14/2019
Dave - 8/14/2019
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
Dave - 8/14/2019
JessicaEMFarias - 8/14/2019
o mHi everyone!

I have created a script for an experiment in which participants are shown a series of 20 images of squares with 20 dots inside of each of them. The squares are divided by a vertical line and participants should answer in which side there are more dots. The images are shown for only one second, for they are not supposed to count the dots to give the answer.

Subjects are rewarded in different ways according to the answer they give. For example, if they answer that the left side has more dots, they receive 1 cent. But if they answer the right side has more dots, they receive 5 cents. In the end of the experiment, they will receive the amount of money they have earned during the 20 trials.

I have been able to implement that. The problem is that, when people click in one of the options (left side or right side) more the once, they are being rewarded for as many times they have clicked in each item, when they were supposed to be rewarded just once per trial. For example, if a person clicks ten times in the left option before submitting the answer, in the next screen he or she will receive 10 cents instead of just 1. 

Does anyone know how to solve this? I have attached the script below. 



You need to change this logic in <trial lado>

/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo"; values.account_balance+=0.01;} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito"; values.account_balance+=0.05;} else {shape.direitobg.color = black}; ]

to something like this:

<trial lado>
/ ontrialbegin = [values.runcount = values.runcount += 1;]
/ ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};]
/ ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};]

/ stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection]
/ inputdevice = mouse
/ validresponse = (esquerdo, direito, enviar)
/ isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ]
/ branch = [if (trial.lado.response != "enviar") trial.lado]
/ recorddata = false
</trial>

You'll also want to reset values.selecteditem and values.runcount at the start of each "round", i.e. in <trial dot>:

<trial dot>
/ ontrialbegin = [values.selecteditem = ""; values.runcount = 0;]
/ stimulusframes = [1=dot]
/ validresponse = (noresponse)
/ trialduration = values.dotduration + values.pretrialpause
</trial>

(In the future,please always provide any and all external files a given script requires to run.)

Thank you so much, Dave!! It works like a charm!

I have an additional question though. Do you know what I can do to update the balance ("saldo") as soon as the participant clicks on the button (left side or right side)? Right now, the balance is only updated after hitting the submit button ("enviar"), on the next page. 

I have attached all files now.

You've coded the trial such as to *deliberately* allow for participants to revise and change their choice (left or right) as often as they want to. Otherwise there would be no reason for a submit button. Since the decision is not final until a participant clicks "submit", I don't see how updating the balance before that makes any sense. Please explain.

You can work with a temporary copy of the account balance if that's what you want. See attached.

That's exactly what I want. And I want that because the experiment is aimed at measuring dishonesty. I think that the effect of displaying the updated balance on the screen may work as an additional incentive for people to cheat and chose the side which will provide them with the higher reward. Thank you so much!




Okay, great!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search