User Manual: Inquisit Work For Environmental Protection Task (WEPT)


___________________________________________________________________________________________________________________	

								The Work for Environmental Protection Task (WEPT)
___________________________________________________________________________________________________________________	


Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 01-12-2024
last updated:  02-26-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 02-26-2024 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements Millisecond Software's version of the 'The Work for Environmental Protection Task' 
(WEPT, Lange & Dewitte, 2022), a cognitive effort task to study online societally relevant behaviors. 

Researchers can select to run the task with an absolute screen size to ensure that distances
stay the same across devices. The default settings are optimized for ipad touchscreens sizes.
See section Editable Parameters for more info.

Reference:											

Lange, F., & Dewitte, S. (2022). The Work for Environmental Protection Task: 
A consequential web-based procedure for studying pro-environmental behavior. 
Behavior Research Methods, 54(1), 133–145. 
https://doi.org/10.3758/s13428-021-01617-2
___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________

Participants are asked to work on a simple cognitive task ('find all the 2-digit numbers with an even first and 
odd second digit') to generate donation money for a specified charity.
The task consists of one practice page (to demonstrate the task) and 15 possible test pages.
The 15 possible test pages run 3 different donation amounts x 5 different amounts of 
2-digit numbers per page (max: 200).
Participants decide for each page separately if they are willing to work for the promised donation money.
___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 10 minutes to complete (range: 1-35 minutes)
(Note: this average was based on percentual completion rates of the different conditions)

In general: roughly 1s per number per page
___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'environmentalprotectiontask_raw*.iqdat' (a separate file for each participant)

build:						The specific Inquisit version used (the 'build') that was run
computer.platform:			the platform the script was run on (win/mac/ios/android)
date, time: 				date and time script was run 
subject:					with the current subject id
group: 						with the current group id
session:					with the current session id

//Screen Setup:
(parameter) runAbsoluteSizes:	true (1) = should run absolutely sized canvas (see parameters- canvasHeight_inmm)
								false (0) = should use proportionally sized canvas (uses width = 43*screenHeight)
								
canvasAdjustments:				NA: not applicable => parameters- runAbsoluteSize was set to 'false'
								0: parameters- runAbsoluteSize was set to 'true' and screen size was large enough
								1: parameters- runAbsoluteSize was set to 'true' BUT screen size was too small and 
								adjustments had to be made

activeCanvasHeight_inmm:		the width of the active canvas (by default: lightGray area) in mm 
activeCanvasWidth_inmm:			the height of the active canvas in mm 
display.canvasHeight:			the height of the active canvas in pixels
display.canvasWidth:			the width of the active canvas in pixels

px_per_mm:						the conversion factor to convert pixel data into mm-results for the current monitor
								(Note: the higher resolution of the current monitor 
								the more pixels cover the same absolute screen distance)
								This factor is needed if you want to convert pixel data into absolute mm data or the other way around

								
//design parameters
parameters.numberDonationAmountsToRun:	the number of donation amounts run (Max: 3)
parameters.numberStimsToRun:			the number of different stimulus amounts to run (Max: 5)
										=> 3x5 = 15 different condition is the max to run
																
//built-in Inquisit variables:

blockcode, blocknum:		the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum: 		the name and number of the currently recorded trial (built-in Inquisit variable)
								Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
								that do not store data to the data file. 
								
								IMPORTANT: trial.pageSummary provides a data summary of the current page at 
								page conclusion (after participant submitted responses for page)
								(whereas trial.page gives a response by response overview of what participant did before
								submitting page responses).
								If you don't need the additional data rows produced by trial.page, you can set 
								"/ recorddata = false" for trial.page


response:					the response of participant (scancode of response button)
correct:					correctness of response (1 = correct, 0 = error)
latency:					response latency (in ms); measured from:

//custom variables
phase:						"practice" vs. "test"
totalDonation:				cumulative sum of the donations made (adds up offered donations for all pages selected where participants reaches 90% accuracy)
pageCounter: 				counts the number of pages worked on
pageCondition: 				1-15 (15 condition total = 3 donation values x 5 number of stims)

pageParticipation:			0 = participant declined to participate on the current page; 
							1 = participant agreed to participate on the current page; 
												
pageParticipationRt:		response time (in ms) for participation decision												
												
pageDonation: 				the donation that will be made if conditions are met for the current page
pageStims: 					the number of stims on the current page
pageSignals: 				the number of signals/targets on the current page
pageFoils:					the number of foils on the current page
propSignalsPerPage:			proportion of signals to stims on the current page

pageAcc: 					proportion correct decisions for the current page (proportion correct = (number of hits + number of correct rejections)/number of stims)						
pageCorrect: 				number of correct decisions for the current page (number of hits + number of correct rejections)
pageHits: 					number of hits (correctly selected signals/targets)
pageFas: 					number of false alarms (incorrectly selected foils)
pageDuration_inms:			time (in ms) spent on the current page

//specific page info: (for all 200 possible stims)
text.n1.skip: 				0 = number1 was presented; 1 = number1 was skipped
number1: 					the currently randomly selected number for number1

number1Signal: 				1 = number1 is a signal/target (first digit is even, second digit is odd)
							0 = number1 is a foil

number1Selected:			1 = number1 is currently selected by participant
							0 = number1 is currently unselected by participant


(2) Summary data file: 'environmentalprotectiontask_summary*.iqdat' (a separate file for each participant)

inquisit.version:			Inquisit version run
computer.platform:			the platform the script was run on (win/mac/ios/android)
startDate:					date script was run
startTime:					time script was started
subjectid:					assigned subject id number
groupid:					assigned group id number
sessionid:					assigned session id number
elapsedTime:				time it took to run script (in ms); measured from onset to offset of script
completed:					0 = script was not completed (prematurely aborted); 
							1 = script was completed (all conditions run)

//Screen Setup:
(parameter) runAbsoluteSizes:	true (1) = should run absolutely sized canvas (see parameters- canvasHeight_inmm)
								false (0) = should use proportionally sized canvas (uses width = 43*screenHeight)
								
canvasAdjustments:				NA: not applicable => parameters- runAbsoluteSize was set to 'false'
								0: parameters- runAbsoluteSize was set to 'true' and screen size was large enough
								1: parameters- runAbsoluteSize was set to 'true' BUT screen size was too small and 
								adjustments had to be made

activeCanvasHeight_inmm:		the width of the active canvas (by default: lightGray area) in mm 
activeCanvasWidth_inmm:			the height of the active canvas in mm 
display.canvasHeight:			the height of the active canvas in pixels
display.canvasWidth:			the width of the active canvas in pixels

px_per_mm:						the conversion factor to convert pixel data into mm-results for the current monitor
								(Note: the higher resolution of the current monitor 
								the more pixels cover the same absolute screen distance)
								This factor is needed if you want to convert pixel data into absolute mm data or the other way around	
		


totalDonation:			cumulative sum of the final donations earned (adds up offered donations for all pages selected where participants reaches 90% accuracy)

propParticipation:						overall participation rate
overallMeanParticipationDecisionRt:		mean participant response time (in ms)
meanPropSignalsPerPage:					the mean proportion of signals (targets) per page
overallPropCorrect: 					overall proportion correct (for selected pages only)


//per page:
condition1:						experimental condition of page1 (15 condition total = 3 donation values x 5 number of stims)
stims1:							the number of stims presented on page1
donation1:						the offered donation amount for page1 participation

participation1:					1 = participant participated on page1; 0 = participant declined to participate on page1
participationDecisionRt1:		the participation response time (in ms) for page1

acc1:							proportion correct responses for page1 participation
duration1:						the time (in ms) participation spent on page1
faRate1:						the false alarm rate for page1 participation
hitRate1:						the hitrate for page1 participation

(same for pages2-15)		
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

Design: 3 donation amounts x 5 different amounts of stims on the page x 1 repetition = 
15 different experimental conditions

Note: 
this script provides the functionality to run fewer conditions. See section Editable parameters for more info.

(1) Practice
The script starts each participant on a practice page that presents 20 2-digit numbers
-> each number is randomly (with replacement) selected (probability of a target selection: 20/90 ~ 22%)
-> 20 numbers per line
-> unlimited time to select targets (corrections possible)
-> selected numbers are highlighted*
-> once submitted, feedback is provided (the program circles incorrect responses as well as missed targets)

(2) Test
Participants are told that there are 15 (default) more pages with varying amount of numbers (Max: 200)
Each page provides the opportunity to earn donation money for a specified charity.
To earn that money, participants have to get at least 90% of the numbers correct.
For each of the 15 pages, participants are told
- amount of numbers per page
- donation money that can be earned
Participation is voluntary for each page and participants can decline to work on a specific page 
(by pressing the NO button).

-> each number is randomly (with replacement) selected (probability of a target selection: 20/90 ~ 22%)
-> there are 20 numbers per line; 10 lines Max (for Max: 200 numbers)
-> unlimited time to select targets (corrections possible)
-> selected numbers are highlighted*
-> no feedback is provided for test pages
-> The order of the 15 conditions (donation money x amount of stims per page) is selected randomly (without replacement).

*Color Settings:
By default, this script presents the numbers black on a white background. Selected numbers are highlighted in yellow.
Change color settings under section Editable Parameters
___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section 'Editable Stimuli'
___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section 'Editable Instructions'
The instructions are based on published instruction from Lange & DeWitte (2022)
___________________________________________________________________________________________________________________	
EDITABLE CODE 
___________________________________________________________________________________________________________________	
check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code 
to further customize your experiment.

The parameters you can change are:

//color parameter
/ canvascolor = white			//Display color of the actively used portion of the screen (the 'canvas')	
								//Note: if set to a color other than the screencolor, the active canvas
								//appears 'anchored' on the screen regardless of monitor size
								
/ screencolor = gray 			//Color of the screen not used by the canvas ('inactive screen')
/ defaultTextColor = black		//Default color of text items presented on active canvas
/ selectionHighLightColor = yellow //Default color to highlight the selected numbers

//CANVAS SIZING PARAMETERS
//Screen Sizes		
/runAbsoluteSizes = true		//true = runs absolutely sized canvas (see parameters.canvasHeight_inmm)
								//false = uses proportionally sized canvas (uses width = 4/3*screenHeight)
								//the script will look for the larges 4:3 area it can find on the current screen
																			
//the setting of the active canvas in absolute mm is only relevant if parameters.runAbsoluteSizes = true (1)
//=> IF the screen is not sufficiently big to allow for the absolute canvassize
//the script will run a default width:height=4:3 and make a note in the data files
//the default absolute sizes provided here are optimized for ipad use																																						
/canvasHeight_inmm = 144				//the height (H) of the active canvas in mm (default: 144mm ~ ipad screen height)
										//Note: the width of the active canvas (W) is automatically set at
										//ratio: W:H ~ 4:3 => W= 4/3*canvasHeight_inmm = 144mm*4/3=192mm (default)

//sizing Parameters in RELATIVE measurements
//the remaining items are sized relative to CANVAS HEIGHT
//=> Result: 
//for absolute canvassizes: you achieve the same absolutely sized stimuli on all screens
//for relative canvassizes: stimuli are proportionally sized on all screens	

//Charity Information:
/ charity = "[Charity]"					//add the charity here
/ charityDescription = "an environmental non-profit organization working on the preservation of tropical forests. [Charity] invests, for example, in reforestation and environmental education in Latin America." 
										//add additional info that should appear in the instructions about the charity here

/ showTotalDonationAtEnd = true			// true: shows the total donation earned at the end (based on 90% accuracy per page)	
										// false: no donation information is provided at the end
										// Note: Lange & DeWitte (2022) call a page completed only if the duration spent on this page
										// is not 2*SD lower than that of the sample mean for the particular page condition.
										// However, to calculate this completion rate, the sample mean has to be known.
										
//Design: donation amounts (IV1) x number of stims on screen (IV2)
/////donation amounts (IV1)
/ numberDonationAmountsToRun = 3		//this specifies the number of levels for IV1 (donation amounts) (MAX: 3)
/ donationAmount1 = 0.1					//IV1 level1
/ donationAmount2 = 0.2					//IV1 level2				
/ donationAmount3 = 0.3					//IV1 level3

/ montaryUnit = "$"						//the monetary unit the donations should be made in
/ unitPlacement = "before"				//the placement of the monetary unit sign ("after" vs. "before"), Examle: US $ "before" ->$0.1

/////the 5 possible stim numbers to appear on the page (IV2)
/ numberStimsToRun = 5					//this specifies the number of levels for IV2 (number of stims on the screen) (MAX: 5)
/ stimNumbers1 = 40						//IV2 level 1: 40 numbers on the screen
/ stimNumbers2 = 80						//IV2 level 2: 80 numbers on the screen
/ stimNumbers3 = 120					//IV2 level 3: 120 numbers on the screen
/ stimNumbers4 = 160					//IV2 level 4: 160 numbers on the screen
/ stimNumbers5 = 200					//IV2 level 5: 200 numbers on the screen

//timing parameters
/ pageDelay_inms = 500					//the delay of the page with the stims after participant decide to participate or not

//debugging parameters
/ debugMode = false						//true: presents feedback for the test pages to check that calculations etc. match
										//false: does not present test feedback (should be set to false for testing!!!!)