vignettes/gds.Rmd
gds.Rmd
The Geriatric Depression Scale (GDS) is an instrument designed specifically for rating depression in the elderly. It can be administrated to healthy, medically ill, and mild to moderately cognitively impaired older adults. As a general rule, GDS is administrated in LCBC to older adults with a lower cut off around 60 years. However, please consult the instructions for each project, as this guideline has been implemented at different time points across the projects.
The questionnaire consists of 30 questions tapping into a wide variety of topics relevant to depression, including cognitive complaints, motivation, thoughts about the past and the future, self-image, and mood itself. The answers should be based the participants’ feelings throughout the last week.
Twenty of the questions indicate the presence of depression when answered positively, while the ten remaining indicate depression when answered negatively (see scoring instructions below). The questionnaire is scored accordingly, giving one point for each statement that affirms a depressive symptom. The sum of these scores yields one total score, with a possible range between 0 and 30.
The GDS is quite straight forward in its format, a series of 30 questions that take a yes or no answer. This binary coding makes it quite easy to work with. Several of the questions, however, are formulated in such a way that they require a reversal of the coding before the total score can be summed. The questions which require reversal of coding are, 01, 05, 07, 09, 15, 19, 21, 27, 29, 30, meaning answering “yes” to these should be altered to 0, and “no” altered to 1, before calculating the sum score. The total GDS score is after reversal, a simple addition of all the answers into a single score.
One point is given for any “No” answered to the following
questions:
1, 5, 7, 9, 15, 19, 21, 27, 29 and 30
and one point is given for every “Yes” answered on the following
questions:
2, 3, 4, 6, 8, 10, 11, 12, 13, 14, 16, 17, 18, 20, 22, 23, 24, 25, 26,
28
The easiest is to have data coded as in the NOAS, as this will let
you use default values for the arguments. The column names in the NOAS
all start with gds_
and then are followed by a two-digit
numbering of the question:
gds_01,
gds_02,
gds_03,
…
gds_28,
gds_29,
gds_30
If your data is coded differently, a consistent naming scheme should help you use the functions anyway.
Each row of data should belong to a single answer to the entire
questionnaire. Meaning if you have multiple answers to the questionnaire
over time, these should be placed in another row, duplicating the
participant ID, together with a column indicating the timepoint the data
was collected in. Data values are binary yes and no answers to the GDS.
While the functions are made in such a way that any type of binary
coding works well, the default is set to be yes = 1
,
no = 0
. These can be altered by applying the
gds_values
functions to the other functions asking for the
coding schema.
library(questionnaires)
gds_values(yes = 1, no = 0)
#> $yes
#> [1] 1
#>
#> $no
#> [1] 0
gds_values(yes = "yes", no = "no")
#> $yes
#> [1] "yes"
#>
#> $no
#> [1] "no"
gds_values(yes = "ja", no = "nei")
#> $yes
#> [1] "ja"
#>
#> $no
#> [1] "nei"
gds
functions
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(tidyr)
# randomly create some data as example
gds_data <- expand_grid(ID = 1:5,
key = "gds",
question = sprintf("%02d", 1:30))
gds_data <- gds_data %>%
mutate(value = sample(c(0,1),
nrow(gds_data),
replace = TRUE)) %>%
unite(key, c(key, question)) %>%
spread(key, value)
gds_data
#> # A tibble: 5 × 31
#> ID gds_01 gds_02 gds_03 gds_04 gds_05 gds_06 gds_07 gds_08 gds_09 gds_10
#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 0 1 0 1 0 0 1 0 0 0
#> 2 2 0 0 1 0 0 0 0 0 0 1
#> 3 3 1 1 1 0 1 0 1 0 0 0
#> 4 4 0 1 0 0 1 1 1 0 1 1
#> 5 5 1 0 1 1 1 1 1 1 0 1
#> # ℹ 20 more variables: gds_11 <dbl>, gds_12 <dbl>, gds_13 <dbl>, gds_14 <dbl>,
#> # gds_15 <dbl>, gds_16 <dbl>, gds_17 <dbl>, gds_18 <dbl>, gds_19 <dbl>,
#> # gds_20 <dbl>, gds_21 <dbl>, gds_22 <dbl>, gds_23 <dbl>, gds_24 <dbl>,
#> # gds_25 <dbl>, gds_26 <dbl>, gds_27 <dbl>, gds_28 <dbl>, gds_29 <dbl>,
#> # gds_30 <dbl>
The function to calculate the total GDS score is
gds_compute_sum
, and requires a data frame, a tidy-selector
that selects all the GDS columns and a tidy-selector indicating which
columns should be reversed. If you have NOAS-like data, then the
defaults should work, and as such you need not specify this.
gds_data %>%
gds_compute_sum()
#> [1] 17 15 15 17 15
To add a column with total GDS to a data set, place the argument
inside a mutate
, here a column named gds_total
will appear as the right-most column.
gds_data %>%
mutate(
gds_total = gds_compute_sum(gds_data)
)
#> # A tibble: 5 × 32
#> ID gds_01 gds_02 gds_03 gds_04 gds_05 gds_06 gds_07 gds_08 gds_09 gds_10
#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 0 1 0 1 0 0 1 0 0 0
#> 2 2 0 0 1 0 0 0 0 0 0 1
#> 3 3 1 1 1 0 1 0 1 0 0 0
#> 4 4 0 1 0 0 1 1 1 0 1 1
#> 5 5 1 0 1 1 1 1 1 1 0 1
#> # ℹ 21 more variables: gds_11 <dbl>, gds_12 <dbl>, gds_13 <dbl>, gds_14 <dbl>,
#> # gds_15 <dbl>, gds_16 <dbl>, gds_17 <dbl>, gds_18 <dbl>, gds_19 <dbl>,
#> # gds_20 <dbl>, gds_21 <dbl>, gds_22 <dbl>, gds_23 <dbl>, gds_24 <dbl>,
#> # gds_25 <dbl>, gds_26 <dbl>, gds_27 <dbl>, gds_28 <dbl>, gds_29 <dbl>,
#> # gds_30 <dbl>, gds_total <dbl>
Most often, people will report not only the actual score, but also
the accompanying depression classification based on that score. This can
be derived by using the gds_factorise
function.
gds_data %>%
gds_compute_sum() %>%
gds_factorise()
#> [1] mild depression mild depression mild depression mild depression
#> [5] mild depression
#> Levels: normal < mild depression < severe depression
and this can also be added directly to the data through a `mutate``
gds_data %>%
mutate(
gds_total = gds_compute_sum(gds_data),
gds_cat = gds_factorise(gds_total)
)
#> # A tibble: 5 × 33
#> ID gds_01 gds_02 gds_03 gds_04 gds_05 gds_06 gds_07 gds_08 gds_09 gds_10
#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 0 1 0 1 0 0 1 0 0 0
#> 2 2 0 0 1 0 0 0 0 0 0 1
#> 3 3 1 1 1 0 1 0 1 0 0 0
#> 4 4 0 1 0 0 1 1 1 0 1 1
#> 5 5 1 0 1 1 1 1 1 1 0 1
#> # ℹ 22 more variables: gds_11 <dbl>, gds_12 <dbl>, gds_13 <dbl>, gds_14 <dbl>,
#> # gds_15 <dbl>, gds_16 <dbl>, gds_17 <dbl>, gds_18 <dbl>, gds_19 <dbl>,
#> # gds_20 <dbl>, gds_21 <dbl>, gds_22 <dbl>, gds_23 <dbl>, gds_24 <dbl>,
#> # gds_25 <dbl>, gds_26 <dbl>, gds_27 <dbl>, gds_28 <dbl>, gds_29 <dbl>,
#> # gds_30 <dbl>, gds_total <dbl>, gds_cat <ord>
Lastly, since it is most common to want both the score and the factor added directly do data, a convenience function exists to assist in that.
gds_data %>%
gds_compute()
#> # A tibble: 5 × 33
#> ID gds_01 gds_02 gds_03 gds_04 gds_05 gds_06 gds_07 gds_08 gds_09 gds_10
#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 0 1 0 1 0 0 1 0 0 0
#> 2 2 0 0 1 0 0 0 0 0 0 1
#> 3 3 1 1 1 0 1 0 1 0 0 0
#> 4 4 0 1 0 0 1 1 1 0 1 1
#> 5 5 1 0 1 1 1 1 1 1 0 1
#> # ℹ 22 more variables: gds_11 <dbl>, gds_12 <dbl>, gds_13 <dbl>, gds_14 <dbl>,
#> # gds_15 <dbl>, gds_16 <dbl>, gds_17 <dbl>, gds_18 <dbl>, gds_19 <dbl>,
#> # gds_20 <dbl>, gds_21 <dbl>, gds_22 <dbl>, gds_23 <dbl>, gds_24 <dbl>,
#> # gds_25 <dbl>, gds_26 <dbl>, gds_27 <dbl>, gds_28 <dbl>, gds_29 <dbl>,
#> # gds_30 <dbl>, gds_sum <dbl>, gds_coded <ord>
alternatively, you can also keep_all = FALSE
in that
function, to only retain the two computed columns, while maintaining the
remaining data structure.
gds_data %>%
gds_compute(keep_all = FALSE)
#> gds_sum gds_coded
#> 1 17 mild depression
#> 2 15 mild depression
#> 3 15 mild depression
#> 4 17 mild depression
#> 5 15 mild depression
Depression Screening Scale: A Preliminary Report, J Psychiatr Res, 17 (1), 37-49, doi: 10.1016/0022-3956(82)90033-4
E L Lesher 1, J S Berryhill (1994), Validation of the Geriatric Depression Scale – Short Form Among Inpatients, J Clin Psychol, 50 (2), 256-60, doi: 10.1002/1097-4679(199403)50:2<256::aid-jclp2270500218>3.0.co;2-e