## Embedded expressions within complicated counters

 Author Message psych101 Respected Member Group: Forum Members Posts: 14, Visits: 73 Hello,I want to create multiple counters, with embedded expressions within them.  I'm not quite sure where to start with getting the code to work, so any suggestions would be greatly appreciated. I'm not sure how to use expressions within counters. Specifically, I want participants to have a total of 80 trials, each trial will have two choices to choose from: choice A and choice B. Each choice has three different numbers called distributions, listed as the maximum, middle, and minimum in that order. Only one of the two options will be manipulated with the expressions "options" below, and the other choice will just have the original distribution values. There are four different original distributions, each with three numbers. However, these three numbers will always be present together in a line (hence me naming it distrib#_all to keep them together. I listed them separately because I thought that would be better for the expression manipulation listed below:Note that distrib1_# refers to the distribution option (1) and then the order it is presented in a line (1st, 2nd, 3rd). / distrib1_1 = 1000/ distrib1_2 = 200/ distrib1_3 = 100/ distrib1_all = 1000    200    1000/ distrib2_1 = 1000/ distrib2_2 = 800/ distrib2_3 = 100/ distrib2_all = 1000    800   100/ distrib3_1 = 1000/ distrib3_2 = 500/ distrib3_3 = 400/ distrib3_all = 1000   500   400/ distrib4_1 = 600/ distrib4_2 = 500/ distrib4_3 = 400/ distrib4_all = 600   500   4000There are five different manipulation options for the three values contained in the choice, listed below.                  Max              middle                     minOption1:    max/.75       middle                      min+(max/.75)Option2:    max/.50        middle+(max/.25)   min+(max/.25)Option3: max+.5(min)   middle+.5(min)      0Option4:  avg.                avg.                      avg.Option5:  max                middle                  minI am wondering if there is a way for me to streamline the expressions into the counter? I wrote the following code, which obviously doesn't work. My intention would be for Inquisit to use different distribution values when I indicate "%". Does Inquisit have any tools to handle what I am looking to do?/ option1 = values.distrib%_1/0.75, values.distrib%_2, values.distrib%_3 + (values.distrib%_1/0.75)/ option2 = values.distrib%_1/0.50, values.distrib%_2 +(values.distrib%_1/0.25), values.distrib%_3 + (values.distrib%_1/0.25)/ option3 = values.distrib%_1 + .5(*values.distrib%_3), values.distrib%_2 + (0.5*values.distrib%_3), values.distrib%_3 *0/ option4 = (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3), (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3), (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3)/ option5 = values.distrib%_1, values.distrib%_2, values.distrib%_3We also want to have one of the four interest conditions for each trial, which are text indicating:1. You are none2. you are max3. you are middle4. you are min/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"In summary, each trial will have the following:1.  one random distribution values (out of 4)2. randomly selected option manipulations (out of 5)3. one random interest condition.I need to create a counter that includes all 1-3 per trial. Could you please help provide suggestions on how to go about this? Dave Supreme Being Group: Administrators Posts: 9.9K, Visits: 49K +xpsych101 - 7/11/2019Hello,I want to create multiple counters, with embedded expressions within them.  I'm not quite sure where to start with getting the code to work, so any suggestions would be greatly appreciated. I'm not sure how to use expressions within counters. Specifically, I want participants to have a total of 80 trials, each trial will have two choices to choose from: choice A and choice B. Each choice has three different numbers called distributions, listed as the maximum, middle, and minimum in that order. Only one of the two options will be manipulated with the expressions "options" below, and the other choice will just have the original distribution values. There are four different original distributions, each with three numbers. However, these three numbers will always be present together in a line (hence me naming it distrib#_all to keep them together. I listed them separately because I thought that would be better for the expression manipulation listed below:Note that distrib1_# refers to the distribution option (1) and then the order it is presented in a line (1st, 2nd, 3rd). / distrib1_1 = 1000/ distrib1_2 = 200/ distrib1_3 = 100/ distrib1_all = 1000    200    1000/ distrib2_1 = 1000/ distrib2_2 = 800/ distrib2_3 = 100/ distrib2_all = 1000    800   100/ distrib3_1 = 1000/ distrib3_2 = 500/ distrib3_3 = 400/ distrib3_all = 1000   500   400/ distrib4_1 = 600/ distrib4_2 = 500/ distrib4_3 = 400/ distrib4_all = 600   500   4000There are five different manipulation options for the three values contained in the choice, listed below.                  Max              middle                     minOption1:    max/.75       middle                      min+(max/.75)Option2:    max/.50        middle+(max/.25)   min+(max/.25)Option3: max+.5(min)   middle+.5(min)      0Option4:  avg.                avg.                      avg.Option5:  max                middle                  minI am wondering if there is a way for me to streamline the expressions into the counter? I wrote the following code, which obviously doesn't work. My intention would be for Inquisit to use different distribution values when I indicate "%". Does Inquisit have any tools to handle what I am looking to do?/ option1 = values.distrib%_1/0.75, values.distrib%_2, values.distrib%_3 + (values.distrib%_1/0.75)/ option2 = values.distrib%_1/0.50, values.distrib%_2 +(values.distrib%_1/0.25), values.distrib%_3 + (values.distrib%_1/0.25)/ option3 = values.distrib%_1 + .5(*values.distrib%_3), values.distrib%_2 + (0.5*values.distrib%_3), values.distrib%_3 *0/ option4 = (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3), (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3), (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3)/ option5 = values.distrib%_1, values.distrib%_2, values.distrib%_3We also want to have one of the four interest conditions for each trial, which are text indicating:1. You are none2. you are max3. you are middle4. you are min/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"In summary, each trial will have the following:1.  one random distribution values (out of 4)2. randomly selected option manipulations (out of 5)3. one random interest condition.I need to create a counter that includes all 1-3 per trial. Could you please help provide suggestions on how to go about this?You mention one or several elements, but the code you provided does not seem to include any counters. It's unclear to me why or how you would use a counter and what exactly for. (As a tangent: You should not be using elements at all under Inquisit 5; they are superseded by the more versatile elements).Please be so kind a provide a stripped down, runable example of what you want your task to look like. I'm unable to infer that from the partial description and the isolated code snippets you posted.As for> My intention would be for Inquisit to use different distribution values when I indicate "%". Does Inquisit have any tools to handle what I am looking to do?the answer is no, it won't work that way. You'll want to copy the values of whatever distribution you've chosen for a given trial in some generic values, and your expressions can then operate on those. Perhaps there is a better way, but I would need you to give me a clearer picture of what exactly you want to do first. Dave Supreme Being Group: Administrators Posts: 9.9K, Visits: 49K +xDave - 7/11/2019+xpsych101 - 7/11/2019Hello,I want to create multiple counters, with embedded expressions within them.  I'm not quite sure where to start with getting the code to work, so any suggestions would be greatly appreciated. I'm not sure how to use expressions within counters. Specifically, I want participants to have a total of 80 trials, each trial will have two choices to choose from: choice A and choice B. Each choice has three different numbers called distributions, listed as the maximum, middle, and minimum in that order. Only one of the two options will be manipulated with the expressions "options" below, and the other choice will just have the original distribution values. There are four different original distributions, each with three numbers. However, these three numbers will always be present together in a line (hence me naming it distrib#_all to keep them together. I listed them separately because I thought that would be better for the expression manipulation listed below:Note that distrib1_# refers to the distribution option (1) and then the order it is presented in a line (1st, 2nd, 3rd). / distrib1_1 = 1000/ distrib1_2 = 200/ distrib1_3 = 100/ distrib1_all = 1000    200    1000/ distrib2_1 = 1000/ distrib2_2 = 800/ distrib2_3 = 100/ distrib2_all = 1000    800   100/ distrib3_1 = 1000/ distrib3_2 = 500/ distrib3_3 = 400/ distrib3_all = 1000   500   400/ distrib4_1 = 600/ distrib4_2 = 500/ distrib4_3 = 400/ distrib4_all = 600   500   4000There are five different manipulation options for the three values contained in the choice, listed below.                  Max              middle                     minOption1:    max/.75       middle                      min+(max/.75)Option2:    max/.50        middle+(max/.25)   min+(max/.25)Option3: max+.5(min)   middle+.5(min)      0Option4:  avg.                avg.                      avg.Option5:  max                middle                  minI am wondering if there is a way for me to streamline the expressions into the counter? I wrote the following code, which obviously doesn't work. My intention would be for Inquisit to use different distribution values when I indicate "%". Does Inquisit have any tools to handle what I am looking to do?/ option1 = values.distrib%_1/0.75, values.distrib%_2, values.distrib%_3 + (values.distrib%_1/0.75)/ option2 = values.distrib%_1/0.50, values.distrib%_2 +(values.distrib%_1/0.25), values.distrib%_3 + (values.distrib%_1/0.25)/ option3 = values.distrib%_1 + .5(*values.distrib%_3), values.distrib%_2 + (0.5*values.distrib%_3), values.distrib%_3 *0/ option4 = (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3), (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3), (values.distrib%_1 + values.distrib%_2 + values.distrib%_3/3)/ option5 = values.distrib%_1, values.distrib%_2, values.distrib%_3We also want to have one of the four interest conditions for each trial, which are text indicating:1. You are none2. you are max3. you are middle4. you are min/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"In summary, each trial will have the following:1.  one random distribution values (out of 4)2. randomly selected option manipulations (out of 5)3. one random interest condition.I need to create a counter that includes all 1-3 per trial. Could you please help provide suggestions on how to go about this?You mention one or several elements, but the code you provided does not seem to include any counters. It's unclear to me why or how you would use a counter and what exactly for. (As a tangent: You should not be using elements at all under Inquisit 5; they are superseded by the more versatile elements).Please be so kind a provide a stripped down, runable example of what you want your task to look like. I'm unable to infer that from the partial description and the isolated code snippets you posted.As for> My intention would be for Inquisit to use different distribution values when I indicate "%". Does Inquisit have any tools to handle what I am looking to do?the answer is no, it won't work that way. You'll want to copy the values of whatever distribution you've chosen for a given trial in some generic values, and your expressions can then operate on those. Perhaps there is a better way, but I would need you to give me a clearer picture of what exactly you want to do first.To start with at least a partial response based on what you've outlined, I would frame the selection of distributions and manipulation options like so:/ dist_a = 1/ manip_a = 1/ max_a = 0/ mid_a = 0/ min_a = 0// we have 4 distributions to select from/ items = (1,2,3,4)// we have 5 manipulation options to select from/ items = (1,2,3,4,5)// original (unmanipulated) max values for distributions 1 to 4 (left to right)/ items = (1000, 1000, 1000, 600)/ select = values.dist_a// original (unmanipulated) mid values for distributions 1 to 4 (left to right)/ items = (200, 800, 500, 500)/ select = values.dist_a// original (unmanipulated) min values for distributions 1 to 4 (left to right)/ items = (100, 100, 400, 400)/ select = values.dist_a// expression applies the selected manipulation to the original values of the chosen distribution/ apply_manipulation = if (values.manip_a == 1) {values.max_a = list.max.nextvalue/0.75;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue + (list.max.nextvalue/0.75);} else if (values.manip_a == 2) {values.max_a = list.max.nextvalue/0.50;values.mid_a = list.mid.nextvalue + (list.max.nextvalue/0.25);values.min_a = list.min.nextvalue + (list.max.nextvalue/0.25);} else if (values.manip_a == 3) {values.max_a = list.max.nextvalue + (0.50 * list.min.nextvalue);values.mid_a = list.mid.nextvalue + (0.50 * list.min.nextvalue);values.min_a = 0 * list.min.nextvalue;} else if (values.manip_a == 4) {values.max_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.mid_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.min_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;} else if (values.manip_a == 5) {values.max_a = list.max.nextvalue;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue;};// select a random distribution number at the start of each trial// select a random manipulation option at the start of each trial// apply chosen manipulation to the distribution values/ ontrialbegin = [list.distributions.reset();list.manipulations.reset();values.dist_a = list.distributions.nextvalue;values.manip_a = list.manipulations.nextvalue;expressions.apply_manipulation;]/ stimulusframes = [1=distribution_a, debug]/ validresponse = (57)/ items = ("Selected Distribution #<%values.dist_a%> | Selected Manipulation #<%values.manip_a%>")/ position = (50%, 10%)/ items = ("Max: <%values.max_a%>, Mid: <%values.mid_a%>, Min: <%values.min_a%>")/ trials = [1-10 = exampletrial] psych101 Respected Member Group: Forum Members Posts: 14, Visits: 73 Hi Dave,Thank you very much for your help -- it is greatly appreciated. Option A and Option B - presentation side by side:I have made edits to the code to include option B (which should be one of the original distributions, randomly selected regardless of the option A manipulated numbers) on the screen at the same time. However, the block code is not allowing me to show both options at once. Could you please help with this issue? I can combine the trials for a block, but am uncertain about how to go about this with both options because I want them to each be a separate trial (they are being reset differently).I also don't believe that I should restart values for max_orig mid_orig and min_orig at 0, since they are essentially pasted from the original distributions. However, I want to reset them at the beginning of the trial and therefore am uncertain of how to do this without setting them as a value equal to 0.Dropdown questions to be presented every trialI have also added a total of six dropdown questions that should appear on the screen below the two options. From my understanding, I can use dropdown questions by creating a survey element and then the survey page. How do I get around this in order to present the questions and stimuli all on the same screen, for the full 80 trials? Currently, the code I have does not do this.New, randomized self-interest condition I added the self-interest conditions indicating the participant's role (You are none, you are max, you are middle, you are min). How do I make sure that this is randomized, independent of the other randomized variables (distribution, manipulation, etc)? I tried to list it using the <%> text presented to the participant, but understandable since it's not a value, but a text character, it is not showing up. How can I fix this?Total randomized trial iterationsIn addition, I want to ensure that a total of 80 trials with all possible combinations are presented for the experiment (4 distributions,  5 manipulations, 4 self-interest conditions = 80 trials). How do I go about this?I would greatly appreciate your help. Here is the code below, with the bolded areas of particular interest/concern./ dist_a = 1 / manip_a = 1/ max_a = 0/ mid_a = 0/ min_a = 0/ dist_orig = 1/ max_orig = 0/ mid_orig = 0/ min_orig = 0// we have 4 distributions to select from/ items = (1,2,3,4)// we have 5 manipulation options to select from/ items = (1,2,3,4,5)// we have 4 self-interest conditions/ items = (1,2,3,4)/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"/ items = potentialSelfInterests// original (unmanipulated) max values for distributions 1 to 4 (left to right)/ items = (1000, 1000, 1000, 600)/ select = values.dist_a// original (unmanipulated) mid values for distributions 1 to 4 (left to right)/ items = (200, 800, 500, 500)/ select = values.dist_a// original (unmanipulated) min values for distributions 1 to 4 (left to right)/ items = (100, 100, 400, 400)/ select = values.dist_a/// original (only for use for second option)/ items = (1000, 1000, 1000, 600)/ select = values.dist_orig/ items = (200, 800, 500, 500)/ select = values.dist_orig/ items = (100, 100, 400, 400)/ select = values.dist_orig// expression applies the selected manipulation to the original values of the chosen distribution/ apply_manipulation = if (values.manip_a == 1) {values.max_a = list.max.nextvalue/0.75;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue + (list.max.nextvalue/0.75);} else if (values.manip_a == 2) {values.max_a = list.max.nextvalue/0.50;values.mid_a = list.mid.nextvalue + (list.max.nextvalue/0.25);values.min_a = list.min.nextvalue + (list.max.nextvalue/0.25);} else if (values.manip_a == 3) {values.max_a = list.max.nextvalue + (0.50 * list.min.nextvalue);values.mid_a = list.mid.nextvalue + (0.50 * list.min.nextvalue);values.min_a = 0 * list.min.nextvalue;} else if (values.manip_a == 4) {values.max_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.mid_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.min_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;} else if (values.manip_a == 5) {values.max_a = list.max.nextvalue;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue;};// select a random distribution number at the start of each trial// select a random manipulation option at the start of each trial// apply chosen manipulation to the distribution values/ ontrialbegin = [list.distributions.reset();list.manipulations.reset();list.potentialSelfInterests.reset();values.dist_a = list.distributions.nextvalue;values.manip_a = list.manipulations.nextvalue;expressions.apply_manipulation;]/ stimulusframes = [1=distribution_a, debug]/ validresponse = (57)/ ontrialbegin = [list.distributions.reset();values.dist_orig = list.distributions.nextvalue;]/ stimulusframes = [1= distribution_a, debug, distribution_original, debug_original]/ validresponse = (57)/ items = ("Selected Distribution #<%values.dist_a%> | Selected Manipulation #<%values.manip_a%> | Role: <%item.potentialSelfInterests%>")/ position = (50%, 10%)/ items = ("Selected Distribution Option B #<%values.dist_orig%>")/ position = (50%, 20%)/ items = ("Max Option A: <%values.max_a%>, Mid: <%values.mid_a%>, Min: <%values.min_a%>")/ position = (30%, 40%)/ items = ("Max Option B Original: <%values.max_orig%>, Mid: <%values.mid_orig%>, Min: <%values.min_orig%>")/ position = (40%,50%)/ caption = "What category is optionA?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ position = (30%, 80%)/ caption = "Is optionA potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ position = (30%, 85%)/ caption = "OptionA is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (30%,90%)/ caption = "What category is optionB?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ caption = "Is optionB potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ caption = "OptionB is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ items = (dropdown.Q1_a, dropdown.Q2_a, dropdown.Q3_a, dropdown.Q1_b, dropdown.Q2_b, dropdown.Q3_b)/ trials = [1-60 = replace(exampletrial,exampletrial_originals), list.dropdownQuestions] Dave Supreme Being Group: Administrators Posts: 9.9K, Visits: 49K +xpsych101 - 7/16/2019Hi Dave,Thank you very much for your help -- it is greatly appreciated. Option A and Option B - presentation side by side:I have made edits to the code to include option B (which should be one of the original distributions, randomly selected regardless of the option A manipulated numbers) on the screen at the same time. However, the block code is not allowing me to show both options at once. Could you please help with this issue? I can combine the trials for a block, but am uncertain about how to go about this with both options because I want them to each be a separate trial (they are being reset differently).I also don't believe that I should restart values for max_orig mid_orig and min_orig at 0, since they are essentially pasted from the original distributions. However, I want to reset them at the beginning of the trial and therefore am uncertain of how to do this without setting them as a value equal to 0.Dropdown questions to be presented every trialI have also added a total of six dropdown questions that should appear on the screen below the two options. From my understanding, I can use dropdown questions by creating a survey element and then the survey page. How do I get around this in order to present the questions and stimuli all on the same screen, for the full 80 trials? Currently, the code I have does not do this.New, randomized self-interest condition I added the self-interest conditions indicating the participant's role (You are none, you are max, you are middle, you are min). How do I make sure that this is randomized, independent of the other randomized variables (distribution, manipulation, etc)? I tried to list it using the <%> text presented to the participant, but understandable since it's not a value, but a text character, it is not showing up. How can I fix this?Total randomized trial iterationsIn addition, I want to ensure that a total of 80 trials with all possible combinations are presented for the experiment (4 distributions,  5 manipulations, 4 self-interest conditions = 80 trials). How do I go about this?I would greatly appreciate your help. Here is the code below, with the bolded areas of particular interest/concern./ dist_a = 1 / manip_a = 1/ max_a = 0/ mid_a = 0/ min_a = 0/ dist_orig = 1/ max_orig = 0/ mid_orig = 0/ min_orig = 0// we have 4 distributions to select from/ items = (1,2,3,4)// we have 5 manipulation options to select from/ items = (1,2,3,4,5)// we have 4 self-interest conditions/ items = (1,2,3,4)/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"/ items = potentialSelfInterests// original (unmanipulated) max values for distributions 1 to 4 (left to right)/ items = (1000, 1000, 1000, 600)/ select = values.dist_a// original (unmanipulated) mid values for distributions 1 to 4 (left to right)/ items = (200, 800, 500, 500)/ select = values.dist_a// original (unmanipulated) min values for distributions 1 to 4 (left to right)/ items = (100, 100, 400, 400)/ select = values.dist_a/// original (only for use for second option)/ items = (1000, 1000, 1000, 600)/ select = values.dist_orig/ items = (200, 800, 500, 500)/ select = values.dist_orig/ items = (100, 100, 400, 400)/ select = values.dist_orig// expression applies the selected manipulation to the original values of the chosen distribution/ apply_manipulation = if (values.manip_a == 1) {values.max_a = list.max.nextvalue/0.75;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue + (list.max.nextvalue/0.75);} else if (values.manip_a == 2) {values.max_a = list.max.nextvalue/0.50;values.mid_a = list.mid.nextvalue + (list.max.nextvalue/0.25);values.min_a = list.min.nextvalue + (list.max.nextvalue/0.25);} else if (values.manip_a == 3) {values.max_a = list.max.nextvalue + (0.50 * list.min.nextvalue);values.mid_a = list.mid.nextvalue + (0.50 * list.min.nextvalue);values.min_a = 0 * list.min.nextvalue;} else if (values.manip_a == 4) {values.max_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.mid_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.min_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;} else if (values.manip_a == 5) {values.max_a = list.max.nextvalue;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue;};// select a random distribution number at the start of each trial// select a random manipulation option at the start of each trial// apply chosen manipulation to the distribution values/ ontrialbegin = [list.distributions.reset();list.manipulations.reset();list.potentialSelfInterests.reset();values.dist_a = list.distributions.nextvalue;values.manip_a = list.manipulations.nextvalue;expressions.apply_manipulation;]/ stimulusframes = [1=distribution_a, debug]/ validresponse = (57)/ ontrialbegin = [list.distributions.reset();values.dist_orig = list.distributions.nextvalue;]/ stimulusframes = [1= distribution_a, debug, distribution_original, debug_original]/ validresponse = (57)/ items = ("Selected Distribution #<%values.dist_a%> | Selected Manipulation #<%values.manip_a%> | Role: <%item.potentialSelfInterests%>")/ position = (50%, 10%)/ items = ("Selected Distribution Option B #<%values.dist_orig%>")/ position = (50%, 20%)/ items = ("Max Option A: <%values.max_a%>, Mid: <%values.mid_a%>, Min: <%values.min_a%>")/ position = (30%, 40%)/ items = ("Max Option B Original: <%values.max_orig%>, Mid: <%values.mid_orig%>, Min: <%values.min_orig%>")/ position = (40%,50%)/ caption = "What category is optionA?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ position = (30%, 80%)/ caption = "Is optionA potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ position = (30%, 85%)/ caption = "OptionA is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (30%,90%)/ caption = "What category is optionB?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ caption = "Is optionB potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ caption = "OptionB is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ items = (dropdown.Q1_a, dropdown.Q2_a, dropdown.Q3_a, dropdown.Q1_b, dropdown.Q2_b, dropdown.Q3_b)/ trials = [1-60 = replace(exampletrial,exampletrial_originals), list.dropdownQuestions]> I have made edits to the code to include option B (which should be one of the original distributions, randomly selected regardless of the option A manipulated numbers) > on the screen at the same time. However, the block code is not allowing me to show both options at onceYou need a single trial element, not two, and you need to add etc. elements for option B and display those stimuli per the existing trial's /stimulusframes or -times.> I also don't believe that I should restart values for max_orig mid_orig and min_orig at 0, since they are essentially pasted from the original distributions. However, I want to reset them at the beginning of the trial and therefore am uncertain of how to do this without setting them as a value equal to 0I don't understand what you mean here.> I have also added a total of six dropdown questions that should appear on the screen below the two options. From my understanding, I can use dropdown questions by creating a survey element and then the survey page.No. A is a special kind of element. If you want dropdowns displayed with your two distributions (A and B), you need to set up a single with the elements or s for the distribution options and the six dropdowns. Then run that surveypage via your 's /trials attribute, just like any regular trial.> I added the self-interest conditions indicating the participant's role (You are none, you are max, you are middle, you are min). How do I make sure that this is randomized, independent of the other randomized variables (distribution, manipulation, etc)? In the same way the other, already existing things (distributions, manipulations) are randomized? I don't understand what the actual question is here.> In addition, I want to ensure that a total of 80 trials with all possible combinations are presented for the experiment (4 distributions,  5 manipulations, 4 self-interest conditions = 80 trials). How do I go about this?You need to encode the combinations you want using the three elements and then you need to pair those lists. See e.g. https://www.millisecond.com/forums/FindPost18268.aspx Dave Supreme Being Group: Administrators Posts: 9.9K, Visits: 49K +xDave - 7/16/2019+xpsych101 - 7/16/2019Hi Dave,Thank you very much for your help -- it is greatly appreciated. Option A and Option B - presentation side by side:I have made edits to the code to include option B (which should be one of the original distributions, randomly selected regardless of the option A manipulated numbers) on the screen at the same time. However, the block code is not allowing me to show both options at once. Could you please help with this issue? I can combine the trials for a block, but am uncertain about how to go about this with both options because I want them to each be a separate trial (they are being reset differently).I also don't believe that I should restart values for max_orig mid_orig and min_orig at 0, since they are essentially pasted from the original distributions. However, I want to reset them at the beginning of the trial and therefore am uncertain of how to do this without setting them as a value equal to 0.Dropdown questions to be presented every trialI have also added a total of six dropdown questions that should appear on the screen below the two options. From my understanding, I can use dropdown questions by creating a survey element and then the survey page. How do I get around this in order to present the questions and stimuli all on the same screen, for the full 80 trials? Currently, the code I have does not do this.New, randomized self-interest condition I added the self-interest conditions indicating the participant's role (You are none, you are max, you are middle, you are min). How do I make sure that this is randomized, independent of the other randomized variables (distribution, manipulation, etc)? I tried to list it using the <%> text presented to the participant, but understandable since it's not a value, but a text character, it is not showing up. How can I fix this?Total randomized trial iterationsIn addition, I want to ensure that a total of 80 trials with all possible combinations are presented for the experiment (4 distributions,  5 manipulations, 4 self-interest conditions = 80 trials). How do I go about this?I would greatly appreciate your help. Here is the code below, with the bolded areas of particular interest/concern./ dist_a = 1 / manip_a = 1/ max_a = 0/ mid_a = 0/ min_a = 0/ dist_orig = 1/ max_orig = 0/ mid_orig = 0/ min_orig = 0// we have 4 distributions to select from/ items = (1,2,3,4)// we have 5 manipulation options to select from/ items = (1,2,3,4,5)// we have 4 self-interest conditions/ items = (1,2,3,4)/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"/ items = potentialSelfInterests// original (unmanipulated) max values for distributions 1 to 4 (left to right)/ items = (1000, 1000, 1000, 600)/ select = values.dist_a// original (unmanipulated) mid values for distributions 1 to 4 (left to right)/ items = (200, 800, 500, 500)/ select = values.dist_a// original (unmanipulated) min values for distributions 1 to 4 (left to right)/ items = (100, 100, 400, 400)/ select = values.dist_a/// original (only for use for second option)/ items = (1000, 1000, 1000, 600)/ select = values.dist_orig/ items = (200, 800, 500, 500)/ select = values.dist_orig/ items = (100, 100, 400, 400)/ select = values.dist_orig// expression applies the selected manipulation to the original values of the chosen distribution/ apply_manipulation = if (values.manip_a == 1) {values.max_a = list.max.nextvalue/0.75;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue + (list.max.nextvalue/0.75);} else if (values.manip_a == 2) {values.max_a = list.max.nextvalue/0.50;values.mid_a = list.mid.nextvalue + (list.max.nextvalue/0.25);values.min_a = list.min.nextvalue + (list.max.nextvalue/0.25);} else if (values.manip_a == 3) {values.max_a = list.max.nextvalue + (0.50 * list.min.nextvalue);values.mid_a = list.mid.nextvalue + (0.50 * list.min.nextvalue);values.min_a = 0 * list.min.nextvalue;} else if (values.manip_a == 4) {values.max_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.mid_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.min_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;} else if (values.manip_a == 5) {values.max_a = list.max.nextvalue;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue;};// select a random distribution number at the start of each trial// select a random manipulation option at the start of each trial// apply chosen manipulation to the distribution values/ ontrialbegin = [list.distributions.reset();list.manipulations.reset();list.potentialSelfInterests.reset();values.dist_a = list.distributions.nextvalue;values.manip_a = list.manipulations.nextvalue;expressions.apply_manipulation;]/ stimulusframes = [1=distribution_a, debug]/ validresponse = (57)/ ontrialbegin = [list.distributions.reset();values.dist_orig = list.distributions.nextvalue;]/ stimulusframes = [1= distribution_a, debug, distribution_original, debug_original]/ validresponse = (57)/ items = ("Selected Distribution #<%values.dist_a%> | Selected Manipulation #<%values.manip_a%> | Role: <%item.potentialSelfInterests%>")/ position = (50%, 10%)/ items = ("Selected Distribution Option B #<%values.dist_orig%>")/ position = (50%, 20%)/ items = ("Max Option A: <%values.max_a%>, Mid: <%values.mid_a%>, Min: <%values.min_a%>")/ position = (30%, 40%)/ items = ("Max Option B Original: <%values.max_orig%>, Mid: <%values.mid_orig%>, Min: <%values.min_orig%>")/ position = (40%,50%)/ caption = "What category is optionA?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ position = (30%, 80%)/ caption = "Is optionA potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ position = (30%, 85%)/ caption = "OptionA is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (30%,90%)/ caption = "What category is optionB?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ caption = "Is optionB potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ caption = "OptionB is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ items = (dropdown.Q1_a, dropdown.Q2_a, dropdown.Q3_a, dropdown.Q1_b, dropdown.Q2_b, dropdown.Q3_b)/ trials = [1-60 = replace(exampletrial,exampletrial_originals), list.dropdownQuestions]> I have made edits to the code to include option B (which should be one of the original distributions, randomly selected regardless of the option A manipulated numbers) > on the screen at the same time. However, the block code is not allowing me to show both options at onceYou need a single trial element, not two, and you need to add etc. elements for option B and display those stimuli per the existing trial's /stimulusframes or -times.> I also don't believe that I should restart values for max_orig mid_orig and min_orig at 0, since they are essentially pasted from the original distributions. However, I want to reset them at the beginning of the trial and therefore am uncertain of how to do this without setting them as a value equal to 0I don't understand what you mean here.> I have also added a total of six dropdown questions that should appear on the screen below the two options. From my understanding, I can use dropdown questions by creating a survey element and then the survey page.No. A is a special kind of element. If you want dropdowns displayed with your two distributions (A and B), you need to set up a single with the elements or s for the distribution options and the six dropdowns. Then run that surveypage via your 's /trials attribute, just like any regular trial.> I added the self-interest conditions indicating the participant's role (You are none, you are max, you are middle, you are min). How do I make sure that this is randomized, independent of the other randomized variables (distribution, manipulation, etc)? In the same way the other, already existing things (distributions, manipulations) are randomized? I don't understand what the actual question is here.> In addition, I want to ensure that a total of 80 trials with all possible combinations are presented for the experiment (4 distributions,  5 manipulations, 4 self-interest conditions = 80 trials). How do I go about this?You need to encode the combinations you want using the three elements and then you need to pair those lists. See e.g. https://www.millisecond.com/forums/FindPost18268.aspx I have no idea what page layout you're going for (and I'm unclear whether option B is supposed to be a different distribution or the same distribution as selected for option A, but without the manipulation), but putting the above together will yield something like this:/ dist_a = 1/ manip_a = 1/ max_a = 0/ mid_a = 0/ min_a = 0/ selfinterest = 1/ dist_orig = 1/ max_orig = 0/ mid_orig = 0/ min_orig = 0// we have 4 distributions to select from/ items = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4)// we have 5 manipulation options to select from/ items = (1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5)/ selectionmode = list.distributions_a.currentindex// we have 4 self-interest conditions/ items = (1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4)/ selectionmode = list.distributions_a.currentindex/ items = (1,2,3,4)/ selectionmode = random/ replace = true/ not = (values.dist_a)/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"// original (unmanipulated) max values for distributions 1 to 4 (left to right)/ items = (1000, 1000, 1000, 600)/ select = values.dist_a// original (unmanipulated) mid values for distributions 1 to 4 (left to right)/ items = (200, 800, 500, 500)/ select = values.dist_a// original (unmanipulated) min values for distributions 1 to 4 (left to right)/ items = (100, 100, 400, 400)/ select = values.dist_a/// original (only for use for second option)/ items = (1000, 1000, 1000, 600)/ select = values.dist_orig/ items = (200, 800, 500, 500)/ select = values.dist_orig/ items = (100, 100, 400, 400)/ select = values.dist_orig// expression applies the selected manipulation to the original values of the chosen distribution/ apply_manipulation = if (values.manip_a == 1) {values.max_a = list.max.nextvalue/0.75;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue + (list.max.nextvalue/0.75);} else if (values.manip_a == 2) {values.max_a = list.max.nextvalue/0.50;values.mid_a = list.mid.nextvalue + (list.max.nextvalue/0.25);values.min_a = list.min.nextvalue + (list.max.nextvalue/0.25);} else if (values.manip_a == 3) {values.max_a = list.max.nextvalue + (0.50 * list.min.nextvalue);values.mid_a = list.mid.nextvalue + (0.50 * list.min.nextvalue);values.min_a = 0 * list.min.nextvalue;} else if (values.manip_a == 4) {values.max_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.mid_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.min_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;} else if (values.manip_a == 5) {values.max_a = list.max.nextvalue;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue;};// select a random distribution number at the start of each trial// select a random manipulation option at the start of each trial// apply chosen manipulation to the distribution values/ ontrialbegin = [values.dist_a = list.distributions_a.nextvalue;values.manip_a = list.manipulations.nextvalue;values.selfinterest = list.potentialSelfInterests.nextvalue;expressions.apply_manipulation;values.dist_orig = list.distributions_orig.nextvalue;values.min_orig = list.min_orig.nextvalue;values.mid_orig = list.mid_orig.nextvalue;values.max_orig = list.max_orig.nextvalue;]/ questions = [1=distribution_a, distribution_original, selfinterest, Q1_a, Q1_b, Q2_a, Q2_b, Q3_a, Q3_b]/ showpagenumbers = false/ showquestionnumbers = false/ nextbuttonposition = (40%, 95%)/ caption = "Max Option A: <%values.max_a%>, Mid: <%values.mid_a%>, Min: <%values.min_a%>"/ position = (10%, 30%)/ caption = "Max Option B Original: <%values.max_orig%>, Mid: <%values.mid_orig%>, Min: <%values.min_orig%>"/ position = (55%,30%)/ caption = "<%item.potentialSelfInterests.item(values.selfinterest)%>"/ position = (40%, 40%)/ caption = "What category is optionA?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ position = (10%, 65%)/ caption = "Is optionA potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ position = (10%, 75%)/ caption = "OptionA is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (10%,85%)/ caption = "What category is optionB?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("self-interest", "compassion", "envy", "fairness")/ position = (55%, 65%)/ caption = "Is optionB potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness")/ position = (55%, 75%)/ caption = "OptionB is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (55%, 85%)/ trials = [1-80 = examplepage]/ columns = (date time subject group blocknum blockcode trialnum trialcode response latencyvalues.dist_a, values.max_a, values.mid_a, values.min_a,values.dist_orig, values.max_orig, values.mid_orig, values.min_orig,values.manip_a, values.selfinterest)/ separatefiles = true psych101 Respected Member Group: Forum Members Posts: 14, Visits: 73 Thank you so much for your help, Dave. It is greatly appreciated.I noticed that the maximum, mid, and minimum don't always correspond to the number value for the manipulated Option A values. Do you know how I can go about making the highest number the max, etc.?Thank you Dave Supreme Being Group: Administrators Posts: 9.9K, Visits: 49K +xpsych101 - 7/17/2019Thank you so much for your help, Dave. It is greatly appreciated.I noticed that the maximum, mid, and minimum don't always correspond to the number value for the manipulated Option A values. Do you know how I can go about making the highest number the max, etc.?Thank you > I noticed that the maximum, mid, and minimum don't always correspond to the number value for the manipulated Option A values.That's an effect of your manipulations. Inquisit has min() and max() functions, so you might use those. https://www.millisecond.com/support/docs/v5/html/language/expressions/functions.htm Dave Supreme Being Group: Administrators Posts: 9.9K, Visits: 49K +xDave - 7/17/2019+xpsych101 - 7/17/2019Thank you so much for your help, Dave. It is greatly appreciated.I noticed that the maximum, mid, and minimum don't always correspond to the number value for the manipulated Option A values. Do you know how I can go about making the highest number the max, etc.?Thank you > I noticed that the maximum, mid, and minimum don't always correspond to the number value for the manipulated Option A values.That's an effect of your manipulations. Inquisit has min() and max() functions, so you might use those. https://www.millisecond.com/support/docs/v5/html/language/expressions/functions.htmCome to think of it, sorting a list is probably the better option:/ dist_a = 1/ manip_a = 1/ max_a = 0/ mid_a = 0/ min_a = 0/ selfinterest = 1/ dist_orig = 1/ max_orig = 0/ mid_orig = 0/ min_orig = 0// we have 4 distributions to select from/ items = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4)// we have 5 manipulation options to select from/ items = (1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5)/ selectionmode = list.distributions_a.currentindex// we have 4 self-interest conditions/ items = (1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4)/ selectionmode = list.distributions_a.currentindex/ items = (1,2,3,4)/ selectionmode = random/ replace = true/ not = (values.dist_a)/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"// original (unmanipulated) max values for distributions 1 to 4 (left to right)/ items = (1000, 1000, 1000, 600)/ select = values.dist_a// original (unmanipulated) mid values for distributions 1 to 4 (left to right)/ items = (200, 800, 500, 500)/ select = values.dist_a// original (unmanipulated) min values for distributions 1 to 4 (left to right)/ items = (100, 100, 400, 400)/ select = values.dist_a/// original (only for use for second option)/ items = (1000, 1000, 1000, 600)/ select = values.dist_orig/ items = (200, 800, 500, 500)/ select = values.dist_orig/ items = (100, 100, 400, 400)/ select = values.dist_orig// expression applies the selected manipulation to the original values of the chosen distribution/ apply_manipulation = if (values.manip_a == 1) {list.sort.reset();list.sort.appenditem(list.max.nextvalue/0.75);list.sort.appenditem(list.mid.nextvalue);list.sort.appenditem(list.min.nextvalue + (list.max.nextvalue/0.75));list.sort.sort(true, false);values.max_a = list.sort.item(3);values.mid_a = list.sort.item(2);values.min_a = list.sort.item(1);} else if (values.manip_a == 2) {list.sort.reset();list.sort.appenditem(list.max.nextvalue/0.50);list.sort.appenditem(list.mid.nextvalue + (list.max.nextvalue/0.25));list.sort.appenditem(list.min.nextvalue + (list.max.nextvalue/0.25));list.sort.sort(true, false);values.max_a = list.sort.item(3);values.mid_a = list.sort.item(2);values.min_a = list.sort.item(1);} else if (values.manip_a == 3) {list.sort.reset();list.sort.appenditem(list.max.nextvalue + (0.50 * list.min.nextvalue));list.sort.appenditem(list.mid.nextvalue + (0.50 * list.min.nextvalue));list.sort.appenditem(0 * list.min.nextvalue);list.sort.sort(true, false);values.max_a = list.sort.item(3);values.mid_a = list.sort.item(2);values.min_a = list.sort.item(1);} else if (values.manip_a == 4) {values.max_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.mid_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;values.min_a = (list.max.nextvalue + list.mid.nextvalue + list.min.nextvalue)/3;} else if (values.manip_a == 5) {values.max_a = list.max.nextvalue;values.mid_a = list.mid.nextvalue;values.min_a = list.min.nextvalue;};// select a random distribution number at the start of each trial// select a random manipulation option at the start of each trial// apply chosen manipulation to the distribution values/ ontrialbegin = [values.dist_a = list.distributions_a.nextvalue;values.manip_a = list.manipulations.nextvalue;values.selfinterest = list.potentialSelfInterests.nextvalue;expressions.apply_manipulation;values.dist_orig = list.distributions_orig.nextvalue;values.min_orig = list.min_orig.nextvalue;values.mid_orig = list.mid_orig.nextvalue;values.max_orig = list.max_orig.nextvalue;]/ questions = [1=distribution_a, distribution_original, selfinterest, Q1_a, Q1_b, Q2_a, Q2_b, Q3_a, Q3_b]/ showpagenumbers = false/ showquestionnumbers = false/ nextbuttonposition = (40%, 95%)/ caption = "Max Option A: <%values.max_a%>, Mid: <%values.mid_a%>, Min: <%values.min_a%>"/ position = (10%, 30%)/ caption = "Max Option B Original: <%values.max_orig%>, Mid: <%values.mid_orig%>, Min: <%values.min_orig%>"/ position = (55%,30%)/ caption = "<%item.potentialSelfInterests.item(values.selfinterest)%>"/ position = (40%, 40%)/ caption = "What category is optionA?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (10%, 65%)/ caption = "Is optionA potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (10%, 75%)/ caption = "OptionA is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (10%,85%)/ caption = "What category is optionB?"/ options = ("self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (55%, 65%)/ caption = "Is optionB potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (55%, 75%)/ caption = "OptionB is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ optionvalues = ("1", "2", "3", "4", "5")/ required = true/ responsefontstyle = ("Arial", 1.4%, false, false, false, false, 5, 0)/ position = (55%, 85%)/ trials = [1-80 = examplepage]/ columns = (date time subject group blocknum blockcode trialnum trialcode response latencyvalues.dist_a, values.max_a, values.mid_a, values.min_a,values.dist_orig, values.max_orig, values.mid_orig, values.min_orig,values.manip_a, values.selfinterest)/ separatefiles = true Edited 5 Months Ago by Dave psych101 Respected Member Group: Forum Members Posts: 14, Visits: 73 Thank you Dave, this worked well. I have one more question below -- it's quite complicated.I made a few updates to the code, created an "original values" or starting point that will be shown at the top for each trial (formerly called option b, original unmanipulated distributions), and created a new, manipulated option b, which is pretty much the same as option a but is randomized separately. For each trial, I would like the program to calculate the total of the randomized original values (max + mid + min) selected. Then, use this total to adjust the three values for each of the randomized option a and option b manipulations. The goal is for the original value total and the two option totals to be the same, while keeping the same ratios between the values so we don't lose the manipulations. Again, this would be adjusted every single trial. Since the original values have different totals,  and since there are multiple different option a's and different option b's depending on the random selection, it does not seem feasible to manually create every single combination and code it that way. I'm not sure if there is a way to do this in Inquisit. Could you please let me know if it is possible, and if so, how to make each trial's option a and b have the same total of the original values? Thank you for your time./ fontstyle = ("Arial", 2.22%, false, false, false, false, 5, 0)/ dist_a = 1 / manip_a = 1/ max_a = 0/ mid_a = 0/ min_a = 0/ selfinterest = 1/ dist_orig = 1/ max_orig = 0/ mid_orig = 0/ min_orig = 0/ dist_b = 1/ manip_b = 1/ max_b = 0/ mid_b = 0/ min_b = 0// we have 4 distributions to select from/ items = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4)/ items = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4)// we have 5 manipulation options to select from/ items = (1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5)/ selectionmode = list.distributions_a.currentindex/ items = (1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5)/ selectionmode = list.distributions_b.currentindex/ items = (1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4)/ selectionmode = list.distributions_a.currentindex/ items = (1,2,3,4)/ selectionmode = random/ replace = true/ not = (values.dist_a)/1 = "You are none"/2 = "You are max"/3 = "You are middle"/4 = "You are min"// original (unmanipulated) max values for distributions 1 to 4 (left to right)/ items = (1000, 1000, 1000, 600)/ select = values.dist_a// original (unmanipulated) mid values for distributions 1 to 4 (left to right)/ items = (200, 800, 500, 500)/ select = values.dist_a// original (unmanipulated) min values for distributions 1 to 4 (left to right)/ items = (100, 100, 400, 400)/ select = values.dist_a// original values for distib b/ items = (1000, 1000, 1000, 600)/ select = values.dist_b/ items = (200, 800, 500, 500)/ select = values.dist_b/ items = (100, 100, 400, 400)/ select = values.dist_b/// original (only for use for second option)/ items = (1000, 1000, 1000, 600)/ select = values.dist_orig/ items = (200, 800, 500, 500)/ select = values.dist_orig/ items = (100, 100, 400, 400)/ select = values.dist_orig/ expression applies the selected manipulation to the original values of the chosen distribution// expression applies the selected manipulation to the original values of the chosen distribution - option A/ apply_manipulation_a = if (values.manip_a == 1) {list.sort.reset();list.sort.appenditem(list.list_max_a.nextvalue/0.75);list.sort.appenditem(list.list_mid_a.nextvalue);list.sort.appenditem(list.list_min_a.nextvalue + (list.list_max_a.nextvalue/0.75));list.sort.sort(true, false);values.max_a = list.sort.item(3);values.mid_a = list.sort.item(2);values.min_a = list.sort.item(1);} else if (values.manip_a == 2) {list.sort.reset();list.sort.appenditem(list.list_max_a.nextvalue/0.50);list.sort.appenditem(list.list_mid_a.nextvalue + (list.list_max_a.nextvalue/0.25));list.sort.appenditem(list.list_min_a.nextvalue + (list.list_max_a.nextvalue/0.25));list.sort.sort(true, false);values.max_a = list.sort.item(3);values.mid_a = list.sort.item(2);values.min_a = list.sort.item(1);} else if (values.manip_a == 3) {list.sort.reset();list.sort.appenditem(list.list_max_a.nextvalue + (0.50 * list.list_min_a.nextvalue));list.sort.appenditem(list.list_mid_a.nextvalue + (0.50 * list.list_min_a.nextvalue));list.sort.appenditem(0 * list.list_min_a.nextvalue);list.sort.sort(true, false);values.max_a = list.sort.item(3);values.mid_a = list.sort.item(2);values.min_a = list.sort.item(1);} else if (values.manip_a == 4) {values.max_a = (list.list_max_a.nextvalue + list.list_mid_a.nextvalue + list.list_min_a.nextvalue)/3;values.mid_a = (list.list_max_a.nextvalue + list.list_mid_a.nextvalue + list.list_min_a.nextvalue)/3;values.min_a = (list.list_max_a.nextvalue + list.list_mid_a.nextvalue + list.list_min_a.nextvalue)/3;} else if (values.manip_a == 5) {values.max_a = list.list_max_a.nextvalue;values.mid_a = list.list_mid_a.nextvalue;values.min_a = list.list_min_a.nextvalue;};/ I switched the manipulation order for option b. / apply_manipulation_b = if (values.manip_b == 1) {values.max_b = list.list_max_b.nextvalue;values.mid_b = list.list_mid_b.nextvalue;values.min_b = list.list_min_b.nextvalue;} else if (values.manip_b == 2) {values.max_b = (list.list_max_b.nextvalue + list.list_mid_b.nextvalue + list.list_min_b.nextvalue)/3;values.mid_b = (list.list_max_b.nextvalue + list.list_mid_b.nextvalue + list.list_min_b.nextvalue)/3;values.min_b = (list.list_max_b.nextvalue + list.list_mid_b.nextvalue + list.list_min_b.nextvalue)/3;} else if (values.manip_b == 3) {list.sort.reset();list.sort.appenditem(list.list_max_b.nextvalue/0.75);list.sort.appenditem(list.list_mid_b.nextvalue);list.sort.appenditem(list.list_min_b.nextvalue + (list.list_max_b.nextvalue/0.75));list.sort.sort(true, false);values.max_b = list.sort.item(3);values.mid_b = list.sort.item(2);values.min_b = list.sort.item(1);} else if (values.manip_b == 4) {list.sort.reset();list.sort.appenditem(list.list_max_b.nextvalue/0.50);list.sort.appenditem(list.list_mid_b.nextvalue + (list.list_max_b.nextvalue/0.25));list.sort.appenditem(list.list_min_b.nextvalue + (list.list_max_b.nextvalue/0.25));list.sort.sort(true, false);values.max_b = list.sort.item(3);values.mid_b = list.sort.item(2);values.min_b = list.sort.item(1);} else if (values.manip_b == 5) {list.sort.reset();list.sort.appenditem(list.list_max_b.nextvalue + (0.50 * list.list_min_b.nextvalue));list.sort.appenditem(list.list_mid_b.nextvalue + (0.50 * list.list_min_b.nextvalue));list.sort.appenditem(0 * list.list_min_b.nextvalue);list.sort.sort(true, false);values.max_b = list.sort.item(3);values.mid_b = list.sort.item(2);values.min_b = list.sort.item(1);};// select a random distribution number at the start of each trial// select a random manipulation option at the start of each trial// apply chosen manipulation to the distribution values/ ontrialbegin = [values.dist_a = list.distributions_a.nextvalue;values.manip_a = list.manipulations_a.nextvalue;values.selfinterest = list.potentialSelfInterests.nextvalue;expressions.apply_manipulation_a;values.dist_orig = list.distributions_orig.nextvalue;values.min_orig = list.list_min_orig.nextvalue;values.mid_orig = list.list_mid_orig.nextvalue;values.max_orig = list.list_max_orig.nextvalue;values.dist_b = list.distributions_b.nextvalue;values.manip_b = list.manipulations_b.nextvalue;expressions.apply_manipulation_b;]/ questions = [1=distribution_original, distribution_a, distribution_b, selfinterest, Q1_a, Q1_b, Q2_a, Q2_b, Q3_a, Q3_b, Q4_a, Q4_b, Q5_a, Q5_b, Q6_a, Q6_b]/ showpagenumbers = false/ showquestionnumbers = false/ nextbuttonposition = (40%, 95%)/ recorddata = true/ caption = "Original Values: <%values.max_orig%>, <%values.mid_orig%>, <%values.min_orig%>"/ position = (35%,2%)/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)/ caption = "OPTION A:<%values.max_a%>, <%values.mid_a%>, <%values.min_a%>"/ position = (35%, 15%)/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)/ caption = "OPTION B:<%values.max_b%>, <%values.mid_b%>, <%values.min_b%>"/ position = (35%, 20%)/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 0)/ caption = "<%item.potentialSelfInterests.item(values.selfinterest)%>"/ position = (10%, 10%)/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)/ caption = "What category is option A?"/ options = ("self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("self-interest", "compassion", "envy", "fairness", "unsure")/ position = (10%, 35%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Is option A potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ position = (10%, 45%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Is option A potentially also a third category?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ position = (10%, 55%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Is option A potentially also a fourth category?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ position = (10%, 65%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Option A is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ position = (10%, 75%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Could this be characterized as something undefined?"/ validresponse = ("character")/ required = false/ position = (10%, 85%)// Option B Questions/ caption = "What category is option B?"/ options = ("self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("self-interest", "compassion", "envy", "fairness", "unsure")/ position = (55%, 35%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Is option B potentially something else?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ position = (55%, 45%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Is option B potentially also a third category?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ position = (55%, 55%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Is option B potentially also a fourth category?"/ options = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ required = true/ validresponse = ("NA", "self-interest", "compassion", "envy", "fairness", "unsure")/ position = (55%, 65%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Option B is a great, clear example of your first choice category"/ options = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ required = true/ validresponse = ("Strongly Agree", "Agree", "Unsure", "Disagree", "Strongly Disagree")/ position = (55%, 75%)/ responsefontstyle = ("Arial", 1.67%, false, false, false, false, 5, 0)/ caption = "Could this be characterized as something undefined?"/ validresponse = ("character")/ required = false/ position = (55%, 85%)// instruct page^ ..../ trials = [1-80 = examplepage]/ preinstructions = (page.Intro)/ blocks = [1=exampleblock]/ columns = (date time subject group blocknum blockcode trialnum trialcode response latencyvalues.dist_a, values.max_a, values.mid_a, values.min_a,values.dist_b, values.max_b, values.mid_b, values.min_b,values.dist_orig, values.max_orig, values.mid_orig, values.min_orig,values.manip_a, values.manip_b, values.selfinterest, dropdown.Q1_a.response, dropdown.Q1_b.response, dropdown.Q2_a.responsedropdown.Q2_b.response, dropdown.Q3_a.response, dropdown.Q3_b.response, dropdown.Q4_a.response, dropdown.Q4_b.response, dropdown.Q5_a.response, dropdown.Q5_b.response, textbox.Q6_a.response, textbox.Q6_b.response)/ separatefiles = true

## Reading This Topic

##### Login
 Existing Account Email Address: Password: Remember Me Social Logins
##### Select a Forum....
 Millisecond Forums      Millisecond Software News      Inquisit 5      Inquisit 4      Inquisit 3      Inquisit 2.0      Inquisit 1.33 (archives)