Saving randomly selected sequence of items from list element in summarydata

Saving randomly selected sequence of items from list element in...
 Author Message Jakob posted 3 Years Ago ANSWER Group: Forum Members Posts: 16, Visits: 52 My experiment uses a list of 20 items from 1 to 20, from which numbers are randomly selected. How can I store the randomly seleected sequence. I simply want to know, whether the selected sequence was 3, 5, 17, ... or 1, 2, 8, 19 etc.I did not find anything regarding this in the forum, which suprises me. Can someone help?/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)/selectionmode = randomI unsuccessfully tried things like:/columns = [list.trial_sequence, list.trial_sequence.items]Optimal solution: A column, which simply saves the order in summary data, for example: "1, 3, 16, 17,...". Or must I do a workaround, e. g. by defining 20 values and saving the corresponding position, e. g. by an additional counter?Background: My experiment runs through the same block 20 times, each time with different stimuli. I have accomplished doing this by creating lists and to call the correct element with a value that I have called current_list. Most likely I can achieve the same thing with the counter element, but I also don't know how to save the sequence there, too. Dave posted 3 Years Ago ANSWER Group: Administrators Posts: 12K, Visits: 97K +x Jakob - 2/12/2021My experiment uses a list of 20 items from 1 to 20, from which numbers are randomly selected. How can I store the randomly seleected sequence. I simply want to know, whether the selected sequence was 3, 5, 17, ... or 1, 2, 8, 19 etc.I did not find anything regarding this in the forum, which suprises me. Can someone help?/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)/selectionmode = randomI unsuccessfully tried things like:/columns = [list.trial_sequence, list.trial_sequence.items]Optimal solution: A column, which simply saves the order in summary data, for example: "1, 3, 16, 17,...". Or must I do a workaround, e. g. by defining 20 values and saving the corresponding position, e. g. by an additional counter?Background: My experiment runs through the same block 20 times, each time with different stimuli. I have accomplished doing this by creating lists and to call the correct element with a value that I have called current_list. Most likely I can achieve the same thing with the counter element, but I also don't know how to save the sequence there, too.This question is not answerable without further information about how the rest of your code actually looks. Jakob posted 3 Years Ago ANSWER Group: Forum Members Posts: 16, Visits: 52 I created a short version of the script. The entire script is quite complicated, but this version has all the important elements. Also, I have reduced the number of trials to 3. All I want is to elegantly save the order of the sequence  /items = (1, 2, 3)/selectionmode = randomIf there is no elegenat way, I would be able to do a workaround with values and an additional counter (e. g. counter that counts from 1 to 3 in sequence when each block starts again and three values (each for each list) that change to the value of the counter. That way I would have the position of each list). However, as Inquisit can calculate the variance (list.listname.variance) I was wondering if it is possible to simple save the order. Anyway, here is the skript shortened:*Defining three lists for each block / items = (yellow, blue)/ selectionrate = block / items = (green, red)/ selectionrate = block / items = (orange, pink)/ selectionrate = block*creating list of list for left color. The value of this list is selected via the value current_list/ items = (list.colors_unique_trial01.items.1, list.colors_unique_trial02.items.1, list.colors_unique_trial03.items.1)/ selectionmode = (values.current_list)*creating list of list for right color. The value of this list is selected via the value current_list/ items = (list.colors_unique_trial01.items.2, list.colors_unique_trial02.items.2, list.colors_unique_trial03.items.2)/ selectionmode = (values.current_list)*** Defining shapes and texts*Defining black colored ciclre. The color is changed to the correct one later./shape = circle/color = black/size = (6.5%, 11.555%)/position = (30%, 50%)/ erase = false*Defining black colored ciclre. The color is changed to the correct one later./shape = circle/color = black/size = (6.5%, 11.555%)/position = (70%, 50%)/ erase = false*White background/shape = rectangle/color = white/size = (99%, 99%)/items = ("Which color do you decide on?")/ position = (50%, 20%)/ fontstyle = ("Calibri", 2.6%)/ erase = false*Defining trial. Here, the color is being changed according to the currently called list/stimulusframes = [1= white_BG, decision_color, responseoption_trialdecide_color1, responseoption_trialdecide_color2]/ontrialbegin = [shape.responseoption_trialdecide_color1.color = list.list_uniquecolor_left.item(values.current_list);                shape.responseoption_trialdecide_color2.color = list.list_uniquecolor_right.item(values.current_list)]/inputdevice = mouse/validresponse = (responseoption_trialdecide_color1, responseoption_trialdecide_color2)*Defining value/current_list =0*This block is reapeated 3 times, each with different color, as the value current_list is changed at the beginning of each block./trials = [1=trial_decision]/onblockbegin = [values.current_list = list.trial_sequence.nextvalue]*This runs the experiment. Here is defined, how many trials/sequences the participant should do. This is defined by the number of blocks (default: 1-20; this means 20 trials/sequences) / blocks = [1-3=boxtask]/items = (1, 2, 3)/selectionmode = random/ columns = [list.trial_sequence, list.trial_sequence.items] Dave posted 3 Years Ago ANSWER Group: Administrators Posts: 12K, Visits: 97K +x Jakob - 2/12/2021I created a short version of the script. The entire script is quite complicated, but this version has all the important elements. Also, I have reduced the number of trials to 3. All I want is to elegantly save the order of the sequence  /items = (1, 2, 3)/selectionmode = randomIf there is no elegenat way, I would be able to do a workaround with values and an additional counter (e. g. counter that counts from 1 to 3 in sequence when each block starts again and three values (each for each list) that change to the value of the counter. That way I would have the position of each list). However, as Inquisit can calculate the variance (list.listname.variance) I was wondering if it is possible to simple save the order. Anyway, here is the skript shortened:*Defining three lists for each block / items = (yellow, blue)/ selectionrate = block / items = (green, red)/ selectionrate = block / items = (orange, pink)/ selectionrate = block*creating list of list for left color. The value of this list is selected via the value current_list/ items = (list.colors_unique_trial01.items.1, list.colors_unique_trial02.items.1, list.colors_unique_trial03.items.1)/ selectionmode = (values.current_list)*creating list of list for right color. The value of this list is selected via the value current_list/ items = (list.colors_unique_trial01.items.2, list.colors_unique_trial02.items.2, list.colors_unique_trial03.items.2)/ selectionmode = (values.current_list)*** Defining shapes and texts*Defining black colored ciclre. The color is changed to the correct one later./shape = circle/color = black/size = (6.5%, 11.555%)/position = (30%, 50%)/ erase = false*Defining black colored ciclre. The color is changed to the correct one later./shape = circle/color = black/size = (6.5%, 11.555%)/position = (70%, 50%)/ erase = false*White background/shape = rectangle/color = white/size = (99%, 99%)/items = ("Which color do you decide on?")/ position = (50%, 20%)/ fontstyle = ("Calibri", 2.6%)/ erase = false*Defining trial. Here, the color is being changed according to the currently called list/stimulusframes = [1= white_BG, decision_color, responseoption_trialdecide_color1, responseoption_trialdecide_color2]/ontrialbegin = [shape.responseoption_trialdecide_color1.color = list.list_uniquecolor_left.item(values.current_list);                shape.responseoption_trialdecide_color2.color = list.list_uniquecolor_right.item(values.current_list)]/inputdevice = mouse/validresponse = (responseoption_trialdecide_color1, responseoption_trialdecide_color2)*Defining value/current_list =0*This block is reapeated 3 times, each with different color, as the value current_list is changed at the beginning of each block./trials = [1=trial_decision]/onblockbegin = [values.current_list = list.trial_sequence.nextvalue]*This runs the experiment. Here is defined, how many trials/sequences the participant should do. This is defined by the number of blocks (default: 1-20; this means 20 trials/sequences) / blocks = [1-3=boxtask]/items = (1, 2, 3)/selectionmode = random/ columns = [list.trial_sequence, list.trial_sequence.items]*Defining three lists for each block/ items = (yellow, blue)/ selectionrate = block/ items = (green, red)/ selectionrate = block/ items = (orange, pink)/ selectionrate = block*creating list of list for left color. The value of this list is selected via the value current_list/ items = (list.colors_unique_trial01.items.1,list.colors_unique_trial02.items.1,list.colors_unique_trial03.items.1)/ selectionmode = (values.current_list)*creating list of list for right color. The value of this list is selected via the value current_list/ items = (list.colors_unique_trial01.items.2,list.colors_unique_trial02.items.2,list.colors_unique_trial03.items.2)/ selectionmode = (values.current_list)*** Defining shapes and texts*Defining black colored ciclre. The color is changed to the correct one later./shape = circle/color = black/size = (6.5%, 11.555%)/position = (30%, 50%)/ erase = false*Defining black colored ciclre. The color is changed to the correct one later./shape = circle/color = black/size = (6.5%, 11.555%)/position = (70%, 50%)/ erase = false*White background/shape = rectangle/color = white/size = (99%, 99%)/items = ("Which color do you decide on?")/ position = (50%, 20%)/ fontstyle = ("Calibri", 2.6%)/ erase = false*Defining trial. Here, the color is being changed according to the currently called list/stimulusframes = [1= white_BG, decision_color, responseoption_trialdecide_color1, responseoption_trialdecide_color2]/ontrialbegin = [shape.responseoption_trialdecide_color1.color = list.list_uniquecolor_left.item(values.current_list);      shape.responseoption_trialdecide_color2.color = list.list_uniquecolor_right.item(values.current_list)]/inputdevice = mouse/validresponse = (responseoption_trialdecide_color1, responseoption_trialdecide_color2)*Defining value/current_list =0/ sequence = ""*This block is reapeated 3 times, each with different color, as the value current_list is changed at the beginning of each block./trials = [1=trial_decision]/onblockbegin = [values.current_list = list.trial_sequence.nextvalue;    values.sequence = concat(concat(values.sequence,values.current_list), ",");]*This runs the experiment. Here is defined, how many trials/sequences the participant should do. This is defined by the number of blocks (default: 1-20; this means 20 trials/sequences)/ blocks = [1-3=boxtask]/items = (1, 2, 3)/selectionmode = random/ columns = [values.sequence] Jakob posted 3 Years Ago ANSWER Group: Forum Members Posts: 16, Visits: 52 Wow! Thank you Dave for this very useful function "concat". And of course again for your fast reply. This works well, also in my other original skript!

Merge Selected

Merge into selected topic...

Merge into merge target...

Merge into a specific topic ID...