clicks count


Author
Message
Inquisit1234
Inquisit1234
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 13, Visits: 31
Dave - Monday, May 14, 2018
Inquisit1234 - Monday, May 14, 2018
Hello,

I am trying to record the amount of times a participant clicks each dropdown box (and possibly each latency) when solving a math equation. Currently I have the script set up for a <surveypage>, but I imagine that may not be the best approach when compared to a <block> structure.

Here's what I have:

<caption caption>
/ caption = "Please answer the question below"
/ fontstyle = ("Verdana", 3%, false, false, false, false, 5, 1)
/ position = (37%, 20%)
</caption>

<caption caption1>
/ caption = "6 is"
/ fontstyle = ("Verdana", 3%, false, false, false, false, 5, 1)
/ position = (40%, 40%)
</caption>

<dropdown option1>
/ options = (">", "<", "=")
/ optionvalues = ("1","2","3")
/ fontstyle = ("Verdana", 3%, false, false, false, false, 5, 1)
/ position = (45%, 40%)
/ required = true
</dropdown>

<caption caption2>
/ caption = "7 is "
/ fontstyle = ("Verdana", 3%, false, false, false, false, 5, 1)
/ position = (50%, 40%)
</caption>

<dropdown option2>
/ options = (">", "<", "=")
/ optionvalues = ("1","2","3")
/ fontstyle = ("Verdana", 3%, false, false, false, false, 5, 1)
/ position = (55%, 40%)
/ required = true
</dropdown>

<caption caption3>
/ caption = "8"
/ fontstyle = ("Verdana", 3%, false, false, false, false, 5, 1)
/ position = (60%, 40%)
</caption>

<surveypage math>
/ fontstyle = ("Verdana", 3%, true, false, false, false, 5, 1)
/ questions = [1=caption; 2=caption1; 3=option1; 4=caption2; 5=option2; 6=caption3]
/ nextbuttonposition = (60%, 60%)
</surveypage>


<survey math>
/ pages = [1=math]
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 1%
/ showpagenumbers = false
</survey>

Any help would be appreciated.

It's not possible to collect that kind of data (times a certain survey-type question was clicked) with surveypages -- whether you use a <block> or a <survey> doesn't matter in this case, it wouldn't work in either case.

Thanks for the reply.  Do you have any suggestion as to how I can implement a selection of three options twice, while recording the amount of clicks and latency of each? Thank you.

seandr
seandr
Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)
Group: Administrators
Posts: 1.3K, Visits: 5.6K
If you're willing to present one problem at a time, you could set this up as a trial and show the various equality operators as <text> elements that the participant can click on. Something like the following:

<text firstnumber>
/ items = ("6 is")
/ position = (50%, 25%)
</text>

<text secondnumber>
/ items = ("8")
/ position = (50%, 75%)
</text> 

<text gt>
/ items = (">")
/ position = (25%, 50%)
</text>

<text eq>
/ items = ("=")
/ position = (50%, 50%)
</text>

<text lt>
/ items = ("<")
/ position = (75%, 50%)
</text>

<trial problem>
/ stimulustimes = [1=firstnumber, secondnumber, gt, eq, lt]
/ inputdevice = mouse
/ validresponse = (gt, eq, lt)
</trial>

You'll need to play around with font size and layout. You can also specify lists of number items for the firstnumber and secondnumber text elements so that all of your problems are presented with those two elements

Hope this helps,
Sean


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
seandr - Monday, May 14, 2018
If you're willing to present one problem at a time, you could set this up as a trial and show the various equality operators as <text> elements that the participant can click on. Something like the following:

<text firstnumber>
/ items = ("6 is")
/ position = (50%, 25%)
</text>

<text secondnumber>
/ items = ("8")
/ position = (50%, 75%)
</text> 

<text gt>
/ items = (">")
/ position = (25%, 50%)
</text>

<text eq>
/ items = ("=")
/ position = (50%, 50%)
</text>

<text lt>
/ items = ("<")
/ position = (75%, 50%)
</text>

