By JDYates - 11/24/2023
Hi Dave,
Once again asking for help,
I'm trying to get answers from multiple checkboxes to feed into a forced choice picture task
I've wrote all combinations as separate trials so just want to be able to have a skip unless particular answers are given - if I use skip[ IF( and != then all possible trial combinations appear but if I just use skip( and != then every trial skips so I feel like I'm missing something really simple, but I'm happy to feel like an idiot if you're able to help
I have attached all the files with script below
many thanks
Jack
|
By Dave - 11/24/2023
+xHi Dave, Once again asking for help, I'm trying to get answers from multiple checkboxes to feed into a forced choice picture task I've wrote all combinations as separate trials so just want to be able to have a skip unless particular answers are given - if I use skip[ IF( and != then all possible trial combinations appear but if I just use skip( and != then every trial skips so I feel like I'm missing something really simple, but I'm happy to feel like an idiot if you're able to help I have attached all the files with script below many thanks Jack You've defined /optionvalues in your checkboxes elements, so the checkboxes' response property returns the numerical value associated with the response given, not the caption. That is when you answer "Going to a club", the checkboxes.q1.response property returns "1", not "Going to a club".
|
By JDYates - 11/24/2023
+x+xHi Dave, Once again asking for help, I'm trying to get answers from multiple checkboxes to feed into a forced choice picture task I've wrote all combinations as separate trials so just want to be able to have a skip unless particular answers are given - if I use skip[ IF( and != then all possible trial combinations appear but if I just use skip( and != then every trial skips so I feel like I'm missing something really simple, but I'm happy to feel like an idiot if you're able to help I have attached all the files with script below many thanks Jack You've defined /optionvalues in your checkboxes elements, so the checkboxes' response property returns the numerical value associated with the response given, not the caption. That is when you answer "Going to a club", the checkboxes.q1.response property returns "1", not "Going to a club". Hi Dave,
Thanks for that I have removed the option values - that was from a previous attempt to make it work. However the issue is still persisting, with IF it shows all trials and without it, it shows none. Could it also be the way I've wrote out the trials in block.2?
thanks again
Jack
|
By Dave - 11/24/2023
+x+x+xHi Dave, Once again asking for help, I'm trying to get answers from multiple checkboxes to feed into a forced choice picture task I've wrote all combinations as separate trials so just want to be able to have a skip unless particular answers are given - if I use skip[ IF( and != then all possible trial combinations appear but if I just use skip( and != then every trial skips so I feel like I'm missing something really simple, but I'm happy to feel like an idiot if you're able to help I have attached all the files with script below many thanks Jack You've defined /optionvalues in your checkboxes elements, so the checkboxes' response property returns the numerical value associated with the response given, not the caption. That is when you answer "Going to a club", the checkboxes.q1.response property returns "1", not "Going to a club". Hi Dave, Thanks for that I have removed the option values - that was from a previous attempt to make it work. However the issue is still persisting, with IF it shows all trials and without it, it shows none. Could it also be the way I've wrote out the trials in block.2? thanks again Jack Eh, I'm an idiot. You allow (well, require) multiple responses in your checkboxes (5), so the response can never be "Going to a club" (or "1") -- that would only be the case if you allowed / required only a single response.
The response property will return all options selected concatenated with "&", i.e. if you selec the 1st 5 options in checkboxes.q1, the checkboxes.q1.response property will be:
"Going to a club & Bowling & Going to a restaurant & Gambling & Playing board/card/video games with friends"
You can either use contains() to check whether this string includes the response you're interested in (cf. https://www.millisecond.com/support/docs/v5/html/language/expressions/functions.htm under String Functions) or you can work with the selected property, which returns true if the given option was selected and false otherwise. So:
<trial 1_1 > / stimulusframes = [1=clearscreen, fixation; 50 = clearscreen, drink1 , nodrink1] / inputdevice = mouse / validresponse = (drink1, nodrink1) / skip = [!checkboxes.q1.selected.1] / skip = [!checkboxes.q2.selected.1] </trial>
|
By JDYates - 11/24/2023
+x+x+x+xHi Dave, Once again asking for help, I'm trying to get answers from multiple checkboxes to feed into a forced choice picture task I've wrote all combinations as separate trials so just want to be able to have a skip unless particular answers are given - if I use skip[ IF( and != then all possible trial combinations appear but if I just use skip( and != then every trial skips so I feel like I'm missing something really simple, but I'm happy to feel like an idiot if you're able to help I have attached all the files with script below many thanks Jack You've defined /optionvalues in your checkboxes elements, so the checkboxes' response property returns the numerical value associated with the response given, not the caption. That is when you answer "Going to a club", the checkboxes.q1.response property returns "1", not "Going to a club". Hi Dave, Thanks for that I have removed the option values - that was from a previous attempt to make it work. However the issue is still persisting, with IF it shows all trials and without it, it shows none. Could it also be the way I've wrote out the trials in block.2? thanks again Jack Eh, I'm an idiot. You allow (well, require) multiple responses in your checkboxes (5), so the response can never be "Going to a club" (or "1") -- that would only be the case if you allowed / required only a single response. The response property will return all options selected concatenated with "&", i.e. if you selec the 1st 5 options in checkboxes.q1, the checkboxes.q1.response property will be: [code"]Going to a club & Bowling & Going to a restaurant & Gambling & Playing board/card/video games with friends"[/code] You can either use contains() to check whether this string includes the response you're interested in (cf. https://www.millisecond.com/support/docs/v5/html/language/expressions/functions.htm under String Functions) or you can work with the selected property, which returns true if the given option was selected and false otherwise. So: <trial 1_1 > / stimulusframes = [1=clearscreen, fixation; 50 = clearscreen, drink1 , nodrink1, debug ] / inputdevice = mouse / validresponse = (drink1, nodrink1) / skip = [!checkboxes.q1.selected.1] / skip = [!checkboxes.q2.selected.1] </trial> Dave you star, works perfectly
thanks very much
Jack
|
|