-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/c2019/w1/depression icd11 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
3f1fd0c
c1ff3c4
17ee222
708fca8
4541217
c4b3503
52f053f
fa4a346
ce03811
0260d8d
31f5bb1
7c8755c
d353d3a
176609c
4c7baa0
f1dcd4e
f12ed31
c089f2b
c0033f2
5c2d427
c6dde11
f367b33
243f8fb
a6ab671
720aa64
08cd03c
ce2fd4a
06ccd54
aa30675
ddaf256
c247b5b
3530cc1
3809f6c
9310b9c
10fe6c5
ca7741a
6a8e9ac
1449bed
100c449
948152d
860f0ba
f232eb6
41e5bf6
b5d8d7b
61b06ac
3613d56
db666a6
578ed62
d599b4a
910cf7e
5286fb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,3 +43,4 @@ vignettes/*.pdf | |
| *.docx | ||
| *.html | ||
| *.dta | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,377 @@ | ||
| --- | ||
| title: "Edad con Salud -- cohort 2019 -- wave 1 -- 'depression_ICD11'" | ||
| output: | ||
| word_document: | ||
| reference_docx: !expr ecs.data::get_pkg_docx_template() | ||
| pdf_document: default | ||
| csl: "`r ecs.data::get_proj_csl_file()`" | ||
| bibliography: "`r ecs.data::get_proj_bib_file()`" | ||
| editor_options: | ||
| markdown: | ||
| wrap: 80 | ||
| --- | ||
|
|
||
| ```{r setup, include=FALSE} | ||
| # Activar los paquetes que R necesita para ejecutar el código: | ||
|
|
||
| library(Statamarkdown) | ||
|
|
||
| # Ruta al ejecutable de Stata (Ejecuta `sysdir` en Stata para encontrar la ruta) | ||
|
|
||
| # Opciones de configuración de las salidas de R y Stata: | ||
|
|
||
| knitr::opts_chunk$set( # Para todos los 'chunks' de código: | ||
| echo = FALSE, # - No muestra la sintaxis en el documento | ||
| results = 'hide',# - Omite los resultados de ejecutar la sintaxis | ||
| cleanlog = TRUE, # - Omite repetir sintaxis en resultados de Stata | ||
| collectcode = TRUE # - Reutiliza el código de Stata de 'chunks' anteriores | ||
| ) | ||
| ``` | ||
|
|
||
| # Variable information | ||
|
|
||
| +---------------------------+------------------+------------+-----------+ | ||
| | **Main variable name** | **Label** | **Format** | **Code** | | ||
| +:==========================+:=================+============+===========+ | ||
| | depression_lifetime | Lifetime | Binary | - 0=No; | | ||
| | | (c2019_w1) | | - 1=Yes | | ||
| +---------------------------+------------------+------------+-----------+ | ||
| | depression_lifetime_proxy | Lifetime | Binary | - 0=No; | | ||
| | | depression for | | - 1=Yes | | ||
| | | proxy (c2019_w1) | | | | ||
| +---------------------------+------------------+------------+-----------+ | ||
|
|
||
| # Variable description | ||
|
|
||
| Depression has become a major public health issue as it is one of the main | ||
| causes of disability worldwide, with an even greater impact on developed | ||
| countries. According to The ICD-10 Classification of Mental and Behavioural | ||
| Disorders, Diagnostic criteria for research | ||
| [@world_health_organization_icd-10_1992], the main characteristics of depression | ||
| are the presence of a sustained depressed mood, the loss of interest or pleasure | ||
| in activities normally pleasurable and/or the decreased energy or increased | ||
| fatigability. In addition to these main criteria, the ICD-10 Diagnostic criteria | ||
| for research proposes several contributing factors that can be present or | ||
| absent: loss of confidence and self-esteem, feelings of self-reproach or guilt, | ||
| recurrent thoughts of death or suicide, diminished ability to think or | ||
| concentrate, change in psychomotor activity, sleep disturbance, and changes in | ||
| appetite with the corresponding weight change. Moreover, the classification | ||
| proposes a three-level gradient of severity depending on the amount of criteria | ||
| present in each case, from mild to severe. The ICD-11 | ||
| [@worldhealthorganization2019] refers to the same symptoms but strengthens the | ||
| criteria, making the diagnosis of depression more demanding than its | ||
| predecessor. In order to address these criteria and be able to assess the | ||
| lifetime presence or absence of a depressive episode, as well as its severity, | ||
| we used an adapted version of the Composite International Diagnostic Interview | ||
| (CIDI 3.0), a comprehensive, fully-structured interview designed to be used by | ||
| trained lay interviewers for the assessment of mental disorders according to the | ||
| definitions and criteria of ICD-11 (criteria can been seen at [ICD-11 for | ||
| Mortality and Morbidity Statistics | ||
| (who.int](https://icd.who.int/browse11/l-m/en#/http%3a%2f%2fid.who.int%2ficd%2fentity%2f578635574)[)](https://icd.who.int/browse11/l-m/en#/http%3a%2f%2fid.who.int%2ficd%2fentity%2f1563440232) | ||
| It is intended for use in epidemiological and cross-cultural studies, as well as | ||
| for clinical and research purposes. | ||
|
|
||
| # Explanation of how the variables were created | ||
|
|
||
| Information from the CIDI depression module was used for the creation of the | ||
| depression variables. Algorithms based on the ICD-11 were used for the | ||
| endorsement of depressive episode at some point in their lives (lifetime | ||
| prevalence; variable `depression_lifetime`). More precisely, the following | ||
| criteria must be fulfilled: | ||
|
|
||
|
DaniMori marked this conversation as resolved.
|
||
| i) Symptoms should last at least two weeks; | ||
|
|
||
| ii) The clinical presentation does not fulfill the diagnostic requirements for a | ||
| Mixed Episode; | ||
|
|
||
| iii) The episode is not attributable to psychoactive substance use or to any | ||
| organic mental disorder | ||
|
|
||
| iv) The concurrent presence of at least five of the following symptoms: | ||
|
|
||
| - **Affective cluster:** (1) Depressed mood, (2) Markedly diminished | ||
| interest or pleasure; | ||
| - **Cognitive-behavioural cluster:** (3) Reduced ability to concentrate | ||
| and sustain attention, (4) Beliefs of low self-worth or excessive and | ||
| inappropriate guilt, (5) Hopelessness about the future, (6) Reccurent | ||
| thoughts of death; | ||
| - **Neurovegetative cluster:** (7) Significantly disrupted sleep, (8) | ||
| Significant change in appetite or weight, (9) Psychomotor agitation or | ||
| retardation, (10) Reduce energy, or fatigue; | ||
|
|
||
| v) At least one symptom from the affective cluster (depressed mood, loss of | ||
| interest). | ||
|
|
||
| For reasons of precision and availability of information, certain criteria could | ||
| not be taken into account ("The symptoms result in significant distress or | ||
| significant impairment in personal, family, social, educational, occupational or | ||
| other important areas of functioning." and "Symptoms are not best explained by | ||
| bereavement"). | ||
|
|
||
| The coding of this algorithm is very complex and requires many different | ||
| criteria to be taken into account. We have tried to make use of uniform coding | ||
| criteria for implementing the computation of the different symptoms and | ||
| diagnostic criteria, and also separating clearly the computation of the | ||
| *positive*/*negative*/*missing* cases, to make the code the clearest possible. | ||
| The following general principles have been followed when possible: | ||
|
|
||
| - All the non-valid responses are considered to be *negative* responses; that | ||
| is, if an item has been answered with "*Don't know*" (`888`) or "Refused" | ||
| (`999`), it is assumed that the criterion is "not met" (=`0`). | ||
|
|
||
| - Only the variables that are kept in the final dataset are labelled. | ||
|
|
||
| - First, all the cases are set to `.` ("Missing" value). | ||
|
|
||
| - Then, the negative cases are recoded to `0` (diagnostic "No"). | ||
|
|
||
| - Finally, the positive cases are recoded to `1` (diagnostic "Yes"). | ||
|
|
||
| - Unless stated otherwise, the cases are explicitly recoded to their final | ||
| value exclusively and exhaustively, such that the number of cases recoded to | ||
| `0`/`1` in each step must be exactly the same as the number of `0`/`1` cases | ||
| finally in the variable. This allows for an additional check of recoding | ||
| errors. | ||
|
|
||
| - When the values need to be compared for unequality (operator `!=`) against a | ||
| non-missing value, it must be taken into account that a "missing" value | ||
| gives a `1` result instead of a missing in Stata. Therefore, in order to | ||
| avoid recoding "missing" values into non-missing ones, the "missing" values | ||
| must be excluded from the comparison. This principle is used generally | ||
| throughout the algorithm; when used differently, it is explained in the | ||
| syntax. | ||
|
|
||
| - When these principles are not strictly followed, an annotation is added | ||
| right below, explaining how it changes from them and why. | ||
|
|
||
| # Syntax used to create the variable (Stata 15) | ||
|
|
||
| ```{stata load-data} | ||
| * Cohorte 2019, ola 1: | ||
| use "~\UAM\Marta Miret Garcia - Bases de datos maestras Edad con Salud\Ola_3\Cohorte_2019\rawdata_c2019w1.dta" | ||
| ``` | ||
|
|
||
| ```{stata generate-outcomes, echo=TRUE} | ||
| *# "Value labels (defined for all the outcome variables in the dataset)": | ||
| label define yesno 0 "No" 1 "Yes" | ||
|
|
||
|
|
||
| ***#"VARIABLE `depression_lifetime`: Depressive episode (6A70)" | ||
|
|
||
| *#Criterion 1: "The depressive episode should last for at least 2 weeks" | ||
| gen d_crit1 = . | ||
| replace d_crit1 = 0 if (q4211!=1 & q4211!=.) | (q4213!=1 & q4213!=.) | ||
| replace d_crit1 = 1 if q4211==1 | q4213==1 | ||
|
|
||
| *#Criterion 2: "The clinical presentation does not fulfil the diagnostic | ||
| *# requirements for a Mixed Episode" | ||
| gen d_crit2 =0 | ||
| replace d_crit2 = 1 if q4233!=1 & q4225_causemed2!=1 | ||
| replace d_crit2 = . if q4233==. & q4225_causemed2==. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section does not follow the criteria stated in the "Explanation" section. I'd rather you tried to code in an equivalent manner, but following those criteria (see lines 124-134, in this commit)
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was it wrong to include proxy==2 btw? I think it would be safer to avoid the proxies from being recoded as "something else"... Are you sure the two syntaxes are not equivalent?
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you check whether it was ok or not to include
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Leafrancia please mind this comment and reply |
||
|
|
||
| *#Criterion 3: "The episode is not attributable to psychoactive substance use or | ||
| *# to any organic mental disorder" | ||
| gen d_crit3 = . | ||
|
DaniMori marked this conversation as resolved.
|
||
| replace d_crit3 = 0 if q4224b==1 | (q4224==1 & (q4225_causemed12==1 | q4225_causemed23==1 | q4225_causemed24==1 | q4225_causemed25==1 | q4225_causemed30==1 | q4225_causemed31==1)) | ||
| replace d_crit3 = 1 if (q4224a!=1 & q4224a!=.) | (q4224b!=1 & q4224b!=.) | (q4224==1 & (q4225_causemed12!=1 & q4225_causemed23!=1 & q4225_causemed24!=1 & q4225_causemed25!=1 & q4225_causemed30!=1 & q4225_causemed31!=1)) | ||
| *#"NOTE: When `q4224b==1` it is necessarily the case that `q4224a==1`, | ||
| *# so only `q4224b` out of these two needs to be checked for considering | ||
| *# the criterion negative." | ||
|
|
||
| *#Filling of the three first criteria above (Criterion 1, 2 and 3): | ||
| gen d_crit_123 = . | ||
| replace d_crit_123 = 0 if d_crit1==0 | d_crit2==0 | d_crit3==0 | ||
| replace d_crit_123 = 1 if d_crit1==1 & d_crit2==1 & d_crit3==1 | ||
|
DaniMori marked this conversation as resolved.
|
||
| *#"NOTE: The criterion named "d_crit123" includes all the three exclusion criteria | ||
| *# of the ICD11. Those three criteria are coded in different points because | ||
| *# they do not take into account a minimum threshold of symptoms as the two | ||
| *# other bellow (Criterion 4 and Criterion 5)." | ||
|
|
||
| *#Criterion 4: "A total of at least five symptoms from the following list should | ||
| *# be present." | ||
|
|
||
| *# AFFECTIVE CLUSTER: | ||
|
|
||
| *#S1: "Depressed mood to a degree that is definitely abnormal for the | ||
| *# individual, present for most of the day and almost every day, largely | ||
| *# uninfluenced by circumstances, and sustained for at least 2 weeks" | ||
| gen d_s1 = . | ||
| replace d_s1 = 0 if (q4220a!=1 & q4220a!=.) & q4220b!=1 & q4220c!=1 | ||
| replace d_s1 = 1 if q4220a==1 | q4220b==1 | q4220c==1 | ||
| *#"NOTE: When `q4220b` or `q4220d` are "missing" it may be due to the interview | ||
| *# skip logic in `q4220a` or `q4220c`, respectively. But if there is a | ||
| *# response in`q4220a` there must be one also in `q4220c`. Therefore, only | ||
| *# `q4220a` needs to be checked for missingness". | ||
|
|
||
| *#S2: "Loss of interest or pleasure in activities that are normally pleasurable | ||
| *# (including sexual desire)" | ||
| gen d_s2 = . | ||
| replace d_s2 = 0 if (q4220e!=1 & q4220e!=.) & q4220f!=1 | ||
| replace d_s2 = 1 if q4220e==1 | q4220f==1 | ||
|
|
||
| *# COGNITIVE-BEHAVIOURAL CLUSTER: | ||
|
|
||
| *#S3: "Complaints or evidence of diminished ability to think or concentrate, | ||
| *# such as indecisiveness or vacillation" | ||
| gen d_s3 = . | ||
| replace d_s3 = 0 if q4222h!=1 & q4222h!=. & q4222i!=1 & q4222j!=1 | ||
| replace d_s3 = 1 if q4222h==1 | q4222i==1 | q4222j==1 | ||
| *#"NOTE: When `q4222i` and `q4222j` are 'missing' it may be due to the | ||
| *# interview skip logic in `q4222h`. Therefore, only `q4222h` needs | ||
| *# to be checked for missingness". | ||
|
|
||
| *#S4: "Beliefs of low self-worth or excessive and inappropriate guilt that may | ||
| *# be manifestly delusional" | ||
| gen d_s4 = . | ||
| replace d_s4 = 0 if ((q4222k!=1 & q4222k!=.) & (q4222l!=1 & q4222l!=.) & q4222m!=1) | (q4222n!=1 & q4222n!=.) | ||
| replace d_s4 = 1 if q4222k==1 | q4222l==1 | q4222m==1 | q4222n==1 | ||
| *#"NOTE: When `q4222m` is "missing" it may be due to the interview | ||
| *# skip logic in `q4222l`. Therefore, only `q4222k` and `q4222l` | ||
| *# need to be checked for missingness". | ||
|
|
||
| *#S5: "Hopelessness about the future." | ||
| gen d_s5 = . | ||
| replace d_s5 = 0 if q4220d!=1 & q4220d!=. | ||
| replace d_s5 = 1 if q4220d==1 | ||
| *#"NOTE: Symptom presents in the ICD10 as, (d) bleak and pessimistic views of | ||
| *# the future;" | ||
|
|
||
| *#S6: "Recurrent thoughts of death or suicide, or any suicidal behaviour" | ||
| gen d_s6 = . | ||
| replace d_s6 = 0 if q4222r!=1 & q4222r!=. & q4222s!=1 & q4222t!=1 & q4222u!=1 & q4222v!=1 | ||
| replace d_s6 = 1 if q4222r==1 | q4222s==1 | q4222t==1 | q4222u==1 | q4222v==1 | ||
| *#"NOTE: When any of the two last items are 'missing' it may be due to | ||
| *# the interview skip logic in `q4222t`. But if there is a | ||
| *# response in `q4222r` there must be one also in `q4222s` and | ||
| *# `q4222t`.Therefore, only `q4222r` needs to be checked for | ||
| *# missingness". | ||
|
|
||
| *# NEUROVEGETATIVE CLUSTER: | ||
|
|
||
| *#S7: "Sleep disturbance of any type" | ||
| gen d_s7 = . | ||
| replace d_s7 = 0 if (q4222c!=1 & q4222c!=.) & q4222d!=1 | ||
| replace d_s7 = 1 if q4222c==1 | q4222d==1 | ||
| *#"NOTE: When `q4222d` is 'missing' it may be due to the interview skip | ||
| *# logic in `q4222c`. Therefore, only `q4222c` is checked for | ||
| *# missingness". | ||
|
|
||
| *#S8: "Change in appetite (decrease or increase) with corresponding weight | ||
| *# change" | ||
| gen d_s8 = . | ||
| replace d_s8 = 0 if (q4222a!=1 & q4222a!=.) | (q4222b!=1 & q4222b!=.) | ||
| replace d_s8 = 1 if q4222a==1 & q4222b==1 | ||
|
|
||
| *#S9: "Change in psychomotor activity, with agitation or retardation (either | ||
| *# subjective or objective)" | ||
| gen d_s9 = . | ||
| replace d_s9 = 0 if (q4222f!=1 & q4222f!=. & q4222fa!=1) | (q4222g!=1 & q4222ga!=1 & q4222g!=.) | ||
| replace d_s9 = 1 if q4222f==1 | q4222fa==1 | q4222g==1 | q4222ga==1 | ||
| *#"NOTE: When the three last items are 'missing' it may be due to the | ||
| *# interview skip logic in `q4222f`. Therefore, only `q4222f` needs | ||
| *# to be checked for missingness". | ||
|
|
||
| *#S10: "Decreased energy or increased fatigability" | ||
| gen d_s10 = . | ||
| replace d_s10 = 0 if q4222e!=1 & q4222e!=. | ||
| replace d_s10 = 1 if q4222e==1 | ||
|
|
||
| *#"Sum of depressive symptoms" | ||
| egen d_symptot = rowtotal (d_s1 d_s2 d_s3 d_s4 d_s5 d_s6 d_s7 d_s8 d_s9 d_s10), missing | ||
|
|
||
| *#"To fulfill Criterion 4, at least five symptoms should be present". | ||
| gen d_crit4 = . | ||
| replace d_crit4 = 0 if d_symptot<5 | ||
| replace d_crit4 = 1 if d_symptot>=5 & d_symptot!=. | ||
|
|
||
|
|
||
| *#Criterion 5: "At least one symptom from the affective cluster must be present" | ||
|
|
||
| *#"Sum of depressive symptoms of affective cluster" | ||
| egen d_afftotal = rowtotal (d_s1 d_s2), missing | ||
|
|
||
| *#"To fulfil criterion 5 at least one symptoms of the affective cluster should | ||
| *# be present". | ||
| gen d_crit5 = . | ||
| replace d_crit5 = 0 if d_afftotal <1 | ||
| replace d_crit5 = 1 if d_afftotal==1 | d_afftotal==2 | ||
|
|
||
|
|
||
| ***#"Has the person skipped the lifetime depression module?" | ||
|
|
||
| *#"Depression symptoms recoded into 0/1 to compute the tally": | ||
| recode q4220a-q4222v (1=1) (2=0) (888 999=.) | ||
|
|
||
| *#"Filter variables": | ||
| gen f4217 = q4214==1 & q4215==4 & q4216==4 if q4214!=. | ||
| egen f4221_sum = rowtotal (q4220a-q4220f), missing | ||
| egen f4223_sum = rowtotal (q4220a-q4222v), missing | ||
|
|
||
| *#"Variable "skipped" computation": | ||
| gen d_skipped = . | ||
| replace d_skipped = q4202!=1 if q4202!=. | ||
| replace d_skipped = q4211!=1 | d_skipped==1 if q4211!=. | ||
| replace d_skipped = q4213!=1 | d_skipped==1 if q4213!=. | ||
| replace d_skipped = q4218!=1 | d_skipped==1 if q4218!=. | ||
| replace d_skipped = f4217==1 | d_skipped==1 if f4217!=. | ||
| replace d_skipped = f4221_sum<1 | d_skipped==1 if f4221_sum!=. | ||
| replace d_skipped = f4223_sum<2 | d_skipped==1 if f4223_sum!=. | ||
| *#"NOTE: For clarity, this recoding adds the criteria incrementally. This | ||
| *# implies that the new "truth values" (0/1 resulting from each | ||
| *# comparison) are "logically added" (therefore the "OR" operation) | ||
| *# to the current values". | ||
|
|
||
|
|
||
| ***#"Lifetime depression diagnostic variable": | ||
| gen depression_lifetime = . | ||
| replace depression_lifetime = 0 if d_skipped==1 | d_crit_123==0 | d_crit4==0 | d_crit5==0 | ||
| replace depression_lifetime = 1 if d_skipped==0 & d_crit_123==1 & d_crit4==1 & d_crit5==1 | ||
| label values depression_lifetime yesno | ||
| label variable depression_lifetime "Lifetime depression (c2019_w1)" | ||
|
|
||
|
|
||
| ***#"VARIABLE `depression_lifetime_proxy`: Depressive episode for proxy participants" | ||
| recode P4040 (1=1) (2=0) (888=0) (999=0), gen (depression_lifetime_proxy) | ||
| label values depression_lifetime_proxy yesno | ||
| label variable depression_lifetime_proxy "Lifetime depression for proxy (c2019_w1)" | ||
|
|
||
| ``` | ||
|
|
||
| <br> | ||
|
|
||
| ```{stata descriptives, collectcode=FALSE, results='markup'} | ||
| codebook depression_lifetime depression_lifetime_proxy | ||
| ``` | ||
|
|
||
| ```{stata save-data} | ||
| keep q0007a_result ID_ECS proxy subsample_pre interview_pre depression_lifetime depression_lifetime_proxy | ||
|
|
||
| * Cohorte 2019, ola 1: | ||
|
|
||
| saveold "~\UAM\Marta Miret Garcia - Documentacion Edad con Salud\Edad con salud - Ola 3\Outcomes\Cohorte 2019\Outcome datasets\Outcome_depression_ICD11.dta", replace version(13) | ||
| ``` | ||
|
|
||
| # Contact person: | ||
|
|
||
| - Name: Lea Francia (UAM) | ||
| - e-mail: [lea.francia\@inv.uam.es](mailto:lea.francia@inv.uam.es){.email} | ||
|
|
||
| Original version: | ||
|
|
||
| - Name: Daniel Morillo (UAM) | ||
| - e-mail: | ||
| [daniel.morillo\@inv.uam.es](mailto:daniel.morillo@inv.uam.es){.email} | ||
| - Phone number: (+34) 914975816 | ||
|
|
||
| # References | ||
|
|
||
| ::: {#refs} | ||
| ::: | ||
|
|
||
| \newpage | ||
|
|
||
| # Session info | ||
|
|
||
| ```{r, results='markup'} | ||
| devtools::session_info() | ||
| ``` | ||
Uh oh!
There was an error while loading. Please reload this page.