<trial problem>
/ stimulustimes = [1=firstnumber, secondnumber, gt, eq, lt]
/ inputdevice = mouse
/ validresponse = (gt, eq, lt)
</trial>

You'll need to play around with font size and layout. You can also specify lists of number items for the firstnumber and secondnumber text elements so that all of your problems are presented with those two elements

Hope this helps,
Sean


I was going to suggest something similar to what Sean outlined, only a little more involved:

<values>
/ digit1 = 6
/ digit2 = 7
/ digit3 = 8
/ op1 = ""
/ op2 = ""
</values>

<defaults>
/ fontstyle = ("Verdana", 3%)
</defaults>


<block myblock>
/ trials = [1=main]
</block>

<trial main>
/ stimulusframes = [1=question, digit1, operator1, digit2, operator2, digit3, submit]
/ inputdevice = mouse
/ validresponse = (operator1, operator2, submit)
/ isvalidresponse = [(trial.main.response == "submit" && values.op1 !="" && values.op2 !="")
    || trial.main.response == "operator1" || trial.main.response == "operator2"]
/ branch = [if (trial.main.response == "operator1") trial.select_operator1]
/ branch = [if (trial.main.response == "operator2") trial.select_operator2]
</trial>

<trial select_operator1>
/ ontrialend = [if (trial.select_operator1.response == "gt1") values.op1 = ">"]
/ ontrialend = [if (trial.select_operator1.response == "lt1") values.op1 = "<"]
/ ontrialend = [if (trial.select_operator1.response == "eq1") values.op1 = "="]
/ stimulusframes = [1=gt1,lt1,eq1]
/ inputdevice = mouse
/ validresponse = (gt1,lt1,eq1)
/ branch = [trial.main]
</trial>

<trial select_operator2>
/ ontrialend = [if (trial.select_operator2.response == "gt2") values.op2 = ">"]
/ ontrialend = [if (trial.select_operator2.response == "lt2") values.op2 = "<"]
/ ontrialend = [if (trial.select_operator2.response == "eq2") values.op2 = "="]
/ stimulusframes = [1=gt2,lt2,eq2]
/ inputdevice = mouse
/ validresponse = (gt2,lt2,eq2)
/ branch = [trial.main]
</trial>

<text question>
/ items = ("Please answer the question below")
/ erase = false
/ position = (50%, 25%)
</text>

<text digit1>
/ items = ("<%values.digit1%> is")
/ position = (30%, 50%)
/ erase = false
/ size = (10%, 10%)
/ hjustify = center
/ vjustify = center
</text>

