Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond
Created: January 25, 2013
Last Modified: January 11, 2025 by K. Borchert (katjab@millisecond.com), Millisecond
Script Copyright © Millisecond Software, LLC
This script implements the Pittsburgh Quality Sleep Index (PQSI) as described in Buysse et al (1989).
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.
2 minutes
The PQSI poses 19 questions to participants (+ 5 optional ones to their partner at the very end). The 19 questions assess 7 different sleep 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).
File Name: psqi_summary*.iqdat
| Name | Description |
|---|---|
| inquisit.version | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| computer.touch | 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities |
| computer.hasKeyboard | 0 = no external keyboard detected; 1 = external keyboard detected |
| startDate | Date the session was run |
| startTime | Time the session was run |
| subjectId | Participant ID |
| groupId | Group number |
| sessionId | Session number |
| elapsedTime | Session duration in ms |
| completed | 0 = Test was not completed 1 = Test was completed |
| textbox.age.response | The reported age of the participant |
| skipPartnerQuestions | 1 = partner questions were omitted; 0 = partner questions were run |
| bedDuration | The calculated time a participant spent in bed (though not necessarily sleeping) included to check accuracy of scoring |
| 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 |
Component1 Score: Subjective Sleep Quality |
|
| comp1SubjectiveSleepQuality | 0 = very good - 3 = very bad |
Component2 Score With Subscores: Falling Asleep |
|
| comp2SleepLatencyA | Time to fall asleep 0 = 15 minutes or less 1 = 16-30 minutes 2 = 31-60 minutes 3 = more than 60 minutes |
| comp2SleepLatencyB | Takes more than 30 minutes to fall asleep 0 = not during the past month 1 = less than once a week 2 = once or twice a week 3 = three of more times a week |
| comp2SleepLatency | Total Score 0 = sum of A and B = 0 1 = sum of A and B <= 2 2 = sum of A and B <= 4 3 = sum of A and B > 4 |
Component3 Score: Sleep Duration Per Night |
|
| comp3SleepDuration | Actual sleep duration in hours 0 = 7 and more 1 = 6 and more 2 = 5 and more 3 = less than 5 hours |
Component4 Score: Sleep Time Relative To Time Spent In Bed In Percent |
|
| comp4HabitSleepEffic | 0 = 85% or more of time in bed was spent on actual sleep 1 = 75% or more of time in bed was spent on actual sleep 2 = 65% or more of time in bed was spent on actual sleep 3 = less than 65% of the time spent in bed was spent on actual sleep |
Component5 Score With Subscores: Sleep Disturbances (0 = Not During The Past Month - 3 = Three Or More Times A Week) |
|
| comp5SleepDisturb5b | Waking up in the middle of the night/early morning |
| comp5SleepDisturb5c | Needing to use bathroom |
| comp5SleepDisturb5d | Difficulty breathing |
| comp5SleepDisturb5e | Coughing/Snoring |
| comp5SleepDisturb5f | Too cold |
| comp5SleepDisturb5g | Too hot |
| comp5SleepDisturb5h | Bad dreams |
| comp5SleepDisturb5i | Pain |
| comp5SleepDisturbSum | Sum of all Sleep Disturbance Scores |
| comp5SleepDisturb | Sleep Disturbance Score 0 = sum of all scores was 0 1 = sum <= 9 2 = sum <= 18 3 = sum > 18 |
Component6 Score: Sleep Medication During The Last Month |
|
| comp6SleepMedic | Sleep Medication Score 0 = not during the past month 1 = "Less than once a week" 2 = "Once or twice a week" 3 = "Three or more times a week") |
Component 7 Score With Subscores: Daytime (Sleep Related) Dysfunction |
|
| comp7DayTimeDysfuncA | Trouble staying awake while driving, eating meals, or engaging in social activity |
| comp7DayTimeDysfuncB | Problem with enthusiasm to get things done |
| comp7DayTimeDysfunc | 0 = sum (A+B) = 0 1 = sum (A+B) <= 2 2 = sum (A+B) <= 4 3 = sum (A+B) > 4 |
Global Score |
|
File Name: psqi.iqdat
| Name | Description |
|---|---|
| date | Date the session was run |
| time | Time the session was run |
| subject | Participant ID |
| group | Group number |
| session | Session number |
| build | Inquisit version number |
| 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) |
The procedure can be adjusted by setting the following parameters.
| Name | Description | Default |
|---|---|---|
| skipPartnerQuestions | True = the last 5 questions (partner questions) are skipped false = the last 5 questions are NOT skipped | true |