User Manual: Inquisit Linguistic Serial Reaction Time Task (aka AGL-SRT):


___________________________________________________________________________________________________________________	

								Linguistic SRT (aka AGL-SRT)
___________________________________________________________________________________________________________________	


Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 02-14-2023
last updated:  04-20-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 04-20-2023 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements Millisecond Software's version of the linguistic Serial Reaction Time (SRT) task
- also referred to as the AGL-SRT-  described by Misyak et al (2010) and Quam et al (2018).
The linguistic SRT task combines a serial reaction time task with artificial grammar learning (Misyak et al, 2010)
and has been used as a measure of procedural memory in language learning (Quam et al, 2018).


*References*											

Misyak, J. B., Christiansen, M. H., and Tomblin, J. B. (2010). On-line individual
differences in statistical learning predict language processing. Front. Psychol.
1:31. doi: 10.3389/fpsyg.2010.00031

Quam, C., Wang, A., Maddox, W. T., Golisch, K., & Lotto, A. (2018). Procedural-Memory, Working-Memory, and 
Declarative-Memory Skills Are Each Associated With Dimensional Integration in Sound-Category Learning. 
Frontiers in Psychology, 9, 1828–1828. 
https://doi.org/10.3389/fpsyg.2018.01828

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________


///// Task//////
In this task, participants see a 2x3 matrix filled with nonwords.

Column1 holds two different 'A' nonwords (sampled from 3 possible ones). 
One 'A' word is the target and the other one is the foil.

Column2 holds two different 'B' nonwords (sampled from 24 possible ones). 
One 'B' word is the target and the other one is the foil.

Column3 holds two different 'C' nonwords (sampled from 3 possible ones). 
One 'C' word is the target and the other one is the foil.

For each column (starting with the A column), the computer plays a soundfile that pronounces the target
and the participants' task is to select the spoken word in the matrix as fast as possible.
As soon as the response is registered, the soundfile for the next column is played and so on.
At the end of a sequence a blank screen is shown for a short duration before the next 2x3 matrix is
presented.

/////Procedure//////
Participants work through 3 phases that flow into each other unannounced.

1. Training: Participants work through 6 blocks of training (72 trials each).
During training, the C-nonwords always depend on the A-nonwords 
(the pairing of the three A-nonwords and the three C-nonword is randomly decided at script start)
=> artificial 'grammar learning'

2. Disruption: Participants work through 1 block of 24 trials.
During the shorter disruption block, the previously learned AC-dependencies are completely avoided.
Thus, A-nonwords are always presented with one of the C-nonwords that the A-nonwords were NOT paired
with during training.

3. Recovery: Participants work through 1 block of 72 trials.
During recovery, the training AC pairings are once again in effect.
___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 40 minutes to complete

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'linguisticsrt_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

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. 
																		
pairAC1: 					the AC1 pair (e.g. pel-tood)					
pairAC2: 					the AC2 pair (e.g. dak-rud)
pairAC3:					the AC3 pair (e.g. vot-jic)

A1: 						the A1 word (e.g. pel)
C1: 						the C1 word (e.g. tood)
A2: 						the A1 word (e.g. dak)
C2: 						the C1 word (e.g. rud)
A3: 						the A1 word (e.g. vot)
C3: 						the C1 word (e.g. jic)

phase: 						the current phase of the script (e.g. "training")

defaultSeq: 				0 = a unique (training) sequence could be generated for the current block
							1 = a unique (training) sequence could not be generated; the default one was used instead (should be rare)

blockCounter_perPhase:		the number of blocks run in the current phase
trialCounter_perBlock: 		the number of trials run in the current block

target:						stores the current target sequence (e.g. dak-loga-rud) 
foil: 						stores the current foil sequence (e.g. vot-kicey-jic)

A_target: 					the A target (e.g. dak)
A_targetIndex:				the itemnumber of targetA (used to call the soundfile)
A_targetSoundfile:			the played targetA soundfile

B_target: 					the B target (e.g. loga)
B_targetIndex:				the itemnumber of targetB (used to call the soundfile)
B_targetSoundfile:			the played targetB soundfile

C_target: 					the C target (e.g. rud)
C_targetIndex:				the itemnumber of targetB (used to call the soundfile)
C_targetSoundfile:			the played targetC soundfile

A_foil: 					the A foil (e.g. vot)
B_foil:						the B foil (e.g. kicey) 
C_foil:						the C foil (e.g. jic)

A_target_position: 			1 = target A on top; 2 = target A on bottom
B_target_position: 			1 = target B on top; 2 = target B on bottom
C_target_position:			1 = target B on top; 2 = target B on bottom

response:					the response of participant: the selected response (e.g. A_target)
correct:					correctness of response (1 = correct, 0 = error)
latency:					response latency (in ms); measured from: onset of nonword


