Hi everyone, I am looking to create a new output for my inquisit script. [Outputting the ratio of...


Author
Message
oconnordavid15
oconnordavid15
Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)
Group: Forum Members
Posts: 39, Visits: 63
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


oconnordavid15
oconnordavid15
Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)
Group: Forum Members
Posts: 39, Visits: 63
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here
Attachments
Trial Draft 2.13.iqx (35 views, 161.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

oconnordavid15
oconnordavid15
Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)
Group: Forum Members
Posts: 39, Visits: 63
Dave - 2/14/2024
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

Hm, do you think something is wrong with how I am logging current_box_ratio? The list of ratios are not lining up with the list of trials                    "if (values.current_list == 1) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 2) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 3) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 4) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 5) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 6) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 7) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 8) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 9) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 10) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 11) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 12) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 13) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 14) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 15) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 16) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 17) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 18) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 19) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 20) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 21) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 22) {
        values.current_box_ratio="60/40"
    };"
Attachments
Trial Draft 2.17.iqx (34 views, 160.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
oconnordavid15 - 2/17/2024
Dave - 2/14/2024
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

Hm, do you think something is wrong with how I am logging current_box_ratio? The list of ratios are not lining up with the list of trials                    "if (values.current_list == 1) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 2) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 3) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 4) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 5) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 6) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 7) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 8) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 9) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 10) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 11) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 12) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 13) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 14) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 15) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 16) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 17) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 18) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 19) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 20) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 21) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 22) {
        values.current_box_ratio="60/40"
    };"

And you've determined that how? Show the data.
oconnordavid15
oconnordavid15
Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)
Group: Forum Members
Posts: 39, Visits: 63
Dave - 2/19/2024
oconnordavid15 - 2/17/2024
Dave - 2/14/2024
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

Hm, do you think something is wrong with how I am logging current_box_ratio? The list of ratios are not lining up with the list of trials                    "if (values.current_list == 1) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 2) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 3) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 4) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 5) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 6) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 7) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 8) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 9) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 10) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 11) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 12) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 13) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 14) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 15) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 16) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 17) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 18) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 19) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 20) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 21) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 22) {
        values.current_box_ratio="60/40"
    };"

And you've determined that how? Show the data.


On running the trial (screenshot and output file attached) the sequence column of the trials was (1,2,19,17,10,6...) which should correspond to (60/40, 60/40, 60/40, 80/20,80/20,60/40...)  based on our trial ratios. However it output (60/40, 60/40, 80/20, 80/20, 80/20, 80/20) meaning an error in the 3rd spot, and 6th spot.

Also it seems the output column width does not expand to contain all of the ratios for the 22 trials, maybe that could be fixed by outputting as data and not summary data?

Trial Index
"Trial 1 : 9 Boxes : green, purple : 60/40 Ratio / choice 2
Trial 2 : 64 Boxes : gray, red : 60/40 Ratio / choice 2
*************************************************
Trial 3 : 9 Boxes : orange , purple : 60/40 Ratio/ choice 1
Trial 4 : 9 Boxes : gray , fuchsia : 60/40 Ratio/ choice 2
Trial 5 : 9 Boxes : green , red : 60/40 Ratio/ choice 2
Trial 6 : 9 Boxes : yellow , blue : 60/40 Ratio/ choice 1
Trial 7 : 9 Boxes : green , blue : 60/40 Ratio/ choice 2
Trial 8 : 9 Boxes : orange , purple : 80/20 Ratio/ choice 1
Trial 9 : 9 Boxes : gray , fuchsia : 80/20 Ratio/ choice 2
Trial 10 : 9 Boxes : green , red : 80/20 Ratio/ choice 1
Trial 11 : 9 Boxes : yellow , blue : 80/20 Ratio/ choice 1
Trial 12 : 9 Boxes : green , blue : 80:20 Ratio/ choice 2
Trial 13 : 64 Boxes : Orange , Purple : 80/20 Ratio/ choice 1
Trial 14 : 64 Boxes : Gray , Fuchsia : 80/20 Ratio/ choice 1
Trial 15 : 64 Boxes : Green , Red : 80/20 Ratio/ choice 2
Trial 16 : 64 Boxes : Yellow , Blue : 80/20 Ratio/ choice 1
Trial 17 : 64 Boxes : Green , Blue : 80/20 Ratio/ choice 2
Trial 18 : 64 Boxes : Orange , Purple : 60/40 Ratio/ choice 2
Trial 19 : 64 Boxes : Gray , Fuchsia : 60/40 Ratio/ choice 2
Trial 20 : 64 Boxes : Green , Red : 60/40 Ratio/ choice 1
Trial 21 : 64 Boxes : Yellow , Blue : 60/40 Ratio/ choice 2
Trial 22 : 64 Boxes : Green , Blue : 60/40 Ratio/ choice 1"

