User Manual: Inquisit Pittsburgh Sleep Quality Index (PSQI)


___________________________________________________________________________________________________________________	

								*PITTSBURGH SLEEP QUALITY INDEX (PSQI)*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 09-25-2013
last updated:  10-03-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 10-03-2023 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements the Pittsburgh Quality Sleep Index (PQSI) as described in:

Buysse, D.J., Reynolds, C.F. III, Monk, T.H., Berman, S.R. & Kupfer, D.J. (1989).
The Pittsburgh Sleep Quality Index: a new instrument for psychiatric practice and research. 
Psychiatry Research, 28, 193-213.

___________________________________________________________________________________________________________________
OVERVIEW
___________________________________________________________________________________________________________________	

The PQSI poses 19 questions to participants (+ 5 optional ones to their partner at the very end).
The 19 questions assess 7 different components (or subscales):

Component1: Subjective Sleep Quality
Component2: Sleep Latency
Component3: Sleep Duration
Component4: Habitual Sleep Efficiency
Component5: Sleep Disturbances
Component6: Use of Sleep Medication
Component7: Daytime Dysfunction

Each of those components are scored on a scale from 0-3.
A Global PQSI Score is the sum of all those component scores (range: 0-21).

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

___________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONARY
___________________________________________________________________________________________________________________	
The fields in the data files are:

(1) Raw data file: 'psqi.iqdat' 

date, time:						date and time script was run with the current group/subjectnumber 
subject, group, session:	  	with the current subject/groupnumber/session id
build:							the Inquisit build 

q*_response:					response given (in assigned values
									
q*_latency:						how much time (in ms) the participant spent on the surveyPage with this particular 
								question (the last time this particular surveyPage was visited)

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

Summarydata for each participant: file saves the scores for the subscales and totalscore 

textbox.age.response:			the reported age of the participant
skippartnerQuestions:			1 = partner questions were omitted; 0 = partner questions were run

included to check accuracy of scoring:
bedDuration:					the calculated time a participant spent in bed (though not necessarily sleeping)

q5j:							contains the stored response for question 5j that is used to evaluate the response to calculate
								the component 5 score. The defaultresponse is "Not during the past week" unless participant
								provided another sleep disturbing reason AND selected a different response other than the defaultresponse.
								The value recorded under values.q5j MAY differ from the response recorded under radioButtons.q5j2.response (see raw data file).
								This happens IF no other sleep disturbing reason was provided by participant but yet the defaultresponse
								for radioButtons.q5j2 was changed. In this case, values.q5j still stores the defaultresponse which
								will evaluate to 0. 
								=> Without another sleep disturbing reason provided, the response will always be scored as 0

subcomponent scores on a scale from 0 (least problematic) to 3 (most problematic)								
								
							
///Component 1 Score:
comp1SubjectiveSleepQuality:	component1 score

///Component 2 Score with subscores:
comp2SleepLatencyA:
comp2SleepLatencyB:
comp2SleepLatency:

///Component 3 Score: 
!Note: the scoring guidelines in the article were a bit fuzzy in regard to the boundaries
in this script: anything 7 or greater gets assigned a 0
comp3SleepDuration:

///Component 4 Score:
!Note: the scoring guidelines in the article were a bit fuzzy in regard to the boundaries
in this script: anything 85 or greater gets assigned a 0
comp4HabitSleepEffic:

///Component 5 Score with subscores:
!Note: question 5j is optional as it requires participant to think of another reason
that could potentially disturb their sleep. Since not all participants might think of
something, this question was left optional (and the default response is "not during the past week")
=> the guidelines still include question 5j
comp5SleepDisturb5b-
comp5_sleepdisturb_5j*
comp5SleepDisturbSum:
comp5SleepDisturb:
*Note: /comp5_sleepdisturb_5j uses values.q5j instead of radioButtons.q5j2.response

///Component 6 Score:
comp6SleepMedic:

///Component 7 Score with subscores:
comp7DayTimeDysfuncA: 
comp7DayTimeDysfuncB:
comp7DayTimeDysfunc:

///Global Score:
globalPSQIScoreR: sum of all sub component scores
	
___________________________________________________________________________________________________________________	
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:

/skippartnerQuestions:			true = the last 5 questions (partner questions) are skipped (default)			
								false = the last 5 questions are NOT skipped