Comprehension questions for some test items in the following?

PennController for IBEX Forums Support Comprehension questions for some test items in the following?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7396
    jay0845
    Participant

    I am trying to set up the test items in such a way that for only some of the 7-point Likert-scale judgment task test items participants are required to determine whether a follow-up comprehension sentence is true or false without looking at the test item. For now, I have the following code for the test items:

    Template("experiment-pg-norming.csv", row =>
        newTrial( "experiment-"+row.TYPE,
            newText("sentence", row.SENTENCE)
                .cssContainer({"margin-top":"2em", "margin-bottom":"2em"})
                .center()
                .print()
                ,
        // 7-point scale
            newScale(7)
                .before( newText("left", "<div class='fancy'>(very unnatural)</div>") )
                .after( newText("right", "<div class='fancy'>(very natural)</div>") )
                .labelsPosition("top")
                .keys()
                .log()
                .once()
                .color("LightCoral")
                .center()
                .print()
                .wait()
            ,
            // Wait briefly to display which option was selected
            newTimer("wait", 300)
                .start()
                .wait()
        )

    For example, after they judge the acceptability of the test item “The neighbors like cats more than they do dogs.”, I want them to see a sentence like “The neighbors hate cats.” and to determine whether it is a true or false statement on the basis of the test item. Of course, this is to prevent participants from choosing random acceptability ratings. Any ideas of how to do it?

    #7400
    Jeremy
    Keymaster

    Hi,

    You can include a column named FOLLOWUP in your file experiment-pg-norming.csv which you leave empty for the items where you don’t want a follow-up question, and which you fill with your follow-up question for the other items. Then you can do this:

    Template("experiment-pg-norming.csv", row =>
        newTrial( "experiment-"+row.TYPE,
            newText("sentence", row.SENTENCE)
                .cssContainer({"margin-top":"2em", "margin-bottom":"2em"})
                .center()
                .print()
            ,
            // 7-point scale
            newScale(7)
                .before( newText("left", "<div class='fancy'>(very unnatural)</div>") )
                .after( newText("right", "<div class='fancy'>(very natural)</div>") )
                .labelsPosition("top")
                .keys()
                .log()
                .once()
                .color("LightCoral")
                .center()
                .print()
                .wait()
            ,
            // Wait briefly to display which option was selected
            newTimer("wait", 300)
                .start()
                .wait()
            ,
            clear()
            ,
            ...(row.FOLLOWUP ? [
                newText("follow-up", row.FOLLOWUP)
                    .cssContainer({"margin-top":"2em", "margin-bottom":"2em"})
                    .center()
                    .print()
                ,
                newScale("answer-follow-up", "Yes", "No")
                    .button()
                    .print()
                    .wait()
            ] : [
                null
            ])
        )
    )

    Jeremy

    • This reply was modified 1 year, 3 months ago by Jeremy. Reason: added the missing ]
    #7403
    jay0845
    Participant

    Thanks a lot, Jeremy, for your help, but now I get the errors for the addition of your code. What does “…(row.FOLLOWUP ? [” line does? Also, there are two opening square brackets and only one closing square bracket. Any further help would be really appreciated.

    #7404
    Jeremy
    Keymaster

    Add the missing ] before :

    In javascript you can prefix ... to an array so that the array’s elements are direct arguments of the function rather than the array being an argument itself

    (Here it is prefixed to the opening parenthesis of the ternary operator because it returns an array whether the test succeeds of fails)

    Jeremy

    #7405
    jay0845
    Participant

    Fabulous! It works now, though I should figure out how to make some distance between the two choices “Yes” and “No” and center-align them.

    Thank you very much for your help!

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