Two template types in one experiment?

PennController for IBEX Forums Support Two template types in one experiment?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4261
    DavidPotter
    Participant

    Hi Jeremy,

    I’m looking to set up an experiment that includes both forced choice trials and Likert scale trials. I’d like to be able to use the template functionality, but I’m guessing, based on how differently the two types of trials will need to be set up, that I’d need to use two different types of templates within the single experiment. Is this possible?

    Best,
    David

    #4262
    Jeremy
    Keymaster

    Hi David,

    Yes it’s definitely possible. Simply use two different CSV tables, and pass their name as the first parameter to your Template function. Example:

    PennController.AddTable( "table1" , `Column1,Column2
    Table1RowACol1,Table1RowACol2
    Table1RowBCol1,Table1RowBCol2`)
    
    PennController.AddTable( "table2" , `Column1,Column2
    Table2RowACol1,Table2RowACol2
    Table2RowBCol1,Table2RowBCol2`)
    
    PennController.Sequence( randomize("forced") , randomize("likert") ) 
    
    PennController.Template( "table1" ,
      row => PennController( "forced" ,
        newScale( "answer" , row.Column1 , row.Column2 )
            .settings.button()
            .settings.center()
            .print()
            .wait()
      )
    )
    
    PennController.Template( "table2" ,
      row => PennController( "likert" ,
        newScale( "score" , 5 )
            .settings.center()
            .settings.before( newText(row.Column1) ) 
            .settings.after( newText(row.Column2) )
            .print()
            .wait()
      )
    )

    This example uses AddTable but of course you can directly upload CSV files to your project and use their filenames

    Let me know if you have questions

    Jeremy

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.