User Manual: Inquisit Pittsburgh Sleep Quality Index - Revised (PSQI - Revised)


___________________________________________________________________________________________________________________	

								*PITTSBURGH SLEEP QUALITY INDEX (PSQI) - Revised*
___________________________________________________________________________________________________________________	

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

Script Copyright © 02-25-2022 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.

Note: the PSQI-Revised inquires only about one's sleep over the past week instead of the entire last month.

___________________________________________________________________________________________________________________
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 FILE INFORMATION 
___________________________________________________________________________________________________________________	
The default data stored 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:
comp1_subjectivesleepquality:	component1 score

///Component 2 Score with subscores:
comp2_sleeplatencyA
comp2_sleeplatencyB
comp2_sleeplatency

///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
comp3_sleepduration

///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
comp4_habitsleepeffic

///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
comp5_sleepdisturb_5b-
comp5_sleepdisturb_5j*
comp5_sleepdisturb_sum
comp5_sleepdisturb
*Note: /comp5_sleepdisturb_5j uses values.q5j instead of radiobuttons.q5j2.response

///Component 6 Score:
comp6_sleepmedic

///Component 7 Score with subscores:
comp7_daytimedysfuncA 
comp7_daytimedysfuncB
comp7_daytimedysfunc

///Global Score:
Global_PSQIscoreR: 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