PennController for IBEX › Forums › Support › Choosing subet of items to present
- This topic has 55 replies, 6 voices, and was last updated 3 years, 8 months ago by Jeremy.
-
AuthorPosts
-
April 30, 2021 at 9:13 am #6913apspjParticipant
Hi Jeremy,
About the output of results in Dashed Sentence, I just wanted to clarify if I understood it correctly. The column event time corresponds to the start/end of the sentence, that is, the End/ event time – start/event time gives me the total amount of time that the participant took to read the whole sentence. Is that correct? And if I want to check the reading time for each word I need to check the column “reading time”, right?
Thank you!
Ana.
April 30, 2021 at 9:52 am #6914JeremyKeymasterHi Ana,
I’m sorry, I seem to have missed your previous post. By default, group assignment in (PC)Ibex experiments relies on an internal counter, which is increased whenever a submission is complete. Two people starting your experiment before anyone has completed it will be assigned the same group. You can change that behavior by using
SetCounter
, for example.Regarding how to read the results lines, here’s an example:
1619789055,744afe76cfc47b2a84daec2adc3d2d3b,PennController,0,0,unlabeled,NULL,PennController,0,_Trial_,Start,1619789053581,NULL 1619789055,744afe76cfc47b2a84daec2adc3d2d3b,PennController,0,0,unlabeled,NULL,Button,Start reading,Click,Click,1619789054361,NULL 1619789055,744afe76cfc47b2a84daec2adc3d2d3b,PennController,0,0,unlabeled,NULL,Controller-DashedSentence,DashedSentence,1,hello,1619789055108,230,false,hello world,Any addtional parameters were appended as additional columns 1619789055,744afe76cfc47b2a84daec2adc3d2d3b,PennController,0,0,unlabeled,NULL,Controller-DashedSentence,DashedSentence,2,world,1619789055108,237,false,hello world,Any addtional parameters were appended as additional columns 1619789055,744afe76cfc47b2a84daec2adc3d2d3b,PennController,0,0,unlabeled,NULL,Button,Finish,Click,Click,1619789055629,NULL 1619789055,744afe76cfc47b2a84daec2adc3d2d3b,PennController,0,0,unlabeled,NULL,PennController,0,_Trial_,End,1619789055635,NULL
The very beginning of the trial happened at timestamp
1619789053581
, then I clicked the “Start reading” button at timestamp1619789054361
(780ms later). I finished reading the DahsedSentence controller at timestamp1619789055108
(747ms after I clicked the button) and finally clicked the “Finish” button at timestamp1619789055629
. The trial ended at timestamp1619789055635
(it took 4ms for the engine to wrap things up).Now, I spent 230ms reading the word “hello” and 237ms reading the word “world,” so I could calculate their display timestamps by subtracting those numbers to the DashedSentence controller’s timestamp, which would give
1619789055108-237=1619789054871
for “world” and1619789054871-230=1619789054632
for “hello”Jeremy
May 9, 2021 at 8:35 pm #6937apspjParticipantHi, Jeremy.
I am sorry if the content of this post is duplicated but I cannot find the version that I wrote before.
Anyways, I have a mixed design between and within participants for a Dashed Sentence experiment. First, I created a table using the “group” column as a between participants design and used rshuffle but then I noticed the same experimental item was repeated in different conditions for the same participant (I have the same stimuli in 4 conditions). Then I decided to use the column “group” to arrange the items into conditions and it worked well for the problem I had before. But then another problem arised: I don’t know how to code for a between participant design when my column “group” is already “occupied”. I thought about using the function “pick” that you presented before in this topic for the within participant option and the group column for the between participant, but I wonder if both information would shock somehow.
Here is part of my table:
tipo_DP num_DP num_poss num_NouPred group item realizado pl sg sg A 1 ... realizado sg pl sg B 2 realizado pl pl sg C 3 realizado pl pl pl D 4 realizado pl sg sg A 1 realizado sg pl sg B 2 realizado pl pl sg C 3 realizado pl pl pl D 4 realizado pl sg sg A 1 realizado sg pl sg B 2 realizado pl pl sg C 3 realizado pl pl pl D 4 realizado pl sg sg A 1 realizado sg pl sg B 2 realizado pl pl sg C 3 realizado pl pl pl D 4 elidido pl sg sg E 1 elidido sg pl sg F 2 elidido pl pl sg G 3 elidido pl pl pl H 4 elidido pl sg sg E 1 elidido sg pl sg F 2 elidido pl pl sg G 3 elidido pl pl pl H 4 elidido pl sg sg E 1 elidido sg pl sg F 2 elidido pl pl sg G 3 elidido pl pl pl H 4 elidido pl sg sg E 1 elidido sg pl sg F 2 elidido pl pl sg G 3 elidido pl pl pl H 4
The between-participant factor is “tipo_DP” – One groups should see (A, B, C, D) and the other should see (E, F, G, H)
And here is a piece of my code:
Sequence(rshuffle("experimentais", "distratoras"), SendResults(), "fim") // Iniciar o experimento Template("exp_Poss.csv", exp => newTrial("experimentais", newController("DashedSentence", {s: exp.sentenca_exp}) .css("font-size", "20px") .css("font-family", "Calibri") .print() .log() .wait() .remove() , newText("pergunta", exp.pergunta) .css("font-size", "20px") .css("font-family", "Calibri") .center() .print() , newScale("respostas options",exp.RespA, exp.RespB, exp.RespC) .css("font-size", "20px") .css("font-family", "Calibri") .center() .labelsPosition( "right" ) .vertical() .print() .remove() , newSelector("respostas") .add(getScale("respostas options")) .shuffle() .wait() .log() , newButton("next", "PRÓXIMA FRASE") .css("font-size", "20px") .css("font-family", "Calibri") .center() .print() .wait() ) .log("tipo DP", exp.tipo_DP) .log("número D", exp.num_D) .log("número poss", exp.num_poss) .log("número nome ou pred", exp.num_NouPred) .log("item experimental", exp.sentenca_exp) )
Thank you in advance,
Ana.
May 10, 2021 at 12:03 pm #6940JeremyKeymasterHi Ana,
The very function of the group/list column is to control between-subject row selection. All rows that should be presented to the same participant, even those defining different conditions as a result of a within-subject design manipulation, should have the same value in their group/list cell.
The part of your table that you posted suggests another between-group manipulation that does not match the values in tipo_DP: all participants in group 1 (A) will only see pl-sg-sg rows, 2 (B) will only see sg-pl-sg, 3 (C) will only see pl-pl-sg and 4 (D) will only see pl-pl-pl. Because group starts over in the elidido rows, participants in group 1 will also see the E rows, 2 will also see F, and so on.
So there is no group of participants who will see all A-B-C-D rows, and no group of participants who will see all E-F-G-H rows. What you have is four groups of participants: group 1 will see all A-E rows, group 2 will see all B-F rows, group 3 will see all C-G rows and group H will see all D-H rows
If you are satisfied with the between-subject assignment of the crossing of num_DP-num_poss-num_NouPred as currently defined in your table, but want to additionally have tipo_DP as a between-subject factor, then it means that you effectively have 8 groups: your table currently defines four levels resulting from the (non-exhaustive) crossing of num_DP-num_poss-num_NouPred, and two levels for tipo_DP, which results in 4*2 = 8 groups. So starting from the first elidido row, you could have group jump to 5, 6, 7 and 8 instead of 1, 2, 3 and 4.
Does it all make sense?
Jeremy
May 10, 2021 at 1:07 pm #6944apspjParticipantHi, Jeremy!
I see what you mean. But Now I realized the table was not formatted properly. So I will post here what I did first with two big groups/lists (between-participants)
group tipo_DP num_DP num_poss num_N_Pred id_item 1 realizado pl sg sg DPrealA1 1 realizado sg pl sg DPrealB1 1 realizado pl pl sg DPrealC1 1 realizado pl pl pl DPrealD1 1 realizado pl sg sg DPrealA2 1 realizado sg pl sg DPrealB2 1 realizado pl pl sg DPrealC2 1 realizado pl pl pl DPrealD2 1 realizado pl sg sg DPrealA3 1 realizado sg pl sg DPrealB3 1 realizado pl pl sg DPrealC3 1 realizado pl pl pl DPrealD3 1 realizado pl sg sg DPrealA4 1 realizado sg pl sg DPrealB4 1 realizado pl pl sg DPrealC4 1 realizado pl pl pl DPrealD4 2 elidido pl sg sg DPeliA1 2 elidido sg pl sg DPeliB1 2 elidido pl pl sg DPeliC1 2 elidido pl pl pl DPeliD1 2 elidido pl sg sg DPeliA2 2 elidido sg pl sg DPeliB2 2 elidido pl pl sg DPeliC2 2 elidido pl pl pl DPeliD2 2 elidido pl sg sg DPeliA3 2 elidido sg pl sg DPeliB3 2 elidido pl pl sg DPeliC3 2 elidido pl pl pl DPeliD3 2 elidido pl sg sg DPeliA4 2 elidido sg pl sg DPeliB4 2 elidido pl pl sg DPeliC4 2 elidido pl pl pl DPeliD4
I coded the items like this just to check how it would come up. This worked fine: onde participant saw 4 conditions (A, B, C, D) of tipo_DP realizado and the next participant saw 4 conditions (A, B, C, D) of tipo_DP elidido. However, I noticed that using this table, the same participant, for instance in group 1, saw, let’s say DPrealA1 and DPrealB1, which is the same stimuli but manipulated according to number marking. I should keep like this, but then I don’t know how to avoid the fact that the same participant may see DPrealA1 and DPrealB1 for instance. Is the pick function appropriate for that?
Thanks,
Ana.
May 10, 2021 at 1:17 pm #6945JeremyKeymasterFrom a purely runlist perspective, I would still say that you have 8 lists, although I can see how it should be seen as a 2-level-factor between-subject + 4-level-factor (latin-square?) within-subject design manipulation
May I suggest a table like this (assuming a latin-square condition assigment)?
group tipo_DP num_DP num_poss num_N_Pred id_item 1 realizado pl sg sg DPrealA1 2 realizado sg pl sg DPrealB1 3 realizado pl pl sg DPrealC1 4 realizado pl pl pl DPrealD1 2 realizado pl sg sg DPrealA2 3 realizado sg pl sg DPrealB2 4 realizado pl pl sg DPrealC2 1 realizado pl pl pl DPrealD2 3 realizado pl sg sg DPrealA3 4 realizado sg pl sg DPrealB3 1 realizado pl pl sg DPrealC3 2 realizado pl pl pl DPrealD3 4 realizado pl sg sg DPrealA4 1 realizado sg pl sg DPrealB4 2 realizado pl pl sg DPrealC4 3 realizado pl pl pl DPrealD4 5 elidido pl sg sg DPeliA1 6 elidido sg pl sg DPeliB1 7 elidido pl pl sg DPeliC1 8 elidido pl pl pl DPeliD1 6 elidido pl sg sg DPeliA2 7 elidido sg pl sg DPeliB2 8 elidido pl pl sg DPeliC2 5 elidido pl pl pl DPeliD2 7 elidido pl sg sg DPeliA3 8 elidido sg pl sg DPeliB3 5 elidido pl pl sg DPeliC3 6 elidido pl pl pl DPeliD3 8 elidido pl sg sg DPeliA4 5 elidido sg pl sg DPeliB4 6 elidido pl pl sg DPeliC4 7 elidido pl pl pl DPeliD4
Jeremy
May 10, 2021 at 1:31 pm #6946apspjParticipantYes, Jeremy. That’s it. I see, so for a Latin Square design I have to see lists from a different perspective when coding.
That leads me to another question: in the results the Latin Square appear as Null. Do I have the option to control in the code whether a need a Latin-square arrangement?
Thanks,
Ana.
May 10, 2021 at 2:05 pm #6947JeremyKeymasterThe Latin Square column refers to a native-Ibex concept, where you can group items so that Ibex automatically generates latin-square lists. It’s a convenient grouping device for such designs, but it makes it much more confusing when you need to implement another grouping reasoning, which is why PennController uses a basic “label the rows you want to show together” idea, where a latin square manipulation simply means cycling over group labels
To use native Ibex’s latin sqaure device, you would do something like this:
var items = [ [["DPrealA1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealB1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealC1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealD1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealA2", "item-2"], "PennController", newTrial( /* ... */ ) ], [["DPrealB2", "item-2"], "PennController", newTrial( /* ... */ ) ], [["DPrealC2", "item-2"], "PennController", newTrial( /* ... */ ) ], [["DPrealD2", "item-2"], "PennController", newTrial( /* ... */ ) ], // etc. ];
This way Ibex would automatically pair the first item from “item-1” with the second item from “item-2”, the second item from “item-1” with the third item from “item-2”, and so on. You could actually easily generate such latin-square items from
Template
. Using the table from your previous message with only groups 1 and 2, you could do that:Template( "exp_Poss.csv" , exp => newTrial( // ... ) .label(["experimentais",exp.id_item.replace(/^.+?(\d+)$/,"$1")]) )
I’m using
exp.id_item.replace(/^.+?(\d+)$/,"$1")
to retrieve the last digit characters of the id_item columnThe problem with this method, if I’m not mistaken, is that it would pick different rows from your table every other run, which means that the latin square would always use an even counter value when running items from group 1, and an odd counter value when running items from group 2, effectively showing only half of your materials
Jeremy
May 14, 2021 at 3:15 pm #6960apspjParticipantHi Jeremy,
The table works really fine but now I am thinking about repeated measures…In the table you suggested, one participant sees only one item in each condition. If I wanted the participant to see more than one item in each condition, I would have to repeat the rows with the experimental items in my table and keep numbering the group column according to the suggestion you posted? Or is there another solution?
Thanks,
Ana.
May 14, 2021 at 3:17 pm #6961apspjParticipantActually, now I guess the pick function would be more appropriate, right?
Thanks,
Ana.
May 17, 2021 at 11:12 am #6968JeremyKeymasterHi Ana,
I’m not sure what you have in mind about the
pick
function but I doubt it would be very helpful. Any group manipulation is most straightforwardly handled using the Group/List column. Using thepick
function to assign different trials to different participants would require accessing the internal counter and using plain javascript conditional logic to execute differentpick
functions depending on the counter value. Which would eventually just reproduce the Group/List behavior. You usepick
to select the first N trials from a set, for examplepick(randomize("experiment"), 5)
will pick the first five trials from the randomized set of all trials labeled “experiment” that were generated by your scriptIf you want your participants to see repetitions of the same condition, I’d say it’s something you need to consider ahead of the actual implementation of your experiment: say you have a factor with 2 levels, you want a latin-square design, and you want each participant to see 2 repetitions of each condition. If you don’t want a participant to see the same item multiple times in two different conditions within the same experiment, you will need to have at least 4 different items: your participants will see the first 2 items in a different condition each, and same thing for the last 2 items, making for a total of 2 items per condition. Which means you will need to define
4 items*2 conditions
= 8 item-variants. With some designs you can define derive the two conditions from an algorithm, so if equipped with such an algorithm, the minimal amount of information you would ultimately need to hard-code would be the two main items. But most of the time you need to manually define the specifics of each condition for each main item. For example, items 1 and 2 might consist of two completely different sentences, and the two conditions might vary names and pronouns: unless those name/pronoun variations are completely deterministic, you still need to list the 8 variants. Then, just use a Group/List column to make sure you have a latin-square design with repetition. Here’s an example:Item,Name,Pronoun,Sentence,Group 1,Philip,himself,Philip thinks about himself a lot,A 1,Ana,herself,Ana thinks about herself a lot,B 2,Gregory,himself,Gregory rarely talks about himself,B 2,Susan,herself,Susan rarely talks about herself,A 3,Peter,himself,Peter gives himself too much credit,A 3,Melody,herself,Melody gives herself too much credit,B 4,Harry,himself,Harry introduces himself as an entrepreneur,B 4,Shelly,herself,Shelly introduces herself as an entrepreneur,A
Here I need to list all eight proper names to define the 8 variants resulting from crossing the two conditions with the four items. Each sentence is different, so the 8 variants could not be generated from a table with fewer rows. Each participants will see two repetitions of each condition: for example, participants in group A will see items 1 and 3 in the masculine-grammatical-gender condition, and items 2 and 4 in the feminine-grammatical-gender condition
I hope my explanations were clear enough. Let me know if you have questions
Jeremy
-
AuthorPosts
- You must be logged in to reply to this topic.