(2) Summary data file: 'linguisticsrt_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)

sequenceFlag:				should be empty BUT
							sequenceFlag = stores the phase and blocknumber during which the default sequence was run 
							because the script couldn't generate a unique sequence within time constraints
	
//training1-training6
training1_propTargetA:			proportion selected A targets 
training1_meanRT_targetA:		mean response time in selecting A targets
training1_propTargetB:			proportion selected B targets 
training1_meanRT_targetB:		mean response time in selecting B targets
training1_propTargetC:			proportion selected C targets 
training1_meanRT_targetC:		mean response time in selecting C targets
(same for all training blocks)

//disruption
disruption_propTargetA:			proportion selected A targets
disruption_meanRT_TargetA:		mean response time in selecting A targets
disruption_propTargetB:			proportion selected B targets
disruption_meanRT_TargetB:		mean response time in selecting B targets
disruption_propTargetC:			proportion selected C targets
disruption_meanRT_TargetC:		mean response time in selecting C targets

//recovery
recovery_propTargetA:			proportion selected A targets
recovery_meanRT_TargetA:		mean response time in selecting A targets
recovery_propTargetB:			proportion selected B targets
recovery_meanRT_TargetB:		mean response time in selecting B targets
recovery_propTargetC:			proportion selected C targets
recovery_meanRT_TargetC:		mean response time in selecting C targets
							
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

A-nonwords: the nonwords that appear in the left column of the matrix
B-nonwords: the nonwords that appear in the center column of the matrix
C-nonwords: the nonwords that appear in the right column of the matrix
(see list.A, list.B, list.C)

//////////////
Preparation
//////////////
At the beginning of the script run, the script randomly pairs the 3 A-nonwords with the 3 (non-adjacent) dependent 
C nonwords. This (non-adjacent) dependency is then kept fixed for the entire training run.
Example: 'A = pel is paired with C = vok' throughout the training

The script also generates the 72 unique nonword strings:
=> 3 different, fixed non-adjacent dependency pairs (AC) x 24 different B nonwords = 72 unique nonword strings
Example: 'pel-wadim-vok'


////////////////////////////////////////
TRAINING of 'grammatical' dependencies 
////////////////////////////////////////

By default this scripts runs 6 training blocks (see editable parameters to change number of training blocks. 
Note that increasing the numbers requires adding additional summary variables)
- in this script each training block runs the 72 unique nonword strings consisting of the 3 nonwords (A,B,C)
once as a target and once as a foil
- the script ensures that each target/foil strings pairs run different nonwords in the A, B, and C positions.

Notes: 
1. this script generates a new list of target/foil pairs for every block. If no suitable pair list is generated
within given time constraints (unlikely), the script uses the default pairing lists instead
and leaves a note in the raw data file. The default target/foil pairings conform to all constraints.
The default target/foil pairs are fixed but the order of pairings is randomly determined, so even
if the default lists were used consecutively (highly unlikely), participants would not see the same order of trials.

2. this script uses the non-adjacent AC pairs for targets AND foils. The result is that each target sequence
is also run as a foil.

- the position of the A target (A foil) is randomly determined with the constraint that the A target
appears on top in 50% of all trials
- the position of the B target (B foil) is randomly determined with the constraint that the B target
appears on top in 50% of all trials
- the position of the C target (C foil) is randomly determined with the constraint that the C target
appears on top in 50% of all trials

Note: positions for A,B,C targets are selected independently from each other

/////////////////////////////////////////
DISRUPTION of 'grammatical' dependencies 
/////////////////////////////////////////

This scripts runs 1 disruption block (24 trials) of the grammatical dependencies AC.
The trained grammatical dependencies are disrupted for all pairs, thus A targets (A foils)
are never paired with their former dependant Cs.

- the disruption block runs 24 unique nonword strings consisting of the 3 nonwords (A,B,C)
once as a target and once as a foil
- the script ensures that each target/foil strings pairs run different nonwords in the A, B, and C positions.

Notes: 
1. If no suitable target/foil pair list is generated within given time constraints (unlikely), 
the script uses a default pairing lists instead and leaves a note in the raw data file (see values.defaultSeq). 
The default target/foil pairings conform to all constraints.
The default target/foil pairs are fixed but the order of pairings is randomly determined.

- the position of the A target (A foil) is randomly determined with the constraint that the A target
appears on top in 50% of all trials
- the position of the B target (B foil) is randomly determined with the constraint that the B target
appears on top in 50% of all trials
- the position of the C target (C foil) is randomly determined with the constraint that the C target
appears on top in 50% of all trials

Note: positions for A,B,C targets are selected independently from each other

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section 'Editable Stimuli/Lists'
The soundfiles were generated by FIVERR by (female American English Native Speaker) for Millisecond Software .
___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section 'Editable Instructions'
___________________________________________________________________________________________________________________	
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: