Despite the prevalence of sleep complaints among psychiatric patients, few questionnaires have been specifically designed to measure sleep quality in clinical populations. The Pittsburgh Sleep Quality Index (PSQI) is a self-rated questionnaire which assesses sleep quality and disturbances over a 1-month time interval. Nineteen individual items generate seven “component” scores: subjective sleep quality, sleep latency, sleep duration, habitual sleep efficiency, sleep disturbances, use of sleeping medication, and daytime dysfunction. The sum of scores for these seven components yields one global score. ##Scoring

componentnamedescription
1subjective sleep qualityAnswer to q 6
2sleep latencyScaled sum of number of minutes before sleep (q 2) and evaluation of sleep within 30min (q 5a), scaled to a 5 point scale
3sleep durationScaled score of number of hours before one falls asleep (q 4), scaled to a 5 point scale
4habitual sleep efficiencyhours of sleep (q 4) divided by bedtime (q 1) subtracted from rising time (q 3), and scaled to a 5 point scale
5sleep disturbancesSum of evaluation of sleep within 30min (q 5a) and all remaining questions on sleep problems (q 5b-j), scaled to a 5 point scale
6use of sleeping medicationAnswer to question on use of sleep medication (q 7)
7daytime dysfunctionSum of evaluation of staying awake (q 8) and evaluation of keeping enthusiastic (q 9), scaled to a 5-point scale
global scoresum of the above.If any of the above is not possible to calculate, the global sum is also not calculated

Data requirements

Column names

Questions with multiple subquestions should be named in a similar manner, suffixed by the alphabetical index (psqi_5a, psqi_5b etc.). For questions 5j and 10j, the frequency of occurence should have the names psqi_5j and psqi_10e, and the freehand explanations should have any type of suffix after this to indicate a text answers (i.e. psqi_5j_Desc or psqi_5j_string, psqi_5j_freehand). As an example, LCBC has the following set-up:

  • psqi_1

  • psqi_2

  • psqi_3

  • psqi_4

  • psqi_5a psqi_5b psqi_5c psqi_5d psqi_5e psqi_5f psqi_5g psqi_5h psqi_5i psqi_5j psqi_5j_Coded psqi_5j_Desc

  • psqi_6

  • psqi_7

  • psqi_8

  • psqi_9

  • psqi_10 psqi_10a psqi_10b psqi_10c psqi_10d psqi_10e psqi_10e_Desc psqi_10e_Coded

  • psqi_11a psqi_11b psqi_11c psqi_11d

4-option questions coding

All 4-option questions need to be coded 0-3, not 1-4.

Time formats

For question 1, 3 and 4 (bedtime, rising time, hours of sleep), data should be punched as "HH:MM". Question 2 should be punched as minutes in numbers.

References

Buysse et al. (1989) The Pittsburgh sleep quality index: A new instrument for psychiatric practice and research, Psychiatry Research, 28:2, 193-213

psqi_compute_comp2(min_before_sleep, no_sleep_30min)

psqi_compute_comp3(hours_sleep)

psqi_compute_comp4(hours_sleep, bedtime, risingtime, ...)

psqi_compute_comp5(data, sleep_troubles = matches("^psqi_05[b-j]$"))

psqi_compute_comp7(keep_awake, keep_enthused)

psqi_compute_global(data, cols = matches("comp[1-7]+_"), max_missing = 0)

psqi_compute(
  data,
  components = 1:7,
  bedtime = psqi_01,
  min_before_sleep = psqi_02,
  risingtime = psqi_03,
  hours_sleep = psqi_04,
  no_sleep_30min = psqi_05a,
  sleepquality = psqi_06,
  medication = psqi_07,
  keep_awake = psqi_08,
  keep_enthused = psqi_09,
  sleep_troubles = matches("^psqi_05[b-j]$"),
  max_missing = 0,
  ...,
  prefix = "psqi_",
  keep_all = TRUE
)

Arguments

min_before_sleep

column name with no. minutes before sleep (numeric) (psqi_02)

no_sleep_30min

column name with evaluation of sleep within 30min (0-3) (psqi_05a)

hours_sleep

column name with hours of sleep (decimal hours) (psqi_04)

bedtime

column name with bedtime (HH:MM:SS) (psqi_01)

risingtime

column name with rising time (HH:MM:SS) (psqi_03)

...

other arguments to psqi_compute_time_in_bed

data

data frame

sleep_troubles

columns containing sleep problem evaluations (0-3) (psqi_05(b-j) )

keep_awake

column name with evaluation of staying awake (0-3) (psqi_08)

keep_enthused

column name with evaluation of keeping enthusiastic (0-3) (psqi_09)

cols

columns containing the components

max_missing

Integer specifying the number of missing values to accept in the PSQI components, before the global PSQI value is set to missing. Defaults to 0. If max_missing > 0, the global PSQI value is computed by weighting each non-missing entry with 7 / (7 - max_missing).

components

integer vector of components to calculate. If all 7, global is added also

sleepquality

column name with evaluation of sleep quality (0-3) (psqi_06)

medication

column name with use of sleep mediation (0-3) (psqi_07)

prefix

string to prefix column names of computed values

keep_all

logical, append to data.frame

Value

a data.frame containing only the calculated components

Functions

  • psqi_compute_comp2(): calculate the component 2 (sleep latency)

  • psqi_compute_comp3(): calculate the component 3 (sleep duratione)

  • psqi_compute_comp4(): calculate the component 4 (habitual sleep efficiency)

  • psqi_compute_comp5(): calculate the component 5 (sleep disturbance)

  • psqi_compute_comp7(): calculate the component 7 (daytime dysfunction)

  • psqi_compute_global(): calculate the global scores, sum of all components