PennController for IBEX › Forums › Support › Backtracking Latin square/finding the right seed
Tagged: counterbalancing, Latin square, logging
- This topic has 6 replies, 3 voices, and was last updated 1 year, 6 months ago by
KateK.
-
AuthorPosts
-
February 21, 2023 at 4:21 pm #9946
KateK
ParticipantHi all,
I plan to run my self-paced reading experiment with a Latin square design and constraint randomization, but will need to exclude Prolific participants based on exclusion criteria. However, I am concerned about having an equal amount of observations per cell and making sure that make-up participants are run on the same ‘seed’/order as the participant that is excluded.
Is there a way to do this/track which ordering a participant ends up with? Where does the ‘seed’ happen?
You can see my experiment here: https://farm.pcibex.net/r/pREVDl/
Thank you so much!
KateFebruary 22, 2023 at 9:42 am #9950Jeremy
KeymasterHi Kate,
Are you trying to balance out the number of participants in the A through F groups from your CSV table? This section of the advanced tutorial touches on group assignment. There is no automatic way of ensuring you have a properly balanced distribution; the best solution is to run your first batches of participants, check the distribution, and run more participants in each group if needed, until you reach a distribution you are satisfied with
By the way, all the filler trials in your table are defined exclusively for group A. If you’d like to include them for all the groups, create another CSV table where you paste those filler lines, but take out the “group” column; you’ll also want to place the
newTrial
currently in yourTemplate
command inside a custom function that you can call from within bothTemplate("acdcd4.csv", myCustomTrialFunction)
andTemplate("fillers.csv", myCustomTrialFunction)
so you don’t have to write it twiceJeremy
February 22, 2023 at 12:49 pm #9952KateK
ParticipantJeremy,
Thank you as always for your help!
About the fillers – yes, I was having some confusion on how to make sure *all participants* saw *all the fillers* and that was the solution I came up with in the interim, which is… not a solution, haha!
I’m a bit confused about the fix, I hope it’s okay if I ask a few more questions –
1) How/where do I define this function?
2) After creating the custom function, how will I be able to maintain the constraint randomization scheme (which makes sure that no more than three of an item type are shown consecutively) + pick function that I incorporated (specified by storing the items in “critical” and then working from there)?I’m a little confused about using two templates within a custom trial – I’ve just never done it before.
I appreciate you!
February 23, 2023 at 1:06 pm #9954Jeremy
KeymasterHi Kate,
1) You could define the function at the top of your script, for example. It just needs to take a
row
parameter and return anewTrial
, e.g:myCustomTrialFunction = row => newTrial( "experiment"+row.catg , newController("DashedSentence", {s: row.acceptability}) // etc. ) .log("catg", row.catg")
2) The function is just a handy way to not write the same code twice. The same trials that are now created for group A will be created for all groups, with the same current labels. Because
Sequence
operates over labels, you don’t have to change anything to your current setupJeremy
February 28, 2023 at 11:38 am #9965staceyra
ParticipantHi, this is KateK posting from her fellow lab manager’s account – my personal account isn’t allowing me to reply or start new topics.
—
I followed your advice to create a separate .csv file containing filler items and removing the Group assignments from the fillers to facilitate a design where all participants see all fillers.
Then, I tried to implement the custom function in two different ways and failed – I’d really appreciate some help in figuring out where I went wrong!
I first tried defining the custom function at the top of the script like you suggested, at the top of the script, and then “called” the new function further down when I wanted to start generating experimental trials, which ended up looking like this:
Template("acdcdtargets.csv", myCustomTrialFunction .print() .log() .wait() .remove() ,
Unfortunately, this completely halts the experiment and does not allow the Template to generate trials. If I try to close the parenthesis, like this – (“acdcdtargets.csv”, myCustomTrialFunction) – it crashes the tab.
I also tried defining the custom function inside a template further down, within the trial. It makes sense why this doesn’t work, I guess, because it doesn’t refer to any .csv files – I don’t know how PCIbex would even be able to know where to pull information from to generate templates.
Template(myCustomTrialFunction = row => newTrial( "experiment"+row.catg, newController("DashedSentence", {s: row.acceptability})) .print() .log() .wait() .remove() ,
This also stops the experiment after the practice items.
Would you be able to help me figure out what I’m doing wrong so that I can ensure that all participants see all filler items?
February 28, 2023 at 2:44 pm #9967KateK
ParticipantUPDATE: Resolved!
-
AuthorPosts
- You must be logged in to reply to this topic.