Changing number of trials (ST-IAT)

35 views
Skip to first unread message

Yuri Dallabrida

unread,
Aug 17, 2021, 6:20:13 PM8/17/21
to Minno.js

Hello!

I am trying (with no success) to change the number of trials per block for a Single Target IAT on Qualtrics.

Here's what I've tried so far:

1. I've created my own script to insert in this part of the Qualtrics JS: 

// This function gets activated only after MinnoJS is loaded function onLoad() { // Run your study (just set the correct URL) minnoJS(canvas, "https://cdn.jsdelivr.net/gh/baranan/minno-tasks@0.*/stiat/qualtrics/exampleSTIAT.js");

 

2. I've changed the link (below) that is referred in the first line of that same script to make the desired changes.

define(['pipAPI', 'https://cdn.jsdelivr.net/gh/baranan/minno-tasks@0.*/stiat/qualtrics/qstiat6.js'], function(APIConstructor, stiatExtension){

 

3. In this new script, I’ve changed the number of trials for each category/attribute in the bold parts:

trialsByBlock :

            [//Each object in this array defines a block

                        {

                                    instHTML : '', //Empty means we will create the inst from the instTemplate variable further below.

                                    block : 1, //The block variable is not used later, but could help the user.

                                    //In each block, we can include a number of mini-blocks, to reduce repetition of same group/response.

                                    miniBlocks : 1, //Set to 1 if don't need mini blocks. 0 will break the task.

                                    singleAttTrials : 10, //Number of trials of the attribute that does not share key with the category (in a mini block).

                                    sharedAttTrials : 10, //Number of trials of the attribute that shares key with the category (in a mini block).

                                    categoryTrials : 0 // Number of trials of the category (in a mini-block). If 0, the label does not appear.

                                    //Note: if no category trials, then attribute1, the one on the left, is considered the single attribute.

                        },

                        {

                                    instHTML : '',

                                    block : 2,

                                    miniBlocks : 2,

                                    singleAttTrials : 10,

                                    sharedAttTrials : 7,

                                    categoryTrials : 7

                        },


I'm not sure what exactly I'm doing wrong, but, although I've made these changes, the ST-IAT still runs with the default number of trials. Can you guys help me?


Thanks,

Yuri

Mayan Navon

unread,
Aug 18, 2021, 4:43:37 AM8/18/21
to Yuri Dallabrida, Minno.js
Hi Yuri,

Thanks for providing the details of what you did.

Regarding step 2, what you should do, is to edit our example script (the one with the link at its start), and then tell Qualtrics where this edited script is located (a link to some repository, see example below). If I understand correctly, you tried to edit the full script. Am I right?
image.png
Your edit to the number of trials should be inserted right after the definition of attribute2 in the example script, like this (see the changes I made to the trial numbers):

        attribute2 :
            {
            name : 'Pleasant', //Attribute label
            title : {
                media : {word : 'Positive'}, //Name of the category presented in the task.
                css : {color:'#31b404','font-size':'2em'}, //Style of the category title.
                height : 7 //Used to position the "Or" in the combined block.
            },
            media : [ //Stimuli
                {word: 'Paradise'},
                {word: 'Pleasure'},
                {word: 'Cheer'},
                {word: 'Wonderful'},
                {word: 'Splendid'},
                {word: 'Love'}
            ],
            //Can change color and size of the targets here.
            css : {color:'#31b404','font-size':'3em'}
            },

trialsByBlock :
            [//Each object in this array defines a block

                {
                    instHTML : '', //Empty means we will create the inst from the instTemplate variable further below.
                    block : 1, //The block variable is not used later, but could help the user.
                    //In each block, we can include a number of mini-blocks, to reduce repetition of same group/response.
                    miniBlocks : 1, //Set to 1 if don't need mini blocks. 0 will break the task.
                    singleAttTrials : 10, //Number of trials of the attribute that does not share key with the category (in a mini block).
                    sharedAttTrials : 10, //Number of trials of the attribute that shares key with the category (in a mini block).
                    categoryTrials : 0 // Number of trials of the category (in a mini-block). If 0, the label does not appear.
                    //Note: if no category trials, then attribute1, the one on the left, is considered the single attribute.
                },
                {
                    instHTML : '',
                    block : 2
,
                    miniBlocks : 1,
                    singleAttTrials : 1,
                    sharedAttTrials : 1,
                    categoryTrials : 1
                },
                {
                    instHTML : '',
                    block : 3,
                    miniBlocks : 1,
                    singleAttTrials : 1,
                    sharedAttTrials : 1,
                    categoryTrials : 1
                },
                {
                    instHTML : '',
                    block : 4,
                    miniBlocks : 1,
                    singleAttTrials : 1,
                    sharedAttTrials : 1,
                    categoryTrials : 1
                },
                {
                    instHTML : '',
                    block : 5,
                    miniBlocks : 1,
                    singleAttTrials : 1,
                    sharedAttTrials : 1,
                    categoryTrials : 1
                }
            ],

  base_url : {//Where are your images at?
    image : 'https://baranan.github.io/minno-tasks/images/'
  }}
  );
  });
I hope that helps.
Let us know if you have further questions.

Best,
Mayan

--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minnojs/1630beaf-d685-44a4-994a-97e798b23846n%40googlegroups.com.


--
Mayan

Yuri Dallabrida

unread,
Aug 18, 2021, 2:00:39 PM8/18/21
to Minno.js
Mayan,

thank you so much!

I had edited the script and told Qualtrics where it was located. I just didn't know I could add this other piece to that same script. I think that is where I started to get things wrong. But now it is all working perfectly.

Once more, thank you :)
Yuri
Reply all
Reply to author
Forward
0 new messages