Attachments
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: 12K, Visits: 98K
oconnordavid15 - 2/19/2024
Dave - 2/19/2024
oconnordavid15 - 2/17/2024
Dave - 2/14/2024
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

Hm, do you think something is wrong with how I am logging current_box_ratio? The list of ratios are not lining up with the list of trials                    "if (values.current_list == 1) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 2) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 3) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 4) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 5) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 6) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 7) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 8) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 9) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 10) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 11) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 12) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 13) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 14) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 15) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 16) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 17) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 18) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 19) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 20) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 21) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 22) {
        values.current_box_ratio="60/40"
    };"

And you've determined that how? Show the data.


On running the trial (screenshot and output file attached) the sequence column of the trials was (1,2,19,17,10,6...) which should correspond to (60/40, 60/40, 60/40, 80/20,80/20,60/40...)  based on our trial ratios. However it output (60/40, 60/40, 80/20, 80/20, 80/20, 80/20) meaning an error in the 3rd spot, and 6th spot.

Also it seems the output column width does not expand to contain all of the ratios for the 22 trials, maybe that could be fixed by outputting as data and not summary data?

Trial Index
"Trial 1 : 9 Boxes : green, purple : 60/40 Ratio / choice 2
Trial 2 : 64 Boxes : gray, red : 60/40 Ratio / choice 2
*************************************************
Trial 3 : 9 Boxes : orange , purple : 60/40 Ratio/ choice 1
Trial 4 : 9 Boxes : gray , fuchsia : 60/40 Ratio/ choice 2
Trial 5 : 9 Boxes : green , red : 60/40 Ratio/ choice 2
Trial 6 : 9 Boxes : yellow , blue : 60/40 Ratio/ choice 1
Trial 7 : 9 Boxes : green , blue : 60/40 Ratio/ choice 2
Trial 8 : 9 Boxes : orange , purple : 80/20 Ratio/ choice 1
Trial 9 : 9 Boxes : gray , fuchsia : 80/20 Ratio/ choice 2
Trial 10 : 9 Boxes : green , red : 80/20 Ratio/ choice 1
Trial 11 : 9 Boxes : yellow , blue : 80/20 Ratio/ choice 1
Trial 12 : 9 Boxes : green , blue : 80:20 Ratio/ choice 2
Trial 13 : 64 Boxes : Orange , Purple : 80/20 Ratio/ choice 1
Trial 14 : 64 Boxes : Gray , Fuchsia : 80/20 Ratio/ choice 1
Trial 15 : 64 Boxes : Green , Red : 80/20 Ratio/ choice 2
Trial 16 : 64 Boxes : Yellow , Blue : 80/20 Ratio/ choice 1
Trial 17 : 64 Boxes : Green , Blue : 80/20 Ratio/ choice 2
Trial 18 : 64 Boxes : Orange , Purple : 60/40 Ratio/ choice 2
Trial 19 : 64 Boxes : Gray , Fuchsia : 60/40 Ratio/ choice 2
Trial 20 : 64 Boxes : Green , Red : 60/40 Ratio/ choice 1
Trial 21 : 64 Boxes : Yellow , Blue : 60/40 Ratio/ choice 2
Trial 22 : 64 Boxes : Green , Blue : 60/40 Ratio/ choice 1"

