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


Author
Message
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: 99K
Dave - 2/29/2024
oconnordavid15 - 2/29/2024
Dave - 2/29/2024
oconnordavid15 - 2/29/2024
Dave - 2/27/2024
oconnordavid15 - 2/27/2024
Dave - 2/22/2024
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.

Hi Dave, thanks for the advice I just coded the likert trial code here:

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 5000=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>


I was wondering, is there a way I can add this likert question after each of the 22 trials?

Would I do this by adding this code into boxtask_pressure9 and boxtask_pressure64 trials?

You can just /branch to the block running the likert trial from each of the two boxtask blocks.

In general, I think you should familiarize yourself with both Inquisit's syntax and programming model as well as the specific script you are working with before making any further changes.
(1) Read the Programmer's Manual. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf
(2) Work through the script's code systematically until you fully understand how it functions. Add comments to the code so you remember things later.
In this context, you may want to revisit the previous threads from two years ago ( https://forums.millisecond.com/Topic33633.aspx and https://forums.millisecond.com/Topic33710.aspx ).
(3) Use the language reference. https://www.millisecond.com/support/docs/current/html/language/languagereference.htm

Hi Dave, the branching worked great and I have been using the documentation you provided to edit the likert trial itself and then attempt to log/output the answers.

Currently using monkey runs it outputs (1,1,1,1,1,1,1,1,1,1,1,1,1) when it should be outputting random selections between 1 and 4.

Do you think this is an error with how I have set up the monkey responses or with how I record/log the responses?


<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
/ monkeyresponse = ("1","2","3","4")
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

<summary data>
values.likert_list

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

That isn't the response. That is the item number of the item presented by <text myscenario>, and since there is only one item, it's always 1.

I edited my likert trial further and am trying the following

values.likert_list = concat(concat(values.likert_list,values.mylikert.response),",");

however, this output is null, have Is there anything in the trial set up that is off? I run <block myblock> using a branch in the 9 and 64 box trials

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (10%)
/ monkeyresponse = ("1","2","3","4")
/ numpoints = 4
/ buttonvalues = [1="1"; 2="1";3="3";4="4"]
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident", "2 = quite confident", "3 = not very confident", "4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>

There is no such thing as

values.mylikert.response

Where do you even get this idea?

The <likert> isn't a <values> entry. It's a <likert>.

It's likert.mylikert.response, exactly as detailed in the documentation.

https://www.millisecond.com/support/docs/current/html/language/elements/likert.htm



Moreover, likert.mylikert isn't even what you're running, You're executing an entirely different likert element in the script you attached, likert.myestimate.

And additonally, you're assembling values.likert_list at the wrong place, At the end of the boxtask blocks, the likert hasn't even been executed, That only happens in the block you branch to, namely <block myestimate>.

I'd strongly recommend you clean up your code, too, as it's full of clutter that isn't actually used anywhere.
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: 99K
oconnordavid15 - 2/29/2024
Dave - 2/29/2024
oconnordavid15 - 2/29/2024
Dave - 2/27/2024
oconnordavid15 - 2/27/2024
Dave - 2/22/2024
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.

Hi Dave, thanks for the advice I just coded the likert trial code here:

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 5000=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>


I was wondering, is there a way I can add this likert question after each of the 22 trials?

Would I do this by adding this code into boxtask_pressure9 and boxtask_pressure64 trials?

You can just /branch to the block running the likert trial from each of the two boxtask blocks.

In general, I think you should familiarize yourself with both Inquisit's syntax and programming model as well as the specific script you are working with before making any further changes.
(1) Read the Programmer's Manual. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf
(2) Work through the script's code systematically until you fully understand how it functions. Add comments to the code so you remember things later.
In this context, you may want to revisit the previous threads from two years ago ( https://forums.millisecond.com/Topic33633.aspx and https://forums.millisecond.com/Topic33710.aspx ).
(3) Use the language reference. https://www.millisecond.com/support/docs/current/html/language/languagereference.htm

Hi Dave, the branching worked great and I have been using the documentation you provided to edit the likert trial itself and then attempt to log/output the answers.

Currently using monkey runs it outputs (1,1,1,1,1,1,1,1,1,1,1,1,1) when it should be outputting random selections between 1 and 4.

Do you think this is an error with how I have set up the monkey responses or with how I record/log the responses?


<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
/ monkeyresponse = ("1","2","3","4")
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

<summary data>
values.likert_list

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

That isn't the response. That is the item number of the item presented by <text myscenario>, and since there is only one item, it's always 1.

I edited my likert trial further and am trying the following

values.likert_list = concat(concat(values.likert_list,values.mylikert.response),",");

however, this output is null, have Is there anything in the trial set up that is off? I run <block myblock> using a branch in the 9 and 64 box trials

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (10%)
/ monkeyresponse = ("1","2","3","4")
/ numpoints = 4
/ buttonvalues = [1="1"; 2="1";3="3";4="4"]
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident", "2 = quite confident", "3 = not very confident", "4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>

There is no such thing as

values.mylikert.response

Where do you even get this idea?

The <likert> isn't a <values> entry. It's a <likert>.

It's likert.mylikert.response, exactly as detailed in the documentation.

https://www.millisecond.com/support/docs/current/html/language/elements/likert.htm



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/29/2024
oconnordavid15 - 2/29/2024
Dave - 2/27/2024
oconnordavid15 - 2/27/2024
Dave - 2/22/2024
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.

Hi Dave, thanks for the advice I just coded the likert trial code here:

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 5000=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>


I was wondering, is there a way I can add this likert question after each of the 22 trials?

Would I do this by adding this code into boxtask_pressure9 and boxtask_pressure64 trials?

You can just /branch to the block running the likert trial from each of the two boxtask blocks.

In general, I think you should familiarize yourself with both Inquisit's syntax and programming model as well as the specific script you are working with before making any further changes.
(1) Read the Programmer's Manual. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf
(2) Work through the script's code systematically until you fully understand how it functions. Add comments to the code so you remember things later.
In this context, you may want to revisit the previous threads from two years ago ( https://forums.millisecond.com/Topic33633.aspx and https://forums.millisecond.com/Topic33710.aspx ).
(3) Use the language reference. https://www.millisecond.com/support/docs/current/html/language/languagereference.htm

Hi Dave, the branching worked great and I have been using the documentation you provided to edit the likert trial itself and then attempt to log/output the answers.

Currently using monkey runs it outputs (1,1,1,1,1,1,1,1,1,1,1,1,1) when it should be outputting random selections between 1 and 4.

Do you think this is an error with how I have set up the monkey responses or with how I record/log the responses?


<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
/ monkeyresponse = ("1","2","3","4")
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

<summary data>
values.likert_list

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

That isn't the response. That is the item number of the item presented by <text myscenario>, and since there is only one item, it's always 1.

I edited my likert trial further and am trying the following

values.likert_list = concat(concat(values.likert_list,values.mylikert.response),",");

however, this output is null, have Is there anything in the trial set up that is off? I run <block myblock> using a branch in the 9 and 64 box trials

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (10%)
/ monkeyresponse = ("1","2","3","4")
/ numpoints = 4
/ buttonvalues = [1="1"; 2="1";3="3";4="4"]
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident", "2 = quite confident", "3 = not very confident", "4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>
Attachments
Trial Draft 2.29 part C start.iqx (25 views, 162.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: 99K
oconnordavid15 - 2/29/2024
Dave - 2/27/2024
oconnordavid15 - 2/27/2024
Dave - 2/22/2024
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.

Hi Dave, thanks for the advice I just coded the likert trial code here:

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 5000=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>


I was wondering, is there a way I can add this likert question after each of the 22 trials?

Would I do this by adding this code into boxtask_pressure9 and boxtask_pressure64 trials?

You can just /branch to the block running the likert trial from each of the two boxtask blocks.

In general, I think you should familiarize yourself with both Inquisit's syntax and programming model as well as the specific script you are working with before making any further changes.
(1) Read the Programmer's Manual. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf
(2) Work through the script's code systematically until you fully understand how it functions. Add comments to the code so you remember things later.
In this context, you may want to revisit the previous threads from two years ago ( https://forums.millisecond.com/Topic33633.aspx and https://forums.millisecond.com/Topic33710.aspx ).
(3) Use the language reference. https://www.millisecond.com/support/docs/current/html/language/languagereference.htm

Hi Dave, the branching worked great and I have been using the documentation you provided to edit the likert trial itself and then attempt to log/output the answers.

Currently using monkey runs it outputs (1,1,1,1,1,1,1,1,1,1,1,1,1) when it should be outputting random selections between 1 and 4.

Do you think this is an error with how I have set up the monkey responses or with how I record/log the responses?


<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
/ monkeyresponse = ("1","2","3","4")
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

<summary data>
values.likert_list

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

That isn't the response. That is the item number of the item presented by <text myscenario>, and since there is only one item, it's always 1.

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/27/2024
oconnordavid15 - 2/27/2024
Dave - 2/22/2024
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.

Hi Dave, thanks for the advice I just coded the likert trial code here:

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 5000=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>


I was wondering, is there a way I can add this likert question after each of the 22 trials?

Would I do this by adding this code into boxtask_pressure9 and boxtask_pressure64 trials?

You can just /branch to the block running the likert trial from each of the two boxtask blocks.

In general, I think you should familiarize yourself with both Inquisit's syntax and programming model as well as the specific script you are working with before making any further changes.
(1) Read the Programmer's Manual. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf
(2) Work through the script's code systematically until you fully understand how it functions. Add comments to the code so you remember things later.
In this context, you may want to revisit the previous threads from two years ago ( https://forums.millisecond.com/Topic33633.aspx and https://forums.millisecond.com/Topic33710.aspx ).
(3) Use the language reference. https://www.millisecond.com/support/docs/current/html/language/languagereference.htm

Hi Dave, the branching worked great and I have been using the documentation you provided to edit the likert trial itself and then attempt to log/output the answers.

Currently using monkey runs it outputs (1,1,1,1,1,1,1,1,1,1,1,1,1) when it should be outputting random selections between 1 and 4.

Do you think this is an error with how I have set up the monkey responses or with how I record/log the responses?


<likert mylikert>
/ stimulustimes = [0=myscenario; 0=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
/ monkeyresponse = ("1","2","3","4")
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>

values.likert_list = concat(concat(values.likert_list,text.myscenario.currentindex),",");

<summary data>
values.likert_list
Attachments
Trial Draft 2.28 part C start.iqx (20 views, 162.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: 99K
oconnordavid15 - 2/27/2024
Dave - 2/22/2024
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.

Hi Dave, thanks for the advice I just coded the likert trial code here:

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 5000=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>


I was wondering, is there a way I can add this likert question after each of the 22 trials?

Would I do this by adding this code into boxtask_pressure9 and boxtask_pressure64 trials?

You can just /branch to the block running the likert trial from each of the two boxtask blocks.

In general, I think you should familiarize yourself with both Inquisit's syntax and programming model as well as the specific script you are working with before making any further changes.
(1) Read the Programmer's Manual. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf
(2) Work through the script's code systematically until you fully understand how it functions. Add comments to the code so you remember things later.
In this context, you may want to revisit the previous threads from two years ago ( https://forums.millisecond.com/Topic33633.aspx and https://forums.millisecond.com/Topic33710.aspx ).
(3) Use the language reference. https://www.millisecond.com/support/docs/current/html/language/languagereference.htm

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/22/2024
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.

Hi Dave, thanks for the advice I just coded the likert trial code here:

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

<likert mylikert>
/ stimulustimes = [0=myscenario; 5000=myquestion]
/ position = (50%, 80%)
/ anchorwidth = (5%)
</likert>

<text myscenario>
/ items = ("How confident are you in your color decision?")
/ position = (50%, 20%)
/ select = noreplace
</text>

<text myquestion>
/ items = ("1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed")
/ position = (50%, 70%)
/ select = text.myscenario.currentindex
</text>


I was wondering, is there a way I can add this likert question after each of the 22 trials?

Would I do this by adding this code into boxtask_pressure9 and boxtask_pressure64 trials?

Attachments
Trial Draft 2.27 part C start.iqx (23 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: 99K
oconnordavid15 - 2/22/2024
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




No. A <page> is for instructions only, before or after any trials have been run.

You need a <likert> trial and need to run it as the final trial in each of the boxtask blocks.
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>.



Hi Dave, that worked great, I'm seeing if I can add a page between trials that says "How confident are you in your color decision?" and enable participants to answer on a 4-point Likert scale (1 = highly confident, 2 =quite confident, 3 = not very confident, 4 = guessed), after which the trial will be terminated and the next trial started.

Would I do that by adding a new page  in <expt experiment>?

Something like this?

<page LikertScaleResponse>
^^ How confident are you in your color decision?
[button logic]
</page>


"<expt experiment>
/ blocks = [1=boxtask_pressure9; 2=boxtask_pressure64; 3=practice_trials; 4-23=noreplace(boxtask_pressure9,boxtask_pressure64)] // runs two practice trials, followed by instructions, followed by 10 9-box trials followed by 10 two 64-box trials
/ preinstructions = (Reminder_Pressure)"




Attachments
Trial Draft 2.21 part C start.iqx (28 views, 160.00 KB)
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