Return to the Nine-Hole Peg Test page
																
_________________________________________________________________________________________________________________	

											*Nine Hole Peg Test*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 08-31-2017
last updated: 11-29-2019 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Script Copyright © 11-29-2019 Millisecond Software

_________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements a computerized version of the Nine Hole Peg Test, a test of fine motor behavior.

References for Nine Hole Peg Test:

Mathiowetz V, Weber K, Kashman N, Volland G. Adult Norms for the Nine Hole Peg Test of Finger Dexterity. 
The Occupational Therapy Journal of Research. 1985;5:24-33.

Earhart, G.M., Cavanaugh, J.T., Ellis, T., Ford, M.P., Foreman, K.B., & Dibble, L. (2011).
The 9-Hole Peg Test of Upper Extremity Function: Average Values, Test-Retest Reliability, and Factors
Contributing to Performance in People With Parkinson Disease.
JNPT, 35, 157-163.

Tobler-Ammann, B.C.,de Bruin, E.D., Fluet, M.C., Lambercy, O., Rob A. de Bie, R.A. & Knols, R.H. (2016).
Concurrent validity and test-retest reliability of the Virtual Peg Insertion Test to quantify upper limb function
in patients with chronic stroke.
Journal of NeuroEngineering and Rehabilitation, 13:8.

___________________________________________________________________________________________________________________
TASK DESCRIPTION
___________________________________________________________________________________________________________________	

Phase1: Participants are asked to move 9 'pegs' (=blue discs) with the mouse from one area of the screen 
into the 9 empty holes (=white discs) of a pegboard. 
Phase2: Once all pegs are placed, participants need to move them back to the starting positions.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 7 minutes to complete

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

(1) Raw data file: 'nineholepegtest_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, group, 					with the current subject/groupnumber
script.sessionid:					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 such as feedback trials. Thus, trialnum 
										may not reflect the number of main trials run per block.
										
/condition:						"DragDropTraining" (drag/drop training), "practice2" (dry run of task), "test"
/phase:								1 = move pegs to board; 2 = move pegs from board back to start
/hand:								DH = dominant hand; NDH = non-dominant hand
																
/targetPeg:						stores the currently moved peg									
latency: 							the response latency (in ms); measured from: onset of trial until measured response
/countSuccesses:					stores the number of pegs successfully placed

/transportDrops:					the sum of all 'transport Drops' during the current phase (resets for each phase and hand)
									transportdrop = number of time participants released ('dropped') a stimulus prematurely before it's successfully placed

/transportDrops_peg1:			
/transportDrops_peg9:			calculates the number of times peg1-9 was picked up and released ('dropped') before it was successfully placed into a hole
																								
/MovingDuration:					calculates the complete duration (in ms) of moving the pegs until all holes are filled (phase 1) 
									or pegs are moved back beyond startwall (phase 2); measured from selecting the first peg until 
									last peg is placed
								
/startMoveTime:					stores the script.elapsedtime (in ms) of the start of a movement trial (either phase 1 or phase 2)
									
/startMoveFirstPeg:				stores the script.elpasedtime (in ms) of moving the first peg; 
									measured from clicking on the first peg (either phase 1 or phase 2)
								
/timeUntilFirstPegSelection: 	stores the time (in ms) it took participant to start moving the first peg to the pegboard (phase 1)
									or from the pegboard back beyond the startwall (phase 2)
								
/endTime:							stores the script.elapsedtime (in ms) at the end of successfully moving all 9 pegs into the holes (phase 1)
									or pegs are moved back beyond startwall (phase 2)
								
/peg1Set:							1 = peg1 is successfully placed; 0 = otherwise
(same for all 9 pegs)
/hole1Occupied:					1 = hole1 (from left to right, top to bottom) is occupied by a peg; 0 = otherwise
(same for all 9 holes)							


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

computer.platform:				the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:					assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:				time it took to run script (in ms); measured from onset to offset of script
script.completed:				0 = script was not completed (prematurely aborted); 
									1 = script was completed (all conditions run)
									
/MovingDuration1_DH:				phase1 (DOMINANT hand): stores the complete duration (in ms) of moving the pegs to the pegboard until all holes are filled; 
									measured from selecting the first peg
									
/timeUntilFirstPegSelection1_DH: 	phase1 (DOMINANT hand): stores the time (in ms) it took participant to start moving the first peg to 
									the pegboard
									
/transportDrops1_DH:			phase1 (DOMINANT hand): number of transport drops across pegs 
									(transfer drop: picking up and dropping a peg before it is successfully placed)
									
/MovingDuration2_DH:				phase2 (DOMINANT hand): stores the complete duration (in ms) of moving the pegs back to the startline until all pegs are back; 
									measured from selecting the first peg from the pegboard
									
/timeUntilFirstPegSelection2_DH:	phase2 (DOMINANT hand):  stores the time (in ms) it took participant to start moving the 
									first peg back to the startline
									
/transportDrops2_DH:			phase2 (DOMINANT hand): number of transport drops across pegs 
									(transfer drop: picking up and dropping a peg before it is successfully placed)

/MovingDuration1_NDH:			phase1 (NON-DOMINANT hand): stores the complete duration (in ms) of moving the pegs to the pegboard until all holes are filled; 
									measured from selecting the first peg
									
/timeUntilFirstPegSelection1_NDH: 	phase1 (NON-DOMINANT hand): stores the time (in ms) it took participant to start moving the 
									first peg to the pegboard
									
/transportDrops1_NDH:			phase1 (NON-DOMINANT hand): number of transport drops across pegs 
									(transfer drop: picking up and dropping a peg before it is successfully placed)
									
/MovingDuration2_NDH:			phase2 (NON-DOMINANT hand): stores the complete duration (in ms) of moving the pegs 
									back to the startline until all pegs are back; 
									measured from selecting the first peg from the pegboard
									
/timeUntilFirstPegSelection2_NDH:	phase2 (NON-DOMINANT hand):  stores the time (in ms) it took participant to start moving 
									the first peg back to the startline
									
/transportDrops2_NDH:			phase2 (NON-DOMINANT hand): number of transport drops across pegs 
									(transfer drop: picking up and dropping a peg before it is successfully placed)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

1. Mouse Training:
Participants get to try out to drag and drop a blue disc on the screen. They are asked to:
- move the disc around with the left or right hand
- place the disc on a target stimuli and see how it changes color when it's successfully placed
- once they understand how to use the mouse, they can continue

Block 1: Dominant Hand (always tested first)
1. Practice:
Participants are asked to complete the test once with their dominant hand for practice
2. Test:
Participants are asked to complete the test a second time with their dominant hand (for the test)

Block 2: Non-Dominant Hand (always tested second)
1. Practice:
Participants are asked to complete the test once with their non-dominant hand for practice
2. Test:
Participants are asked to complete the test a second time with their dominant hand(for the test)

Note:
- a peg is successfully placed if all parts of the peg are placed onto an empty hole

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________	
The stimuli are created by the script. The size of the holes (on pegboard) can be edited via an editable parameter

___________________________________________________________________________________________________________________	
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:

/sizingFactor:				sets the size of the holes on the backboard in relation to the size of the pegs.
							Default: 1.1 => the radius of the holes are 1.1 times the radius of the pegs (10% larger)
							Note: the script enforces a range of 1.025 - 1.5.

/showQuitInfo:			true: information about how to prematurely abort the script is provided on screen the entire time
									(quitcode for this script: Alt + 'E')
							false:  the quitcode is not provided on screen, but the quitcode (Alt + 'E') still works (default setting)