<text digit2>
/ items = ("<%values.digit2%> is")
/ position = (50%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text digit3>
/ items = ("<%values.digit3%>")
/ position = (70%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text operator1>
/ items = ("<%values.op1%>")
/ position = (40%, 50%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text operator2>
/ items = ("<%values.op2%>")
/ position = (60%, 50%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text submit>
/ items = ("SUBMIT")
/ position = (50%, 92%)
/ size = (20%, 10%)
/ txbgcolor = grey
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text gt1>
/ items = (">")
/ position = (40%, 60%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text eq1>
/ items = ("=")
/ position = (40%, 70%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text lt1>
/ items = ("<")
/ position = (40%, 80%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text gt2>
/ items = (">")
/ position = (60%, 60%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text eq2>
/ items = ("=")
/ position = (60%, 70%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text lt2>
/ items = ("<")
/ position = (60%, 80%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

Inquisit1234
Inquisit1234
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 13, Visits: 31
Thanks so much for the script, Sean.  Unfortunately, both parts of the equation need to be presented at the same time, and I do not want it to automatically submit after an option is select . Dave's script seems to work great for the design I am attempting to implement. Now, I just have a question about the output. Each of the rows appear to be a change in the digit, and it appears the "response" column corresponds to each selected response (first digit = gt1,eq1,lt1, second digit = gt2,eg2,lt2). Is that correct? What I don't know if I understand is the operator 1 and 2 response. I believe the operators contain the response options (gt,eg,lt), but why are they recorded (and the latency) as well as the response selected? Also, I am not sure I understand column stimulusonset1 onward. Thanks again.
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
Inquisit1234 - Wednesday, May 16, 2018
Thanks so much for the script, Sean.  Unfortunately, both parts of the equation need to be presented at the same time, and I do not want it to automatically submit after an option is select . Dave's script seems to work great for the design I am attempting to implement. Now, I just have a question about the output. Each of the rows appear to be a change in the digit, and it appears the "response" column corresponds to each selected response (first digit = gt1,eq1,lt1, second digit = gt2,eg2,lt2). Is that correct? What I don't know if I understand is the operator 1 and 2 response. I believe the operators contain the response options (gt,eg,lt), but why are they recorded (and the latency) as well as the response selected? Also, I am not sure I understand column stimulusonset1 onward. Thanks again.

There are three <trial> elements in the script. <trial main> just sits there and waits for your response, i.e. a click on one of the two grey boxes that function as the placeholder for the operators (operator1 and operator2). In the response column for each instance of <trial main> you're going to see which of the two operator box was clicked, and the latency reflects when that occurred relative to when that instance of <trial main> started.

Once that selection is made, either <trial select_operator1> or <trial select_operator2> is run: If you indicated you wanted to set or change operator1 by clicking on the operator1 box in <trial main>, you get <trial select_operator1> which presents the three options gt1, eq1 and lt1. If you selected the operator2 box, you get <trial select_operator2> which offers the options gt2, eq2 and lt2. You will find that logged in the response column in the respective row(s). The latency reflects when an option (greater than, equal, or less than) was chosen relative to when the respective instance of <trial select_operator1> or <trial select_operator2> started.

After that, both <trial select_operator1> and <trial select_operator1> invoke <trial main> again, which sits there until you decide what you want to do next: Set the other operator, change the operator you already set again. This will repeat for as long as you decide to change things around, i.e. the script will bounce back and forth between <trial main> and the two operator selection trials.

Finally, once you've set both and settled on a solution, the whole thing can be ended by submitting your solution (click on the submit box) presented by <trial main>.

Inquisit1234
Inquisit1234
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 13, Visits: 31
Dave - Wednesday, May 16, 2018
Inquisit1234 - Wednesday, May 16, 2018
Thanks so much for the script, Sean.  Unfortunately, both parts of the equation need to be presented at the same time, and I do not want it to automatically submit after an option is select . Dave's script seems to work great for the design I am attempting to implement. Now, I just have a question about the output. Each of the rows appear to be a change in the digit, and it appears the "response" column corresponds to each selected response (first digit = gt1,eq1,lt1, second digit = gt2,eg2,lt2). Is that correct? What I don't know if I understand is the operator 1 and 2 response. I believe the operators contain the response options (gt,eg,lt), but why are they recorded (and the latency) as well as the response selected? Also, I am not sure I understand column stimulusonset1 onward. Thanks again.

There are three <trial> elements in the script. <trial main> just sits there and waits for your response, i.e. a click on one of the two grey boxes that function as the placeholder for the operators (operator1 and operator2). In the response column for each instance of <trial main> you're going to see which of the two operator box was clicked, and the latency reflects when that occurred relative to when that instance of <trial main> started.

Once that selection is made, either <trial select_operator1> or <trial select_operator2> is run: If you indicated you wanted to set or change operator1 by clicking on the operator1 box in <trial main>, you get <trial select_operator1> which presents the three options gt1, eq1 and lt1. If you selected the operator2 box, you get <trial select_operator2> which offers the options gt2, eq2 and lt2. You will find that logged in the response column in the respective row(s). The latency reflects when an option (greater than, equal, or less than) was chosen relative to when the respective instance of <trial select_operator1> or <trial select_operator2> started.

After that, both <trial select_operator1> and <trial select_operator1> invoke <trial main> again, which sits there until you decide what you want to do next: Set the other operator, change the operator you already set again. This will repeat for as long as you decide to change things around, i.e. the script will bounce back and forth between <trial main> and the two operator selection trials.

Finally, once you've set both and settled on a solution, the whole thing can be ended by submitting your solution (click on the submit box) presented by <trial main>.
Thanks very much, Dave.  This explanation is extremely helpful.


Inquisit1234
Inquisit1234
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 13, Visits: 31
Inquisit1234 - Thursday, May 17, 2018
Dave - Wednesday, May 16, 2018
Inquisit1234 - Wednesday, May 16, 2018
Thanks so much for the script, Sean.  Unfortunately, both parts of the equation need to be presented at the same time, and I do not want it to automatically submit after an option is select . Dave's script seems to work great for the design I am attempting to implement. Now, I just have a question about the output. Each of the rows appear to be a change in the digit, and it appears the "response" column corresponds to each selected response (first digit = gt1,eq1,lt1, second digit = gt2,eg2,lt2). Is that correct? What I don't know if I understand is the operator 1 and 2 response. I believe the operators contain the response options (gt,eg,lt), but why are they recorded (and the latency) as well as the response selected? Also, I am not sure I understand column stimulusonset1 onward. Thanks again.

There are three <trial> elements in the script. <trial main> just sits there and waits for your response, i.e. a click on one of the two grey boxes that function as the placeholder for the operators (operator1 and operator2). In the response column for each instance of <trial main> you're going to see which of the two operator box was clicked, and the latency reflects when that occurred relative to when that instance of <trial main> started.

Once that selection is made, either <trial select_operator1> or <trial select_operator2> is run: If you indicated you wanted to set or change operator1 by clicking on the operator1 box in <trial main>, you get <trial select_operator1> which presents the three options gt1, eq1 and lt1. If you selected the operator2 box, you get <trial select_operator2> which offers the options gt2, eq2 and lt2. You will find that logged in the response column in the respective row(s). The latency reflects when an option (greater than, equal, or less than) was chosen relative to when the respective instance of <trial select_operator1> or <trial select_operator2> started.

After that, both <trial select_operator1> and <trial select_operator1> invoke <trial main> again, which sits there until you decide what you want to do next: Set the other operator, change the operator you already set again. This will repeat for as long as you decide to change things around, i.e. the script will bounce back and forth between <trial main> and the two operator selection trials.

Finally, once you've set both and settled on a solution, the whole thing can be ended by submitting your solution (click on the submit box) presented by <trial main>.
Thanks very much, Dave.  This explanation is extremely helpful.


I would like to create additional trials using other digits. So, is it possible to simply add additional digits in the <value>, and add another <trial> (e.g., <trial main 2> ) with the new digits listed in the stimulusframes? I attempted this, but it seems is it unable to locate the new digits, and even if I can get beyond that, I am not sure the operators with reset to blank for trial 2.   
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
Inquisit1234 - Thursday, May 17, 2018
Inquisit1234 - Thursday, May 17, 2018
Dave - Wednesday, May 16, 2018
Inquisit1234 - Wednesday, May 16, 2018
Thanks so much for the script, Sean.  Unfortunately, both parts of the equation need to be presented at the same time, and I do not want it to automatically submit after an option is select . Dave's script seems to work great for the design I am attempting to implement. Now, I just have a question about the output. Each of the rows appear to be a change in the digit, and it appears the "response" column corresponds to each selected response (first digit = gt1,eq1,lt1, second digit = gt2,eg2,lt2). Is that correct? What I don't know if I understand is the operator 1 and 2 response. I believe the operators contain the response options (gt,eg,lt), but why are they recorded (and the latency) as well as the response selected? Also, I am not sure I understand column stimulusonset1 onward. Thanks again.

There are three <trial> elements in the script. <trial main> just sits there and waits for your response, i.e. a click on one of the two grey boxes that function as the placeholder for the operators (operator1 and operator2). In the response column for each instance of <trial main> you're going to see which of the two operator box was clicked, and the latency reflects when that occurred relative to when that instance of <trial main> started.

Once that selection is made, either <trial select_operator1> or <trial select_operator2> is run: If you indicated you wanted to set or change operator1 by clicking on the operator1 box in <trial main>, you get <trial select_operator1> which presents the three options gt1, eq1 and lt1. If you selected the operator2 box, you get <trial select_operator2> which offers the options gt2, eq2 and lt2. You will find that logged in the response column in the respective row(s). The latency reflects when an option (greater than, equal, or less than) was chosen relative to when the respective instance of <trial select_operator1> or <trial select_operator2> started.

After that, both <trial select_operator1> and <trial select_operator1> invoke <trial main> again, which sits there until you decide what you want to do next: Set the other operator, change the operator you already set again. This will repeat for as long as you decide to change things around, i.e. the script will bounce back and forth between <trial main> and the two operator selection trials.

Finally, once you've set both and settled on a solution, the whole thing can be ended by submitting your solution (click on the submit box) presented by <trial main>.
Thanks very much, Dave.  This explanation is extremely helpful.


I would like to create additional trials using other digits. So, is it possible to simply add additional digits in the <value>, and add another <trial> (e.g., <trial main 2> ) with the new digits listed in the stimulusframes? I attempted this, but it seems is it unable to locate the new digits, and even if I can get beyond that, I am not sure the operators with reset to blank for trial 2.   

Yes, it's possible. Store your digits in paired <list>s and then sample from those lists at the start of each round and store the digits sampled in the respective values.

Inquisit1234
Inquisit1234
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 13, Visits: 31
Dave - Thursday, May 17, 2018
Inquisit1234 - Thursday, May 17, 2018
Inquisit1234 - Thursday, May 17, 2018
Dave - Wednesday, May 16, 2018
Inquisit1234 - Wednesday, May 16, 2018
Thanks so much for the script, Sean.  Unfortunately, both parts of the equation need to be presented at the same time, and I do not want it to automatically submit after an option is select . Dave's script seems to work great for the design I am attempting to implement. Now, I just have a question about the output. Each of the rows appear to be a change in the digit, and it appears the "response" column corresponds to each selected response (first digit = gt1,eq1,lt1, second digit = gt2,eg2,lt2). Is that correct? What I don't know if I understand is the operator 1 and 2 response. I believe the operators contain the response options (gt,eg,lt), but why are they recorded (and the latency) as well as the response selected? Also, I am not sure I understand column stimulusonset1 onward. Thanks again.

There are three <trial> elements in the script. <trial main> just sits there and waits for your response, i.e. a click on one of the two grey boxes that function as the placeholder for the operators (operator1 and operator2). In the response column for each instance of <trial main> you're going to see which of the two operator box was clicked, and the latency reflects when that occurred relative to when that instance of <trial main> started.

Once that selection is made, either <trial select_operator1> or <trial select_operator2> is run: If you indicated you wanted to set or change operator1 by clicking on the operator1 box in <trial main>, you get <trial select_operator1> which presents the three options gt1, eq1 and lt1. If you selected the operator2 box, you get <trial select_operator2> which offers the options gt2, eq2 and lt2. You will find that logged in the response column in the respective row(s). The latency reflects when an option (greater than, equal, or less than) was chosen relative to when the respective instance of <trial select_operator1> or <trial select_operator2> started.

After that, both <trial select_operator1> and <trial select_operator1> invoke <trial main> again, which sits there until you decide what you want to do next: Set the other operator, change the operator you already set again. This will repeat for as long as you decide to change things around, i.e. the script will bounce back and forth between <trial main> and the two operator selection trials.

Finally, once you've set both and settled on a solution, the whole thing can be ended by submitting your solution (click on the submit box) presented by <trial main>.
Thanks very much, Dave.  This explanation is extremely helpful.


I would like to create additional trials using other digits. So, is it possible to simply add additional digits in the <value>, and add another <trial> (e.g., <trial main 2> ) with the new digits listed in the stimulusframes? I attempted this, but it seems is it unable to locate the new digits, and even if I can get beyond that, I am not sure the operators with reset to blank for trial 2.   

Yes, it's possible. Store your digits in paired <list>s and then sample from those lists at the start of each round and store the digits sampled in the respective values.

Okay, so I have created these lists:

<list firstnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = sequence
</list>

<list secondnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = sequence
</list>

<list thirdnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = sequence
</list>
 
And, have edited the <text>:

<text digit1>
/ items = ("<%list.firstnumbers.selectionmode%> is")
/ position = (30%, 50%)
/ erase = false
/ size = (10%, 10%)
/ hjustify = center
/ vjustify = center
</text>

<text digit2>
/ items = ("<%list.secondnumbers.selectionmode%> is")
/ position = (50%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text digit3>
/ items = ("<%list.thirdnumbers.selectionmode%>")
/ position = (70%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

But, I am a little confused as to how to make the trials continue until the sequence of numbers have concluded. Any suggestions? Thank you.
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
Inquisit1234 - Thursday, May 17, 2018
Dave - Thursday, May 17, 2018
Inquisit1234 - Thursday, May 17, 2018
Inquisit1234 - Thursday, May 17, 2018
Dave - Wednesday, May 16, 2018
Inquisit1234 - Wednesday, May 16, 2018
Thanks so much for the script, Sean.  Unfortunately, both parts of the equation need to be presented at the same time, and I do not want it to automatically submit after an option is select . Dave's script seems to work great for the design I am attempting to implement. Now, I just have a question about the output. Each of the rows appear to be a change in the digit, and it appears the "response" column corresponds to each selected response (first digit = gt1,eq1,lt1, second digit = gt2,eg2,lt2). Is that correct? What I don't know if I understand is the operator 1 and 2 response. I believe the operators contain the response options (gt,eg,lt), but why are they recorded (and the latency) as well as the response selected? Also, I am not sure I understand column stimulusonset1 onward. Thanks again.

There are three <trial> elements in the script. <trial main> just sits there and waits for your response, i.e. a click on one of the two grey boxes that function as the placeholder for the operators (operator1 and operator2). In the response column for each instance of <trial main> you're going to see which of the two operator box was clicked, and the latency reflects when that occurred relative to when that instance of <trial main> started.

Once that selection is made, either <trial select_operator1> or <trial select_operator2> is run: If you indicated you wanted to set or change operator1 by clicking on the operator1 box in <trial main>, you get <trial select_operator1> which presents the three options gt1, eq1 and lt1. If you selected the operator2 box, you get <trial select_operator2> which offers the options gt2, eq2 and lt2. You will find that logged in the response column in the respective row(s). The latency reflects when an option (greater than, equal, or less than) was chosen relative to when the respective instance of <trial select_operator1> or <trial select_operator2> started.

After that, both <trial select_operator1> and <trial select_operator1> invoke <trial main> again, which sits there until you decide what you want to do next: Set the other operator, change the operator you already set again. This will repeat for as long as you decide to change things around, i.e. the script will bounce back and forth between <trial main> and the two operator selection trials.

Finally, once you've set both and settled on a solution, the whole thing can be ended by submitting your solution (click on the submit box) presented by <trial main>.
Thanks very much, Dave.  This explanation is extremely helpful.


I would like to create additional trials using other digits. So, is it possible to simply add additional digits in the <value>, and add another <trial> (e.g., <trial main 2> ) with the new digits listed in the stimulusframes? I attempted this, but it seems is it unable to locate the new digits, and even if I can get beyond that, I am not sure the operators with reset to blank for trial 2.   

Yes, it's possible. Store your digits in paired <list>s and then sample from those lists at the start of each round and store the digits sampled in the respective values.

Okay, so I have created these lists:

<list firstnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = sequence
</list>

<list secondnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = sequence
</list>

<list thirdnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = sequence
</list>
 
And, have edited the <text>:

<text digit1>
/ items = ("<%list.firstnumbers.selectionmode%> is")
/ position = (30%, 50%)
/ erase = false
/ size = (10%, 10%)
/ hjustify = center
/ vjustify = center
</text>

<text digit2>
/ items = ("<%list.secondnumbers.selectionmode%> is")
/ position = (50%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text digit3>
/ items = ("<%list.thirdnumbers.selectionmode%>")
/ position = (70%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

But, I am a little confused as to how to make the trials continue until the sequence of numbers have concluded. Any suggestions? Thank you.

You need to do something like this:

<values>
/ digit1 = 0
/ digit2 = 0
/ digit3 = 0
/ op1 = ""
/ op2 = ""
/ roundnumber = 0
</values>

<defaults>
/ fontstyle = ("Verdana", 3%)
</defaults>


<block myblock>
/ trials = [1-6=startround;]
</block>

<trial startround>
/ ontrialbegin = [values.op1 = "";
    values.op2 = "";
    values.digit1 = list.firstnumbers.nextvalue;
    values.digit2 = list.secondnumbers.nextvalue;
    values.digit3 = list.thirdnumbers.nextvalue;
    values.roundnumber += 1;
    ]
/ stimulusframes = [1=clearscreen, roundtext]
/ trialduration = 1000
/ validresponse = (0)
/ branch = [trial.main]
</trial>

<shape clearscreen>
/ color = white
/ shape = rectangle
/ size = (100%, 100%)
</shape>

<text roundtext>
/ items = ("This is round #<%values.roundnumber%>.")
</text>

<list firstnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = sequence
</list>

<list secondnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = list.firstnumbers.currentindex
</list>

<list thirdnumbers>
/ items = (1,2,3,4,5,6)
/ selectionmode = list.firstnumbers.currentindex
</list>

<trial main>
/ stimulusframes = [1=question, digit1, operator1, digit2, operator2, digit3, submit]
/ inputdevice = mouse
/ validresponse = (operator1, operator2, submit)
/ isvalidresponse = [(trial.main.response == "submit" && values.op1 !="" && values.op2 !="")
    || trial.main.response == "operator1" || trial.main.response == "operator2"]
/ branch = [if (trial.main.response == "operator1") trial.select_operator1]
/ branch = [if (trial.main.response == "operator2") trial.select_operator2]
</trial>

<trial select_operator1>
/ ontrialend = [if (trial.select_operator1.response == "gt1") values.op1 = ">"]
/ ontrialend = [if (trial.select_operator1.response == "lt1") values.op1 = "<"]
/ ontrialend = [if (trial.select_operator1.response == "eq1") values.op1 = "="]
/ stimulusframes = [1=gt1,lt1,eq1]
/ inputdevice = mouse
/ validresponse = (gt1,lt1,eq1)
/ branch = [trial.main]
</trial>

<trial select_operator2>
/ ontrialend = [if (trial.select_operator2.response == "gt2") values.op2 = ">"]
/ ontrialend = [if (trial.select_operator2.response == "lt2") values.op2 = "<"]
/ ontrialend = [if (trial.select_operator2.response == "eq2") values.op2 = "="]
/ stimulusframes = [1=gt2,lt2,eq2]
/ inputdevice = mouse
/ validresponse = (gt2,lt2,eq2)
/ branch = [trial.main]
</trial>

<text question>
/ items = ("Please answer the question below")
/ erase = false
/ position = (50%, 25%)
</text>

<text digit1>
/ items = ("<%values.digit1%> is")
/ position = (30%, 50%)
/ erase = false
/ size = (10%, 10%)
/ hjustify = center
/ vjustify = center
</text>

<text digit2>
/ items = ("<%values.digit2%> is")
/ position = (50%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text digit3>
/ items = ("<%values.digit3%>")
/ position = (70%, 50%)
/ size = (10%, 10%)
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text operator1>
/ items = ("<%values.op1%>")
/ position = (40%, 50%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text operator2>
/ items = ("<%values.op2%>")
/ position = (60%, 50%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text submit>
/ items = ("SUBMIT")
/ position = (50%, 92%)
/ size = (20%, 10%)
/ txbgcolor = grey
/ erase = false
/ hjustify = center
/ vjustify = center
</text>

<text gt1>
/ items = (">")
/ position = (40%, 60%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text eq1>
/ items = ("=")
/ position = (40%, 70%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text lt1>
/ items = ("<")
/ position = (40%, 80%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text gt2>
/ items = (">")
/ position = (60%, 60%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text eq2>
/ items = ("=")
/ position = (60%, 70%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>

<text lt2>
/ items = ("<")
/ position = (60%, 80%)
/ size = (10%, 10%)
/ txbgcolor = grey
/ hjustify = center
/ vjustify = center
</text>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search