conditions in self-paced reading experiment

PennController for IBEX Forums Support conditions in self-paced reading experiment

This topic contains 30 replies, has 2 voices, and was last updated by Avatar iasmaa 1 week, 6 days ago.

Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #4948
    Avatar
    iasmaa
    Participant

    Hi,

    I have 5 conditions of each item of my SPR experiment, and I need each condition to appear one time for each participant.
    How can I do that?

    #4949
    Jeremy
    Jeremy
    Keymaster

    Hi,

    PennController provides a Template command that can generate trials from a CSV table, and CSV tables can optionally contain a Group (alternatively called List) column that further distinguishes subsets of rows, so that each time the experiment is run only rows from one subset are used.

    You can find an example and discussion of it on this page of the documentation tutorial, which illustrates 4 items each associated with two conditions (Ending: -s vs Ending: No-s) but presented in only one condition to each participation (latin-square design). Take a look at the Table section of the page more particularly.

    Let me know if you have more questions

    Jeremy

    #4955
    Avatar
    iasmaa
    Participant

    Thank you for replaying.

    Is it something like the following:

    Group Sentence Type of article
    A As you probably know… The tulip is very popular in the Netherlands. definite Singular
    B As you probably know… tulips are very popular in the Netherlands. bare plural
    C As you probably know… tulip is very popular in the Netherlands bare singular
    D As you probably know… A tulip is very popular in the Netherlands indefinite singular
    E As you probably know… The tulips are very popular in the Netherlands. definite plural
    A As we all know…vets deal with sick animals. bare plural
    B As we all know… The vet deals with sick animals definite Singular
    C As we all know… A vet deals with sick animals. indefinite singular
    D As we all know… The vets deal with sick animals. definite plural
    E As we all know… Vet deals with sick animals. bare singular

    I did that by using excel spreadsheet. I also have a context for each of these test sentences, and different comprehention and multiple choice questions. How can that work?

    #4957
    Jeremy
    Jeremy
    Keymaster

    Hi,

    Yes, with the table you describe, participants in the A group would see two items: the first one in the definite Singular condition, the second one in the bare plural condition. Participants in the B group would see the same two items, but now the first one would be bare plural, and the second one definite Singular. The same logic extends to groups C, D and E.

    Is that what you want?

    Your table should also include columns for your other variable contents, so you probably want to add a Context column, a Question column and as many columns as there are different answer choices to that question on each trial (something like Answer1, Answer2, …)

    Jeremy

    #4958
    Avatar
    iasmaa
    Participant

    Hi,

    I want each participant to experience all five conditions.. those conditions also have contexts and questions. Talking about the example above, the tulip sentence has a different context and questions than the vet.

    I have 20 items and each of those 20 has 5 conditions.

    #4959
    Jeremy
    Jeremy
    Keymaster

    If you have 20 items and 5 conditions, with the latin-square design that you illustrated in your table above, each of your participants would experience 4 repetitions of each condition (20 / 5 = 4 items per condition).

    For the different context and question sentences, simply add columns to your table

    Jeremy

    #4960
    Avatar
    iasmaa
    Participant

    What about if I want some items to appear to all participants without any changes in each trial (the fillers)

    #4961
    Jeremy
    Jeremy
    Keymaster

    Then your best option is probably to create another table in parallel for the fillers specifically, in which you don’t need to have a Group column at all (this way you can have only one row per filler item). When you have multiple tables in your project, just make sure to specify which one you want to use in the respective Template commands.

    #4962
    Avatar
    iasmaa
    Participant

    Thank you so much for your help.

    #4985
    Avatar
    iasmaa
    Participant

    Hi again,

    Sorry but I have a problem in setting up multi-trials experiment.
    I did the coding below and could not run the experiment.

    Template(row =>
    newTrial(
    newText(row.sentence)
    .print()

    ,
    newText(“DashedSentence”, row.DS)
    .print()
    ,
    newText((newScale, “correct”, 2 , row.CQ)
    .settings.keys()
    .settings.before(newText(“left”, “Yes”))
    .settings.after(newText(“right”, “No”))
    .print()

    ,
    newText((newScale(“correct”, 5, row.rating))
    .settings.keys()
    .settings.before(newText(“left”, “completely uncorrect”))
    .settings.after(newText(“right”, “completely correct”))
    .print()
    )
    )))

    #4987
    Jeremy
    Jeremy
    Keymaster

    Hi,

    There are a few things that cause your script to crash:

    • Elements should not be created by nesting them, ie. this is not valid syntax: newText((newScale. Either you create a Text element (if you just want to show a sentence or a paragraph on the screen) or you create a Scale element (if you want to provide participants with one). If you want to show both elements on the same line, one before the other, that’s what the before and after commands are for (you can use new* or get* commands inside the parentheses of non-new/get* commands).
    • All new* commands follow the same syntactic rules, in particular, they all require to be immediately followed by a pair of parentheses in which you (optionally) pass parameters. The first occurrence of newScale in your script comes with no such pair of parentheses, but the second occurrence does.
    • Besides a first optional name parameter, the parameter(s) of newScale can have two possible formats (as described on the documentation): either you use a single number that specifies the number of points on your scale, or you give a series of strings (separated by commas) that correspond to the labels of your scale’s buttons. So either something like newScale("yesno", "Yes", "No") or something like newScale("correctness", 5).
    • The script will execute the lines in newTrial from the top down, and will only halt on wait commands. Since your script has no wait command, it will execute all the lines in an instant and immediately reach the closing parenthesis of newTrial, effectively ending your trial milliseconds after it started. You want to insert a wait command somewhere.

    I am not totally sure what exactly you want your script to do, but below is a working variant of it. Note that I took the liberty to get rid of the .settings prefixes that became deprecated with PennController 1.7, and that the Text element named DashedSentence is just that: a Text element, so the content of row.DS will be printed at once. If you want to use the native-Ibex DashedSentence controller, you can use newController("DashedSentence", {s: row.DS}).print().wait() (you can take a look at the Controller element documentation page and this topic in the FAQ/Tips section).

    Template(row =>
        newTrial(
            newText(row.sentence)
                .print()
            ,
            newText("DashedSentence", row.DS)
                .print()
            ,
            newScale("yesnocorrect",  "Yes","No" )
                .labelsPosition("right")
                .keys()
                .before( newText("Is the sentence correct?") )
                .print()
            ,
            newText("How correct would you say it is?")
                .print()
            ,
            newScale("correct", 5)
                .keys()
                .before(newText("completely incorrect"))
                .after(newText("completely correct"))
                .print()
                .wait()
        )
    )

    If you haven’t done so yet (or if you want a refresher) I strongly recommend that you read the tutorial. You can also watch this video of a webinar on this tutorial that we recorded just yesterday.

    Best,
    Jeremy

    #5012
    Avatar
    iasmaa
    Participant

    Thank you for you help. everything is ok now.

    The only problem now is that I want some of my questions to appear in different pages.
    I have the context sentence
    the dashed sentence
    then the comprehension question
    the rating question and the multiple choice question

    My questions are now followed by each other in the same page with the context and dashed sentence, which may influence the answers of the participants. I tried .remove() but it was not successful.

    Also, each of my question has a different correct answer that I want it to be explicit in the analyses stage. so I know how many have chosen the right answer. How can I do that? you said something about answer 1 answer2.. etc is that where the “correct” answer should be? and that will not make it be explicit in the experiment but in the results?

    Another question about the groups. I have two groups that going to complete the experiment: Control and Instruction group. How can I separate the results of each group? to compare them later?

    Also, I want to make sure that the result will show the reaction time of the dashed sentence. So PCibex will do that right?

    Sorry if I am asking so many questions.

    Thank you.

    #5017
    Jeremy
    Jeremy
    Keymaster

    Hi,

    Did you make sure you used .remove on the right element? Here is an example:

    newText( "context" , "This is the context sentence").print()
    ,
    newText("space", "Press space to continue").italic().print()
    ,
    newKey(" ").wait()
    ,
    getText("context").remove(),
    getText("space").remove()
    ,
    newController("DashedSentence", {s: "This is the dashed sentence"})
      .print()
      .log()
      .wait()

    If you don’t need to check whether the participant’s answer is correct at runtime (ie. you don’t need to give positive or negative feedback, for example) then simply indicate which answer is correct in a column of your table and reference it in a .log command on the closing parenthesis of newTrial. Same thing about group. You can find an illustration on page 8 of the tutorial (“Trial templates & tables”). Here is a short example:

    AddTable("myTable", `question,answer1,answer2,correct,group
    What is the result of 2+3*4?,14,20,answer1,tricky
    Who is the only other child of my sibling's parents?,my cousin,me,answer2,tricky
    What is the result of 2+3+4?,9,24,answer1,control
    Who is the only child of my parents?,my cousin,me,answer2,control`)
    
    Template( "myTable" , row =>
      newTrial(
        newText( row.question ).print()
        ,
        newText( "answer1" , row.answer1 ).print(),
        newText( "answer2" , row.answer2 ).print()
        ,
        newSelector("answer").add( getText("answer1") , getText("answer2") ).log().wait()
      )
      .log( "correct" , row.correct )
      .log( "group" , row.group )
    )

    And yes, the DashedSentence controller records reaction times, and PCIbex makes sure to always record everything that original Ibex controllers record, so you will be able to find reaction times as extra columns for your trial in your results file as long as you use .log on your Controller element. Make sure to always take a testrun yourself just before sending your experiment’s link to your participants, and check that the results file reports all you need for analyses.

    Jeremy

    • This reply was modified 3 months ago by Jeremy Jeremy.
    #5035
    Avatar
    iasmaa
    Participant

    Hi,

    Thank you for your answer.

    remove command works on all of my items (dashed sentence, and questions) except for the context sentence! it works also in the fillers because I added them manually not in template. Below is what I did:

    Template(row =>
        newTrial("trials",
            newText(row.S)
               .print()
               .wait()
                .remove()
                   ,
                 newKey(" ")
                 .print()
               .wait()
                 
                
            ,
            newController("DashedSentence", {s: row.DS})
            .print()
            .wait()
            .remove()
           
            
            , 
            newKey(" ")
            .print()
            .wait()
           
            ,
    
           
            newText("Answer the following quesion based on the dashed sentence you have just read")
            .print()
            
            ,
            newScale("yesnocorrect",  "Yes","No" )
                .labelsPosition("right")
                .keys()
                .before( newText(row.CQ) )
                .print()
                 .wait()
            .remove()
                 
            ,
           newText("Was the dashed sentence grammaticly correct?")
                .print()
                
        
            ,
            newScale("correct", 5)
                .keys()
                .before(newText("completely incorrect"))
                .after(newText("completely correct"))
                .print()
                .wait()
                .remove()
                ,
            newText("would you replace the article used in the dashed sentence with another one?")
            .print()
            ,
            newScale("correct", "The", "A", "An", "No_Article")
            .labelsPosition("top")
            .before(newText(row.BMC))
            .after(newText(row.AMC))
            .print()
            .wait()
            
        ) 

    Regarding the correct answer. Yes I do not want it to show at the runtime, but in the results for analysis purposes.
    I have the same experiment for both instruction and control group, so the correct answer is the same for both groups. if you mean that I need to add correct answer column, then what answer 1, answer2?

    #5038
    Jeremy
    Jeremy
    Keymaster

    Hi,

    I’m not sure which Text element represents your context sentence in the script that you included in your message, but here are a few notes:

    • The wait command has no effect on Text elements, it doesn’t “mean” anything (what would be the relevant event to wait for?)—so you can get rid of the .wait() command on your first Text element
    • Remember that the script reads your commands and executes them line by line, from the top down, which means that it will start by printing your first Text element (the one that contains row.S) then “wait” (= no effect) and immediately remove that element. So you won’t have time to see it being displayed on the page. You probably want to move that .remove() command somewhere else, or get rid of it entirely if you want to keep row.S displayed on the screen for the duration of the whole trial
    • Much like the wait commands on Text elements, the print command has no effect on Key elements, again it doesn’t “mean” anything (what would there be to display?)—so there too, you can get rid of the .print() commands on your Key elements
    • Your last two Scale elements are both named correct, which will be confusing once you .log them because they will be hard to distinguish in your results file, you should consider renaming the second one “article” or something

    The script I showed in my previous message was just an example. It shows ‘tricky’ questions along with two possible answers, for example the first row shows the question “What is the result of 2+3*4?” and prints two possible answers: answer1 = “14” and answer2 = “20”—we know that the result of 2+3*4 is 14 (because multiplication takes precedence) so in the table we added a column named “correct” where the value for the first row is “answer1,” the correct answer. If you look at the two .log commands attached to the closing parenthesis of the newTrial command, the first one precisely references row.correct, which makes sure that the lines in the results file will also report which of answer1 or answer2 was the correct choice for every trial generated in that Template command from the table named “myTable.”

    Jeremy

Viewing 15 posts - 1 through 15 (of 31 total)

You must be logged in to reply to this topic.