You do realize that you're only recording the ratios for the 64 box trials, don't you?
Edited 3 Months Ago by Dave
oconnordavid15
oconnordavid15
Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)
Group: Forum Members
Posts: 39, Visits: 63
Dave - 2/19/2024
oconnordavid15 - 2/19/2024
Dave - 2/19/2024
oconnordavid15 - 2/17/2024
Dave - 2/14/2024
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

Hm, do you think something is wrong with how I am logging current_box_ratio? The list of ratios are not lining up with the list of trials                    "if (values.current_list == 1) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 2) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 3) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 4) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 5) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 6) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 7) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 8) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 9) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 10) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 11) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 12) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 13) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 14) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 15) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 16) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 17) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 18) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 19) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 20) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 21) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 22) {
        values.current_box_ratio="60/40"
    };"

And you've determined that how? Show the data.


On running the trial (screenshot and output file attached) the sequence column of the trials was (1,2,19,17,10,6...) which should correspond to (60/40, 60/40, 60/40, 80/20,80/20,60/40...)  based on our trial ratios. However it output (60/40, 60/40, 80/20, 80/20, 80/20, 80/20) meaning an error in the 3rd spot, and 6th spot.

Also it seems the output column width does not expand to contain all of the ratios for the 22 trials, maybe that could be fixed by outputting as data and not summary data?

Trial Index
"Trial 1 : 9 Boxes : green, purple : 60/40 Ratio / choice 2
Trial 2 : 64 Boxes : gray, red : 60/40 Ratio / choice 2
*************************************************
Trial 3 : 9 Boxes : orange , purple : 60/40 Ratio/ choice 1
Trial 4 : 9 Boxes : gray , fuchsia : 60/40 Ratio/ choice 2
Trial 5 : 9 Boxes : green , red : 60/40 Ratio/ choice 2
Trial 6 : 9 Boxes : yellow , blue : 60/40 Ratio/ choice 1
Trial 7 : 9 Boxes : green , blue : 60/40 Ratio/ choice 2
Trial 8 : 9 Boxes : orange , purple : 80/20 Ratio/ choice 1
Trial 9 : 9 Boxes : gray , fuchsia : 80/20 Ratio/ choice 2
Trial 10 : 9 Boxes : green , red : 80/20 Ratio/ choice 1
Trial 11 : 9 Boxes : yellow , blue : 80/20 Ratio/ choice 1
Trial 12 : 9 Boxes : green , blue : 80:20 Ratio/ choice 2
Trial 13 : 64 Boxes : Orange , Purple : 80/20 Ratio/ choice 1
Trial 14 : 64 Boxes : Gray , Fuchsia : 80/20 Ratio/ choice 1
Trial 15 : 64 Boxes : Green , Red : 80/20 Ratio/ choice 2
Trial 16 : 64 Boxes : Yellow , Blue : 80/20 Ratio/ choice 1
Trial 17 : 64 Boxes : Green , Blue : 80/20 Ratio/ choice 2
Trial 18 : 64 Boxes : Orange , Purple : 60/40 Ratio/ choice 2
Trial 19 : 64 Boxes : Gray , Fuchsia : 60/40 Ratio/ choice 2
Trial 20 : 64 Boxes : Green , Red : 60/40 Ratio/ choice 1
Trial 21 : 64 Boxes : Yellow , Blue : 60/40 Ratio/ choice 2
Trial 22 : 64 Boxes : Green , Blue : 60/40 Ratio/ choice 1"

You do realize that you're only recording the ratios for the 64 box trials, don't you?
I was not aware of that, is that the root of my problem
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: 12K, Visits: 98K
oconnordavid15 - 2/19/2024
Dave - 2/19/2024
oconnordavid15 - 2/19/2024
Dave - 2/19/2024
oconnordavid15 - 2/17/2024
Dave - 2/14/2024
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

Hm, do you think something is wrong with how I am logging current_box_ratio? The list of ratios are not lining up with the list of trials                    "if (values.current_list == 1) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 2) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 3) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 4) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 5) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 6) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 7) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 8) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 9) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 10) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 11) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 12) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 13) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 14) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 15) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 16) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 17) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 18) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 19) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 20) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 21) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 22) {
        values.current_box_ratio="60/40"
    };"

