Assigning participants to the same condition in a two-part study


Author
Message
Jill
Jill
Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)
Group: Forum Members
Posts: 5, Visits: 1

We have an online study in which participants have to do two separate parts. We want them to be randomly assigned to 1 of 6 conditions in the first part in the evening. The next morning, they have to do the second part of the study. We want them to be assigned to the same condition as in the first part, based on their participant number ('sona-id'). It works when we run it offline, but it doesn't work online with the java script. Does anyone know why? Thanks for your help!


Jill & fellow students


function GetSubjectNumber()
{
// This method prompts the subject for an id number and then prompts
    again to // confirm in order avoid mistyped numbers.

var intRegExp = /(^\d{5,5}$)/;
var promptMsg = "Vul hier je sona-id in";
var confirmMsg = "Herhaal ajb je sona-id.";
var invalidMsg = "Het id was incorrect. Vul ajb het juiste id in";
var matchMsg = "De id'skwamen niet overeen. Vul ajb opnieuw je id in";

var snum = window.prompt(promptMsg, "");

while ( snum != null && intRegExp.test(snum) == false )
{
// if the input was invalid, prompt again
    window.alert(invalidMsg);
    snum = window.prompt(promptMsg, "");
}

if ( snum == null )
{
    return null;
}

var sconfirm = window.prompt(confirmMsg, "");
while ( sconfirm != null && (sconfirm != snum || intRegExp.test(sconfirm) == false) )
{
    // if the input was invalid, prompt again
    if ( intRegExp.test(sconfirm) == false)
    {
        window.alert(invalidMsg);
    }
   
    // if the numbers do not match, alert the user and bail out so
        they can start over
    else if ( sconfirm != snum )
    {
        window.alert(matchMsg);
        return null;
    }
   
    sconfirm = window.prompt(confirmMsg, "");
}

return sconfirm;

}


------------------------------


STUDY PART ONE


------------------------------


Conscious self
<expt>
/subjects = (1 of 6)
/blocks = [1= start ; 2= consciousself]
</expt>


Conscious other
<expt>
/subjects = (2 of 6)
/blocks = [1= start ; 2= truus ; 3= consciousother]
</expt>



Unconscious self
<expt>
/subjects = (3 of 6)
/blocks = [1= start ; 2=nback ; 3= unconsciousself]
</expt>



Unconscious other
<expt>
/subjects = (4 of 6)
/blocks = [1= start ; 2 = truus ; 3=nback ; 4= unconsciousother]
</expt>

Sleep self
<expt>
/subjects = (5 of 6)
/blocks = [1= startsleepself]
</expt>


Sleep other
<expt>
/subjects = (6 of 6)
/blocks = [1= start ; 2= truussleepother]
</expt>


-----------------------------------------


STUDY PART TWO


-----------------------------------------



Conscious self


<expt>


/subjects = (1 of 6)


/blocks = [1= keuze; 2=us2; 3=open]


</expt>


Conscious other


<expt>


/subjects = (2 of 6)


/blocks = [1=keuze2 ; 2=truus; 3=us2; 4=open]


</expt>


Unconscious self


<expt>


/subjects = (3 of 6)


/blocks = [1=keuze; 2=us2; 3=open]


</expt>


Unconscious other


<expt>


/subjects = (4 of 6)


/blocks = [1= keuze2 ; 2 = truus; 3=us2; 4=open]


</expt>


Sleep self


<expt>


/subjects = (5 of 6)


/blocks = [1= keuze3; 2=us2; 3=open]


</expt>


Sleep other


<expt>


/subjects = (6 of 6)


/blocks = [1= keuze4; 2= truus; 3=us2; 4=open ]


</expt>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Can you post a link to the study's actual launch page? That would surely help in figuring out what's going on...


~Dave


Jill
Jill
Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)
Group: Forum Members
Posts: 5, Visits: 1
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Well, the first thing to note is that the GetSubjectNumber() function code used by these two launch pages doesn't match the one you posted. Both pages use the following:


