PI Studies 3.0

piManager
piQuest
piPlayer 

Sample Study

JSON

  • Objects
  • Arrays
  • Advanced Example
{name:'Bob', job: 'Singer'} 
{wages:100, schedule:{Friday:'off', Saturday:'on call'}}

JSON Objects

[{name:'Bob', job: 'Singer'}, {name:'John', job: 'Dancer'}, 
 {name:'Suzy', job: 'Director'}  ]

JSON Arrays

{play: 'Inception the Musical' , 
cast:[{name:'Bob', job: 'Singer'}, {name:'John', job: 'Dancer'}, 
        {name:'Suzy', job: 'Director'}  ], 
        cost: {adult: 43, child: 22}}

Advanced Example

Inheritance

instructions:[{type:'message', buttonText:'Continue'}]  // the thing being inherited



consent : [{ inherit:'instructions', name:'consent', templateUrl: 'consent.jst'
		}]  //before inheriting


consent : [{ type:'message', buttonText:'Continue', name:'consent', templateUrl: 'consent.jst'
		}]  // after inheriting 

piManager

  • Add to Expt File
  • Definitions Section
  • Map Section

Expt File

<Study id="andy.pimanager" datagroup="research">
	<Definitions>
        <Task id="pimgr" file="mgr.js">/common/all/js/quest/0.0/dist/manager.jsp</Task>
        <Task id="dummy">consent.jst</Task>
	</Definitions>
	<Map>
		<Task id="pimgr"/>
		<Task id="dummy"/>
	</Map>
</Study>

Definitions Section

API.addTasksSet({
		instructions: 
			[{type:'message', buttonText:'Continue'}], 
		instiat : [{
			inherit:'instructions', name:'instiat', templateUrl: 'instiat.jst', 
                        title:'IAT Instructions', piTemplate:true, header:'Implicit Test'
		}], 
		iat : [{
			type: 'pip', name: 'iat', version: '0.3', scriptUrl: 'iat.js'
		}], 
	        stereotype : [{
		    type: 'quest', name: 'stereotype', scriptUrl: 'stereotype.js'
		}]
	});

Map Section

	API.addSequence([
		{inherit:'stereotype'},
		{inherit:'instiat'},
		{inherit:'iat'}
	]);

piPlayer

  • piManager Syntax
  • IAT Extension

piManager Syntax

raceiat : [{
	    type: 'pip', name: 'iat', version: '0.3', scriptUrl: 'raceiat.js'
	  }]

IAT Extension (1)

{
  category1 : {
                name : 'Black People', //Will appear in the data.
                title : {
                    media : {word : 'Black People'}, //Name of the category presented in the task.
                    css : {color:'#31b404','font-size':'2em'}, //Style of the category title.
                    height : 4 //Used to position the "Or" in the combined block.
                }, 
                stimulusMedia : [ //Stimuli content as PIP's media objects
                    {image: 'bf14_nc.jpg'},
                    {image: 'bf23_nc.jpg'},
                    {image: 'bm23_nc.jpg'},
                    {image: 'bm56_nc.jpg'}
                ]
            }

IAT Extension (2)

base_url : {//Where are your images at?
	    image : '/implicit/user/andy/sample/pimanager/images/'
           }

HTML Pages

  • piManager Syntax
  • Consent
  • Debrief

piManager Syntax

'consent' : { 
		inherit:'instructions', name:'consent', templateUrl: 'consent.jst', 
                title:'Consent', piTemplate:true, 
                header:'Consent Agreement: Implicit Social Cognition on the Internet'
            }

Consent

<p>Thank you very much for participating in our study! 
We hope you'll have a pleasant time.
<br/><br/>
Studies at Project Implicit examine your attitudes, preferences and memory. 
At the end of this study, we will give you personal feedback.
<br/><br/>
This study will take approximately 13 minutes to complete.
<br/><br/>
Project Implicit’s standard privacy policy applies to this study. 
To view the privacy policy in a separate pop up window, please click 
<a href="JavaScript:void window.open('/implicit/privacypopup.html', 
'FastResults', 'SCROLLBARS=YES,RESIZABLE=YES,WIDTH=300,HEIGHT=300');">here</a>.
</p>

Debrief

<%
    var feedback = "Error obtaining your results";
    feedback = global.raceiat.feedback;
%>

<div class="result" style="background-color:lightyellow">
    <b><%= feedback %></b>
</div>

piQuest

  • piManager Syntax
  • question Types
  • templates
  • Question Sequence

piManager Syntax

stereotype : [{
                type: 'quest', name: 'stereotype', scriptUrl: 'stereotype.js'
             }]

Question Types

  • Text
  • Textarea
  • textNumber
  • dropdown
  • selectOne
  • selectMulti
  • grid
  • slider

Templates

API.addQuestionsSet('singleChoice', [
		{
			type: 'selectOne',
          answers: [
                  {text: 'Very Characteristic',value:5},
                  {text:'Characteristic',value:4},
                  {text:'Somewhat Characteristic',value:3},
                  {text:'Slightly Characteristic',value:2},
                  {text:'Not Characteristic',value:1}
               ]
		}
	]);
API.addPagesSet('progressBar', [
		{
	            progressBar: '<%= pagesMeta.number %> out of <%= pagesMeta.outOf%>',
		    numbered: false,
                    decline: true
		}

Question Sequence

	API.addSequence([ 
        {
      	 inherit: 'progressBar',
         questions: [
            {
               inherit: 'singleChoice',
               name: 'stereo_feminine',
               stem: "Is the Candidate: <u>Feminine</u>."
            }]},
        {
         inherit: 'progressBar',
         questions: [       
            {
               inherit: 'boolean',
               name: 'stereo_affectionate',
               stem: "Is the Candidate: <u>Affectionate</u>?",
                     
            },
           {
               inherit: 'text',
               name: 'stereo_gentle',
               stem: "How <u>Gentle</u> is the candidate?",
            }]},

]);

THE MIXER / Braches

  • Random Example
  • Choose / Select example 
  • Wrapper Example
  • Repeat Example
  • Advanced Example

Random Example

API.addSequence([
	{
		mixer:'random',
		data: [
			{inherit:'stereotype'},
                        {inherit:'chinese'}
		]
	}
]);

Choose Example

API.addSequence([
	{
		mixer:'choose', n:1,
		data: [
			{inherit:'stereotype'},
                        {inherit:'chinese'}
		]
	}
]);

Wrapper Example

API.addSequence([
	{
		mixer:'wrapper', 
		data: [
			 {inherit:'instiat'},
                         {inherit:'iat'}
		]
	}
]);

Repeat Example

API.addSequence([
	{
		mixer:'repeat',
		times: 10,
		data: [
			{inherit:'default'}
		]
	}
]);

Advanced Example

API.addSequence([
	{
	mixer:'random', 
	data :
	[
	{
	    mixer:'choose',
	    n:1,
	    data : [
              {inherit:'stereotype'},
              {inherit:'chinese'}
              ]},
	{
            mixer:'wrapper',
	    data:
	    [
              {inherit:'instiat'},
              {inherit:'iat'}
              ]}
	]}
]);

Testing

Read the Documentation

The End

Pi Study 3.0

By andydzik

Pi Study 3.0

  • 1,410