And you've determined that how? Show the data.


On running the trial (screenshot and output file attached) the sequence column of the trials was (1,2,19,17,10,6...) which should correspond to (60/40, 60/40, 60/40, 80/20,80/20,60/40...)  based on our trial ratios. However it output (60/40, 60/40, 80/20, 80/20, 80/20, 80/20) meaning an error in the 3rd spot, and 6th spot.

Also it seems the output column width does not expand to contain all of the ratios for the 22 trials, maybe that could be fixed by outputting as data and not summary data?

Trial Index
"Trial 1 : 9 Boxes : green, purple : 60/40 Ratio / choice 2
Trial 2 : 64 Boxes : gray, red : 60/40 Ratio / choice 2
*************************************************
Trial 3 : 9 Boxes : orange , purple : 60/40 Ratio/ choice 1
Trial 4 : 9 Boxes : gray , fuchsia : 60/40 Ratio/ choice 2
Trial 5 : 9 Boxes : green , red : 60/40 Ratio/ choice 2
Trial 6 : 9 Boxes : yellow , blue : 60/40 Ratio/ choice 1
Trial 7 : 9 Boxes : green , blue : 60/40 Ratio/ choice 2
Trial 8 : 9 Boxes : orange , purple : 80/20 Ratio/ choice 1
Trial 9 : 9 Boxes : gray , fuchsia : 80/20 Ratio/ choice 2
Trial 10 : 9 Boxes : green , red : 80/20 Ratio/ choice 1
Trial 11 : 9 Boxes : yellow , blue : 80/20 Ratio/ choice 1
Trial 12 : 9 Boxes : green , blue : 80:20 Ratio/ choice 2
Trial 13 : 64 Boxes : Orange , Purple : 80/20 Ratio/ choice 1
Trial 14 : 64 Boxes : Gray , Fuchsia : 80/20 Ratio/ choice 1
Trial 15 : 64 Boxes : Green , Red : 80/20 Ratio/ choice 2
Trial 16 : 64 Boxes : Yellow , Blue : 80/20 Ratio/ choice 1
Trial 17 : 64 Boxes : Green , Blue : 80/20 Ratio/ choice 2
Trial 18 : 64 Boxes : Orange , Purple : 60/40 Ratio/ choice 2
Trial 19 : 64 Boxes : Gray , Fuchsia : 60/40 Ratio/ choice 2
Trial 20 : 64 Boxes : Green , Red : 60/40 Ratio/ choice 1
Trial 21 : 64 Boxes : Yellow , Blue : 60/40 Ratio/ choice 2
Trial 22 : 64 Boxes : Green , Blue : 60/40 Ratio/ choice 1"

You do realize that you're only recording the ratios for the 64 box trials, don't you?
I was not aware of that, is that the root of my problem

It obviously is. Look,  you have two blocks, <block boxtask_pressure9> and <block boxtask_pressure64>. You're only adding to the ratio list at the end of <block boxtask_pressure64>.



Edited 3 Months Ago by Dave
oconnordavid15
oconnordavid15
Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)Respected Member (477 reputation)
Group: Forum Members
Posts: 39, Visits: 63
Dave - 2/19/2024
oconnordavid15 - 2/19/2024
Dave - 2/19/2024
oconnordavid15 - 2/19/2024
Dave - 2/19/2024
oconnordavid15 - 2/17/2024
Dave - 2/14/2024
oconnordavid15 - 2/14/2024
oconnordavid15 - 2/14/2024
This experiment asks subjects to guess if there are more x colored boxes or y colored boxes with each trial having a ratio of x to y defined as either "60/40" or "80/20".
I am looking to output the ratio of each trial in the order the trials are shown to the participant. (Ratios are defined by <list ratio_trial01> through <list ratio_trial22> and will be either "60/40" or "80/20")

The trials are selected at random and will be selected in a different order every go around. (Trial order is shown in <summary data> "values.sequence")

Problem: I am having trouble mapping ratios to trials in a dynamic way