function GetSubjectNumber()
{
   PromptMask = /(^\d{5,5}$)/;
   PromptMessage = "Wat is je SONA-id?";
PromptError = "Deze code was ongeldig";
if ( PromptResult == null )
{
Prompt();
}
return PromptResult;
}


However, this shouldn't prevent the condition assignment from working properly. Thus let me ask: What exactly is going wrong with condition assignment according to your observations?


~Dave


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

I've attached a simple test script which you can upload to your web account to test the condition assignment via your launch page(s). Like in your original task, there are six conditions. Subjects are assigned to conditions based on subject number. Upon running, the script returns the entered subject number and the assigned condition on screen.


Let me know what you find.


~Dave


Attachments
conditioncheck.exp (689 views, 4.00 KB)
Jill
Jill
Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)
Group: Forum Members
Posts: 5, Visits: 1

Thanks! We're going to try it out and let you know [:D]


Sanne
Sanne
Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Because of a lack of licenses we weren't able to check this out, so now we're trying to figure out some other way to make it work.


We were wondering if we could maybe do this by branching two different parts and/or by the use of the /ontrialend command. Is this a possibility? Our first block/trial is asking them about their id-code, can we then use the /ontrialend command to use this code for different conditions (as stated above, there are six different conditions)?


Hope this could be another possibility to solve this problem..


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Because of a lack of licenses we weren't able to check this out, so now we're trying to figure out some other way to make it work.


I don't quite get the problem. Obviously, you have at least two web licenses available. And since you're still figuring stuff out, you're obviously not collecting any real data with these two licenses. So why not take down the two scripts for your study for the time being and upload the test script I provided in their stead (but make sure to keep the original launch pages)? With the web registration wizard you can simply replace the *.exp files --  no need to reconfigure anything, no need to register a new script...



We were wondering if we could maybe do this by branching two different parts and/or by the use of the /ontrialend command. Is this a possibility? Our first block/trial is asking them about their id-code, can we then use the /ontrialend command to use this code for different conditions (as stated above, there are six different conditions)?


Hope this could be another possibility to solve this problem..



There are many alternative ways to do this. I've recently posted a few notes on how Inquisit uses the subject number to determine the appropriate experimental condition in this thread. The mod function, which is needed to do this, is included in Inquisit's general purpose set of functions (look it up in the functions reference). Thus you could use extensive '/ branch' logic to effectively assign participants to different experimental flows (i.e. conditions).


~Dave


Sanne
Sanne
Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)Partner Member (579 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Our supervisor is currently not at work and we are not authorized to change the online scripts ourselves.


Because of this problem we're having we are running far behind so we thought we could solve this problem in another way. Is it possible (and more importantly, how is it possible) to start the experiment with a question of which the answer is branched to a specific condition (expt)?


I've attached the specific exp file.


Thank you again for your help.


Attachments
us2[1].exp (661 views, 28.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Is it possible (and more importantly, how is it possible) to start the experiment with a question of which the answer is branched to a specific condition (expt)?


I thought I had already answered that. However, while branching to / between <expt> elements is somewhat possible, there are some oddities because of which I'd suggest you keep the branching logic at the <block> level. The general approach is:


(1) Collect the ID via a <textbox> or similar and store the response in a variable (look at the <values> element).


(2) Implement proper branching logic / condition assignment using the mod function. E.g.


<block getid>
[...]
/ branch = [if(mod(values.sonaid, 4)==1)block.condition1firstblock]
/ branch = [if(mod(values.sonaid, 4)==2)block.condition2firstblock]
/ branch = [if(mod(values.sonaid, 4)==3)block.condition3firstblock]
/ branch = [if(mod(values.sonaid, 4)==0)block.condition4firstblock]
</block>


However, it would be much better to first figure out what exactly the problem with the current setup is. So far you haven't given me (or anyone else) any clear-cut information on exactly what's happening.


Also, if you're not allowed to commit any actual changes to the web scripts, what's the point in re-arranging your tasks? You still won't be able to upload & test them until your advisor returns to work...


Best wishes from a fellow Inquisit user,


~Dave



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search