My current idea for a solution/Question: Is there a way for me to append values.sequence to a list, let's call it list A, then use an expression to map each list item to the correct trial ratio and store it in a new list called list B that I can output?

List A ex: (17,1,5,6,9,10...)
List B ex: (60/40,60/40,60/40,80/20....)


Script Attached here

You can record and log the ratios in exactly the same way the trial sequence itself is recorded. Just concat values.current_box_ratio to a value

/ onblockend = [
    values.ratio_list = concat(concat(values.ratio_list,values.current_box_ratio), ", ");
]

and log that value.

Hm, do you think something is wrong with how I am logging current_box_ratio? The list of ratios are not lining up with the list of trials                    "if (values.current_list == 1) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 2) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 3) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 4) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 5) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 6) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 7) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 8) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 9) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 10) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 11) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 12) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 13) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 14) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 15) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 16) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 17) {
        values.current_box_ratio="80/20"
    } else if (values.current_list == 18) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 19) {
        values.current_box_ratio="60/40"
    } else if (values.current_list == 20) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 21) {
        values.current_box_ratio="60/40"
    }else if (values.current_list == 22) {
        values.current_box_ratio="60/40"
    };"

And you've determined that how? Show the data.


On running the trial (screenshot and output file attached) the sequence column of the trials was (1,2,19,17,10,6...) which should correspond to (60/40, 60/40, 60/40, 80/20,80/20,60/40...)  based on our trial ratios. However it output (60/40, 60/40, 80/20, 80/20, 80/20, 80/20) meaning an error in the 3rd spot, and 6th spot.

Also it seems the output column width does not expand to contain all of the ratios for the 22 trials, maybe that could be fixed by outputting as data and not summary data?

Trial Index
"Trial 1 : 9 Boxes : green, purple : 60/40 Ratio / choice 2
Trial 2 : 64 Boxes : gray, red : 60/40 Ratio / choice 2
*************************************************
Trial 3 : 9 Boxes : orange , purple : 60/40 Ratio/ choice 1
Trial 4 : 9 Boxes : gray , fuchsia : 60/40 Ratio/ choice 2
Trial 5 : 9 Boxes : green , red : 60/40 Ratio/ choice 2
Trial 6 : 9 Boxes : yellow , blue : 60/40 Ratio/ choice 1
Trial 7 : 9 Boxes : green , blue : 60/40 Ratio/ choice 2
Trial 8 : 9 Boxes : orange , purple : 80/20 Ratio/ choice 1
Trial 9 : 9 Boxes : gray , fuchsia : 80/20 Ratio/ choice 2
Trial 10 : 9 Boxes : green , red : 80/20 Ratio/ choice 1
Trial 11 : 9 Boxes : yellow , blue : 80/20 Ratio/ choice 1
Trial 12 : 9 Boxes : green , blue : 80:20 Ratio/ choice 2
Trial 13 : 64 Boxes : Orange , Purple : 80/20 Ratio/ choice 1
Trial 14 : 64 Boxes : Gray , Fuchsia : 80/20 Ratio/ choice 1
Trial 15 : 64 Boxes : Green , Red : 80/20 Ratio/ choice 2
Trial 16 : 64 Boxes : Yellow , Blue : 80/20 Ratio/ choice 1
Trial 17 : 64 Boxes : Green , Blue : 80/20 Ratio/ choice 2
Trial 18 : 64 Boxes : Orange , Purple : 60/40 Ratio/ choice 2
Trial 19 : 64 Boxes : Gray , Fuchsia : 60/40 Ratio/ choice 2
Trial 20 : 64 Boxes : Green , Red : 60/40 Ratio/ choice 1
Trial 21 : 64 Boxes : Yellow , Blue : 60/40 Ratio/ choice 2
Trial 22 : 64 Boxes : Green , Blue : 60/40 Ratio/ choice 1"

You do realize that you're only recording the ratios for the 64 box trials, don't you?
I was not aware of that, is that the root of my problem

It obviously is. Look,  you have two blocks, <block boxtask_pressure9> and <block boxtask_pressure64>. You're only adding to the ratio list at the end of <block boxtask_pressure64>.



Ohhhhh, ok let me try and edit that 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search