This codebook (data dictionary) and the accompanying phenotype dataset were created using R version 4.1.2 on a machine running Ubuntu 22.04.2 LTS The metadata contained in this document describe most of the variables that were assessed in the longitudinal PsyCourse Study. For a more in-depth description of the study, please refer to and cite this article.
The official period of data collection was from the 1st of January, 2012 until the 31st of December, 2019. A few participants were recruited in a pilot study, and had their baseline assessment during the last months of 2011. These individuals are also included in the dataset.
The PsyCourse 6.0 dataset contains data of 1320 clinical and 466 control participants, who were assessed at the first (baseline) study visit. Of the clinical participants, 788, 661, and 589 were also assessed at the second, third, and fourth study visits (follow-up), respectively. Of the control participants, 288, 280, and 251 were also assessed at the second, third, and fourth study visits (follow-up), respectively.
The variable “v1_stat” gives information on clinical/control status.
Three very important points to consider:
PsyCourse is purely observational, i.e. there is no intervention at baseline, at or between the follow-ups.
PsyCourse is very heterogeneous in terms of participants.
Longitudinal measurements were approximately six months apart, which is a rather short time, so most longitudinal measurements are highly correlated.
Interviews were conducted in German, using German translations of the tests and scales presented herein. Some scales were measured only cross-sectionally, others were measured longitudinally, some were only measured in clinical participants, others only in control participants (see below). Wherever possible, we alternately used parallel versions of tests assessed multiple times to avoid recall effects.
Importantly, the assessment period of many variables varies greatly, this should be taken into account when making inferences. For example, the SCID questions generally assess if a symptom has ever occurred (lifetime assessment), whereas other rating scales use the past week, or shorter, as assessment period.
We created this dataset and the accompanying codebook for the following reasons:
Some items (especially demographic information) in the original case-report forms (CRFs, “Phänotypisierungsinventar”) are rather complicated (e.g. items on the German educational system) and virtually every item needs explanation.
Missing values in our phenotype database do not distinguish between structurally missing data (missing because not applicable, e.g. skipped because a screening question was answered negatively) and missing because the information was not collected (for whatever reason, e.g. drop-out of study participants). This is especially important for machine learning analyses. In this dataset, structurally missing data are coded as -999; this includes items that were not assessed in the clinical or control subsample. The remaining missing values are coded as NA.
The original CRFs are in German language, so they are of little use for most foreign colleagues.
The data of clinical and control participants are saved in different databases, and are combined into a comprehensive dataset using the code provided herein.
Apart from providing a transparent and reproducible codebook for the PsyCourse Study, this file also contains some descriptive statistics (e.g. how many NAs, distribution of data).
For easy navigation, the table of contents contanins hyperlinks to the respective sections of the document, also the overview of the measured variables contains some hyperlinks.
Names of variables in the wide dataset (see below) are contained in the heading describing each variable. For example, “Age at first interview (continuous [years], v1_age)”, means that age at first interview is measured on a continuous scale, unit years, and that it has the name “v1_age” in the dataset.
If you request data from us in the context of an analysis proposal:
Variables in this dataset have one of the following scale levels:
For continuous variables, the units (e.g., cm) are usually given in square brackets following the variable description([]). Ordinal or categorical variables often have a list of their levels/categories in square brackets.
Please note that for ordinal (factor) variables, “-999” (if applicable) constitutes a factor level itself. Care should thus be taken not to analyze the -999 level together with the other ordinal levels.
Dichotomous variables are usually coded “Y” (yes) and “N” (no), if not mentioned otherwise.
Checkboxes are either checked (coded “Y”) or “-999”.
Important: When analyzing GAF or other continuous or ordinal variables containing “-999”, please keep in mind that the “-999” will falsify your analysis, if you do not recode it.
We now provide the dataset both in wide format (one row corresponds to one individual), and in long format (in which each row represents a study visit of one individual).
The variable names given in this codebook refer to the variables in the wide format dataset. These have a “vX_” prefix, where “X” indicates the particular study visit. In long format, variables that were measured multiple times (e.g., PANSS) do not have this prefix in the variable names (but the prefix is still present in cross-sectionally measured variables).
The wide format dataset is contained in the file “230614_v6.0_psycourse_wd.RData”, the long format dataset is contained in the file “230614_v6.0_psycourse_ln.RData”.
Also, .csv files are provided (“230614_v6.0_psycourse_wd.csv” and “230614_v6.0_psycourse_ln.csv). The field separator used in the .csv files is tab. Please note that information on scale levels is lost when using the .csv files. We recommend to analyze these data with the R software, using the”.RData” files.
Additionally, we now also provide the raw (i.e. unmodified) data on medication and illicit drugs as separate (sub-)datasets. These data are provided separately for each visit and separately for clinical and control participants.
The datasets containing the raw data on medication have the following names:
Clinical participants
- 230614_v6.0_psycourse_clin_raw_med_visit1.csv (see also here)
- 230614_v6.0_psycourse_clin_raw_med_visit2.csv (see also here)
- 230614_v6.0_psycourse_clin_raw_med_visit3.csv (see also here)
- 230614_v6.0_psycourse_clin_raw_med_visit4.csv (see also here)
Control participants
- 230614_v6.0_psycourse_con_raw_med_visit1.csv (see also here)
- 230614_v6.0_psycourse_con_raw_med_visit2.csv (see also here)
- 230614_v6.0_psycourse_con_raw_med_visit3.csv (see also here)
- 230614_v6.0_psycourse_con_raw_med_visit4.csv (see also here)
The datasets containing the raw data on illicit drugs have the following names:
Clinical participants
- 230614_v6.0_psycourse_clin_raw_ill_drg_visit1.csv (see also here)
- 230614_v6.0_psycourse_clin_raw_ill_drg_visit2.csv (see also here)
- 230614_v6.0_psycourse_clin_raw_ill_drg_visit3.csv (see also here)
- 230614_v6.0_psycourse_clin_raw_ill_drg_visit4.csv (see also here)
Control participants
- 230614_v6.0_psycourse_con_raw_ill_drg_visit1.csv (see also here)
- 230614_v6.0_psycourse_con_raw_ill_drg_visit2.csv (see also here)
- 230614_v6.0_psycourse_con_raw_ill_drg_visit3.csv (see also here)
- 230614_v6.0_psycourse_con_raw_ill_drg_visit4.csv (see also here)
A number of biological analyses have been carried out. Information on these can be found in this section of the codebook.
This dataset was created from exports of our phenotype databases. Recruitment and data entry into these databases is complete. The following tests/variables in these source data have been checked for data entry errors: Diagnosis according to DSM-IV, Childhood Trauma Screener, Opcrit Item 90, ALDA Scale, IDS-C30, YMRS, PANSS, and the result sheet summarizing all cognitive tests.
Even though we do our best to be as accurate as possible, both this codebook and the dataset may contain errors.
For example, the re-coding of many variables introduces errors. Therefore, it is mandatory to check the data you are analyzing carefully, and to contact us if suspicion arises, or if errors are found.
Again, please be sure to inspect the data you are analyzing carefully.
Investigators are encouraged to regularly check the PsyCourse website, to make sure they use the latest version of the codebook/dataset. Errors in the codebook/dataset will be uploaded to the repository in which the codebook is deposited, until a new version of the codebook/dataset has been published.
In the following table, “cl” means a test was only measured in clinical participants, “cn” that a test was only measured in control participants, and “b” that it was measured in both clinical and control participants.
Control individuals were recruited at four clinical centers:
All psychiatric rating scales (PANSS, IDS-C30, YMRS, and GAF) were also assessed in control individuals. However, at the beginning of control recruitment, these rating scales were not included in the assessment protocol. Therefore these data are missing from a subset of control individuals (recruited in the clinical center UMG Göttingen), as is the CAPE-42 (also introduced later). Furthermore, a subset of controls (recruited at the Medical University of Graz) were only assessed at two points in time (at the first and the third visit).
Section | Instrument | Visit 1 | Visit 2 | Visit 3 | Visit 4 |
---|---|---|---|---|---|
Demographic information | b | b | b | b | |
Psychiatric history | cl | ||||
Medication | b | b | b | b | |
ALDA scale | cl1 | ||||
Family history of psychiat. ill. | b | ||||
Physical measures and somatic ill. | b2 | ||||
Substance abuse | b | b | b | b | |
Event triggering first ill. ep. | cl | ||||
Illness episodes between study visits | cl | cl | cl | ||
Life events precipitating ill. ep. | cl | cl | cl | ||
Psych. problems between study visits | cn | cn | cn | ||
Screening for psychiatric disorders | MINI-DIPS | cn3 | |||
DSM-IV Diagnosis | SCID I Depression | cl | |||
SCID I Hypo-/Mania | cl | ||||
SCID I Psychosis | cl | ||||
SCID I Suicidality | cl | cl | cl | cl | |
Neuropsychology (cognitive tests) | Trail-Making-Test | b | b | b | b |
Verbal digit span | b | b | b | b | |
Digit-symbol-test | b | b | b | b | |
MWT-B | b | ||||
VLMT | b | b | b | ||
Rating scales | PANSS | b | b | b | b |
IDS-C30 | b | b | b | b | |
YMRS | b | b | b | b | |
CGI | cl | cl | cl | cl | |
GAF | b | b | b | b | |
OPCRIT item 90 | cl | ||||
Questionnaires | SF-12 | cn | cn | cn | cn |
CAPE-42 | cn | ||||
Religious beliefs | b | b4 | |||
Med. adherence | cl | cl | cl | cl | |
CTS | b | ||||
BDI-II | b | b | b | b | |
ASRM | b | b | b | b | |
MSS | b | b | b | b | |
LEQ | b | b | b | b | |
WHOQOL-BREF | b | b | b | b | |
Personality | b |
Briefly, adult (minimum age 18 years) control and clinical participants were recruited. Clinical participants with the following ICD-10 diagnoses were recruited: schizophrenia (F20.X), acute and transient psychotic disorder (F23.X), schizoaffective disorder (F25.X), bipolar disorder (F31.X), manic episode (F30.X) and recurrent depressive disorder (F33.X). After conducting the SCID Interview (part of the first study visit), we ascertained that participants met one of the following corresponding DSM-IV diagnoses: schizophrenia (295.1/.2/.3/.6/.9), schizophreniform disorder (295.4), brief psychotic disorder (298.8), schizoaffective disorder (295.7), bipolar disorder (296.X [bipolar disorders incl. manic episode]) or recurrent major depression (296.3). If the DSM-IV diagnosis ascertained through SCID interview differed from the aforementioned DSM-IV diagnostic categories, the participant was excluded. Control participants were excluded from the study if they had ever been treated as inpatient for one of the investigated ICD-10 diagnoses.
Please note that in a subset of PsyCourse participants (“MImicSS”), diagnoses were not reassessed within the DSM-IV framework. This is described in the respective section.
Functions that are needed to recode variables from the original dataset to the described variables are defined here. This section is not relevant for people that want only to analyze data.
library("sjmisc") #neccessary for row_sum function
## Install package "strengejacke" from GitHub (`devtools::install_github("strengejacke/strengejacke")`) to load all sj-packages at once!
desc <- function(x) {
noquote(cbind(c("No. cases", "Percent"),rbind(summary(x),
round(summary(x)/length(x)*100,1)),
c(length(x),sum(summary(x)/length(x)*100))))
}
descT <- function(x) {
noquote(cbind(c("No. cases", "Percent"),rbind(table(x, useNA="ifany"),
round(table(x,useNA="ifany")/length(x)*100,1)),
c(length(x),sum(table(x, useNA="ifany")/length(x)*100))))
}
as.numeric.factor <- function(x) {as.numeric(levels(x))[x]}
CAPE-42 A and B items
#First argument w/o quotes, second with quotes
v1_cape_recode <- function(cape_old_name,cape_new_name) {
itm_cape<-ifelse((is.na(v1_con$v1_cape_cape_korrekt) | v1_con$v1_cape_cape_korrekt!=2),
cape_old_name,NA)
all_itm_cape<-c(rep(-999,dim(v1_clin)[1]),itm_cape) #add -999 for clinical subjects
assign(cape_new_name,all_itm_cape,envir=.GlobalEnv)
descT(all_itm_cape)}
SF-12 items, Visit 1
#First argument w/o quotes, second with quotes
v1_sf12_recode <- function(v1_sf12_old_name,v1_sf12_new_name) {
itm_sf12<-ifelse((is.na(v1_con$v1_sf12_sf12_korrekt) | v1_con$v1_sf12_sf12_korrekt!=2),
v1_sf12_old_name,NA)
v1_all_itm_sf12<-c(rep(-999,dim(v1_clin)[1]),itm_sf12) #add -999 for clinical subjects
assign(v1_sf12_new_name,v1_all_itm_sf12,envir=.GlobalEnv)
descT(v1_all_itm_sf12)}
SF-12 items, Visit 2
#First argument w/o quotes, second with quotes
v2_sf12_recode <- function(v2_sf12_old_name,v2_sf12_new_name) {
itm_sf12<-ifelse((is.na(v2_con$v2_sf12_sf12_korrekt) | v2_con$v2_sf12_sf12_korrekt!=2),
v2_sf12_old_name,NA)
v2_all_itm_sf12<-c(rep(-999,dim(v2_clin)[1]),itm_sf12) #add -999 for clinical subjects
assign(v2_sf12_new_name,v2_all_itm_sf12,envir=.GlobalEnv)
descT(v2_all_itm_sf12)}
SF-12 items, Visit 3
#First argument w/o quotes, second with quotes
v3_sf12_recode <- function(v3_sf12_old_name,v3_sf12_new_name) {
itm_sf12<-ifelse((is.na(v3_con$v3_sf12_sf12_korrekt) | v3_con$v3_sf12_sf12_korrekt!=2),
v3_sf12_old_name,NA)
v3_all_itm_sf12<-c(rep(-999,dim(v3_clin)[1]),itm_sf12) #add -999 for clinical subjects
assign(v3_sf12_new_name,v3_all_itm_sf12,envir=.GlobalEnv)
descT(v3_all_itm_sf12)}
SF-12 items, Visit 4
#First argument w/o quotes, second with quotes
v4_sf12_recode <- function(v4_sf12_old_name,v4_sf12_new_name) {
itm_sf12<-ifelse((is.na(v4_con$v4_sf12_sf12_korrekt) | v4_con$v4_sf12_sf12_korrekt!=2),
v4_sf12_old_name,NA)
v4_all_itm_sf12<-c(rep(-999,dim(v4_clin)[1]),itm_sf12) #add -999 for clinical subjects
assign(v4_sf12_new_name,v4_all_itm_sf12,envir=.GlobalEnv)
descT(v4_all_itm_sf12)}
BDI-2 items, Visit 1
#First and second arguments w/o quotes, third with quotes
v1_bdi2_recode <- function(bdi2_clin_old_name,bdi2_con_old_name,bdi2_new_name) {
v1_itm_bdi2_chk_clin<-v1_clin$v1_bdi2_s1_verwer_fragebogen
v1_itm_bdi2_chk_con<-v1_con$v1_bdi2_s1_bdi_korrekt
v1_itm_bdi2_clin<-ifelse((is.na(v1_itm_bdi2_chk_clin) | v1_itm_bdi2_chk_clin!=2),
bdi2_clin_old_name,NA)
v1_itm_bdi2_con<-ifelse((is.na(v1_itm_bdi2_chk_con) | v1_itm_bdi2_chk_con!=2),
bdi2_con_old_name,NA)
v1_all_itm_bdi2<-factor(c(v1_itm_bdi2_clin,v1_itm_bdi2_con),ordered=T)
assign(bdi2_new_name,v1_all_itm_bdi2,envir=.GlobalEnv)
descT(v1_all_itm_bdi2)}
BDI-2 items, Visit 2
#First and second arguments w/o quotes, third with quotes
v2_bdi2_recode <- function(bdi2_clin_old_name,bdi2_con_old_name,bdi2_new_name) {
v2_itm_bdi2_chk_clin<-v2_clin$v2_bdi2_s1_verwer_fragebogen
v2_itm_bdi2_chk_con<-v2_con$v2_bdi2_s1_bdi_korrekt
v2_itm_bdi2_clin<-ifelse((is.na(v2_itm_bdi2_chk_clin) | v2_itm_bdi2_chk_clin!=2),
bdi2_clin_old_name,NA)
v2_itm_bdi2_con<-ifelse((is.na(v2_itm_bdi2_chk_con) | v2_itm_bdi2_chk_con!=2),
bdi2_con_old_name,NA)
v2_all_itm_bdi2<-factor(c(v2_itm_bdi2_clin,v2_itm_bdi2_con),ordered=T)
assign(bdi2_new_name,v2_all_itm_bdi2,envir=.GlobalEnv)
descT(v2_all_itm_bdi2)}
BDI-2 items, Visit 3
#First and second arguments w/o quotes, third with quotes
v3_bdi2_recode <- function(bdi2_clin_old_name,bdi2_con_old_name,bdi2_new_name) {
v3_itm_bdi2_chk_clin<-v3_clin$v3_bdi2_s1_verwer_fragebogen
v3_itm_bdi2_chk_con<-v3_con$v3_bdi2_s1_bdi_korrekt
v3_itm_bdi2_clin<-ifelse((is.na(v3_itm_bdi2_chk_clin) | v3_itm_bdi2_chk_clin!=2),
bdi2_clin_old_name,NA)
v3_itm_bdi2_con<-ifelse((is.na(v3_itm_bdi2_chk_con) | v3_itm_bdi2_chk_con!=2),
bdi2_con_old_name,NA)
v3_all_itm_bdi2<-factor(c(v3_itm_bdi2_clin,v3_itm_bdi2_con),ordered=T)
assign(bdi2_new_name,v3_all_itm_bdi2,envir=.GlobalEnv)
descT(v3_all_itm_bdi2)}
BDI-2 items, Visit 4
#First and second arguments w/o quotes, third with quotes
v4_bdi2_recode <- function(bdi2_clin_old_name,bdi2_con_old_name,bdi2_new_name) {
v4_itm_bdi2_chk_clin<-v4_clin$v4_bdi2_s1_verwer_fragebogen
v4_itm_bdi2_chk_con<-v4_con$v4_bdi2_s1_bdi_korrekt
v4_itm_bdi2_clin<-ifelse((is.na(v4_itm_bdi2_chk_clin) | v4_itm_bdi2_chk_clin!=2),
bdi2_clin_old_name,NA)
v4_itm_bdi2_con<-ifelse((is.na(v4_itm_bdi2_chk_con) | v4_itm_bdi2_chk_con!=2),
bdi2_con_old_name,NA)
v4_all_itm_bdi2<-factor(c(v4_itm_bdi2_clin,v4_itm_bdi2_con),ordered=T)
assign(bdi2_new_name,v4_all_itm_bdi2,envir=.GlobalEnv)
descT(v4_all_itm_bdi2)}
ASRM items, Visit 1
#First and second arguments w/o quotes, second with quotes
v1_asrm_recode <- function(asrm_clin_old_name,asrm_con_old_name,asrm_new_name) {
v1_itm_asrm_chk_clin<-v1_clin$v1_asrm_verwer_fragebogen
v1_itm_asrm_chk_con<-v1_con$v1_asrm_asrm_korrekt
v1_itm_asrm_clin<-ifelse((is.na(v1_itm_asrm_chk_clin) | v1_itm_asrm_chk_clin!=2),
asrm_clin_old_name,NA)
v1_itm_asrm_con<-ifelse((is.na(v1_itm_asrm_chk_con) | v1_itm_asrm_chk_con!=2),
asrm_con_old_name,NA)
v1_all_itm_asrm<-factor(c(v1_itm_asrm_clin,v1_itm_asrm_con),ordered=T)
assign(asrm_new_name,v1_all_itm_asrm,envir=.GlobalEnv)
descT(v1_all_itm_asrm)}
ASRM items, Visit 2
#First and second arguments w/o quotes, second with quotes
v2_asrm_recode <- function(asrm_clin_old_name,asrm_con_old_name,asrm_new_name) {
v2_itm_asrm_chk_clin<-v2_clin$v2_asrm_verwer_fragebogen
v2_itm_asrm_chk_con<-v2_con$v2_asrm_asrm_korrekt
v2_itm_asrm_clin<-ifelse((is.na(v2_itm_asrm_chk_clin) | v2_itm_asrm_chk_clin!=2),
asrm_clin_old_name,NA)
v2_itm_asrm_con<-ifelse((is.na(v2_itm_asrm_chk_con) | v2_itm_asrm_chk_con!=2),
asrm_con_old_name,NA)
v2_all_itm_asrm<-factor(c(v2_itm_asrm_clin,v2_itm_asrm_con),ordered=T)
assign(asrm_new_name,v2_all_itm_asrm,envir=.GlobalEnv)
descT(v2_all_itm_asrm)}
ASRM items, Visit 3
#First and second arguments w/o quotes, second with quotes
v3_asrm_recode <- function(asrm_clin_old_name,asrm_con_old_name,asrm_new_name) {
v3_itm_asrm_chk_clin<-v3_clin$v3_asrm_verwer_fragebogen
v3_itm_asrm_chk_con<-v3_con$v3_asrm_asrm_korrekt
v3_itm_asrm_clin<-ifelse((is.na(v3_itm_asrm_chk_clin) | v3_itm_asrm_chk_clin!=2),
asrm_clin_old_name,NA)
v3_itm_asrm_con<-ifelse((is.na(v3_itm_asrm_chk_con) | v3_itm_asrm_chk_con!=2),
asrm_con_old_name,NA)
v3_all_itm_asrm<-factor(c(v3_itm_asrm_clin,v3_itm_asrm_con),ordered=T)
assign(asrm_new_name,v3_all_itm_asrm,envir=.GlobalEnv)
descT(v3_all_itm_asrm)}
ASRM items, Visit 4
#First and second arguments w/o quotes, second with quotes
v4_asrm_recode <- function(asrm_clin_old_name,asrm_con_old_name,asrm_new_name) {
v4_itm_asrm_chk_clin<-v4_clin$v4_asrm_verwer_fragebogen
v4_itm_asrm_chk_con<-v4_con$v4_asrm_asrm_korrekt
v4_itm_asrm_clin<-ifelse((is.na(v4_itm_asrm_chk_clin) | v4_itm_asrm_chk_clin!=2),
asrm_clin_old_name,NA)
v4_itm_asrm_con<-ifelse((is.na(v4_itm_asrm_chk_con) | v4_itm_asrm_chk_con!=2),
asrm_con_old_name,NA)
v4_all_itm_asrm<-factor(c(v4_itm_asrm_clin,v4_itm_asrm_con),ordered=T)
assign(asrm_new_name,v4_all_itm_asrm,envir=.GlobalEnv)
descT(v4_all_itm_asrm)}
MSS items, Visit 1
#First and second arguments w/o quotes, third with quotes
v1_mss_recode <- function(mss_clin_old_name,mss_con_old_name,mss_new_name) {
v1_itm_mss_chk_clin<-v1_clin$v1_mss_s1_verwer_fragebogen
v1_itm_mss_chk_con<-v1_con$v1_mss_s1_mss_korrekt
v1_itm_mss_clin<-ifelse((is.na(v1_itm_mss_chk_clin) | v1_itm_mss_chk_clin!=2),
mss_clin_old_name,NA)
v1_itm_mss_con<-ifelse((is.na(v1_itm_mss_chk_con) | v1_itm_mss_chk_con!=2),
mss_con_old_name,NA)
v1_all_itm_mss<-c(v1_itm_mss_clin,v1_itm_mss_con)
v1_all_itm_mss<-factor(ifelse(v1_all_itm_mss==1,"Y","N"))
assign(mss_new_name,v1_all_itm_mss,envir=.GlobalEnv)
descT(v1_all_itm_mss)}
MSS items, Visit 2
#First and second arguments w/o quotes, third with quotes
v2_mss_recode <- function(mss_clin_old_name,mss_con_old_name,mss_new_name) {
v2_itm_mss_chk_clin<-v2_clin$v2_mss_s1_verwer_fragebogen
v2_itm_mss_chk_con<-v2_con$v2_mss_s1_mss_korrekt
v2_itm_mss_clin<-ifelse((is.na(v2_itm_mss_chk_clin) | v2_itm_mss_chk_clin!=2),
mss_clin_old_name,NA)
v2_itm_mss_con<-ifelse((is.na(v2_itm_mss_chk_con) | v2_itm_mss_chk_con!=2),
mss_con_old_name,NA)
v2_all_itm_mss<-c(v2_itm_mss_clin,v2_itm_mss_con)
v2_all_itm_mss<-factor(ifelse(v2_all_itm_mss==1,"Y","N"))
assign(mss_new_name,v2_all_itm_mss,envir=.GlobalEnv)
descT(v2_all_itm_mss)}
MSS items, Visit 3
#First and second arguments w/o quotes, third with quotes
v3_mss_recode <- function(mss_clin_old_name,mss_con_old_name,mss_new_name) {
v3_itm_mss_chk_clin<-v3_clin$v3_mss_s1_verwer_fragebogen
v3_itm_mss_chk_con<-v3_con$v3_mss_s1_mss_korrekt
v3_itm_mss_clin<-ifelse((is.na(v3_itm_mss_chk_clin) | v3_itm_mss_chk_clin!=2),
mss_clin_old_name,NA)
v3_itm_mss_con<-ifelse((is.na(v3_itm_mss_chk_con) | v3_itm_mss_chk_con!=2),
mss_con_old_name,NA)
v3_all_itm_mss<-c(v3_itm_mss_clin,v3_itm_mss_con)
v3_all_itm_mss<-factor(ifelse(v3_all_itm_mss==1,"Y","N"))
assign(mss_new_name,v3_all_itm_mss,envir=.GlobalEnv)
descT(v3_all_itm_mss)}
MSS items, Visit 4
#First and second arguments w/o quotes, third with quotes
v4_mss_recode <- function(mss_clin_old_name,mss_con_old_name,mss_new_name) {
v4_itm_mss_chk_clin<-v4_clin$v4_mss_s1_verwer_fragebogen
v4_itm_mss_chk_con<-v4_con$v4_mss_s1_mss_korrekt
v4_itm_mss_clin<-ifelse((is.na(v4_itm_mss_chk_clin) | v4_itm_mss_chk_clin!=2),
mss_clin_old_name,NA)
v4_itm_mss_con<-ifelse((is.na(v4_itm_mss_chk_con) | v4_itm_mss_chk_con!=2),
mss_con_old_name,NA)
v4_all_itm_mss<-c(v4_itm_mss_clin,v4_itm_mss_con)
v4_all_itm_mss<-factor(ifelse(v4_all_itm_mss==1,"Y","N"))
assign(mss_new_name,v4_all_itm_mss,envir=.GlobalEnv)
descT(v4_all_itm_mss)}
LEQ A Items, Visit 1
#First and second arguments w/o quotes, third with quotes
v1_leq_a_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v1_itm_leq_chk_clin<-v1_clin$v1_leq_a_verwer_fragebogen
v1_itm_leq_chk_con<-v1_con$v1_leq_a_leq_korrekt
v1_itm_leq_clin<-rep(NA,dim(v1_clin)[1])
v1_itm_leq_con<-rep(NA,dim(v1_con)[1])
v1_itm_leq_clin<-ifelse(((is.na(v1_itm_leq_chk_clin) | v1_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)==F),
leq_clin_old_name,
ifelse(((is.na(v1_itm_leq_chk_clin) | v1_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)), -999, v1_itm_leq_clin))
v1_itm_leq_con<-ifelse(((is.na(v1_itm_leq_chk_con) | v1_itm_leq_chk_con!=2) & is.na(leq_con_old_name)==F),
leq_con_old_name,
ifelse(((is.na(v1_itm_leq_chk_con) | v1_itm_leq_chk_con!=2) & is.na(leq_con_old_name)), -999, v1_itm_leq_con))
v1_all_itm_leq<-c(v1_itm_leq_clin,v1_itm_leq_con)
v1_all_itm_leq[v1_all_itm_leq==1]<-"good"
v1_all_itm_leq[v1_all_itm_leq==0]<-"bad"
v1_all_itm_leq<-factor(v1_all_itm_leq)
assign(leq_new_name,v1_all_itm_leq,envir=.GlobalEnv)
descT(v1_all_itm_leq)}
LEQ A Items, Visit 2
#First and second arguments w/o quotes, third with quotes
v2_leq_a_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v2_itm_leq_chk_clin<-v2_clin$v2_leq_a_verwer_fragebogen
v2_itm_leq_chk_con<-v2_con$v2_leq_a_leq_korrekt
v2_itm_leq_clin<-rep(NA,dim(v2_clin)[1])
v2_itm_leq_con<-rep(NA,dim(v2_con)[1])
v2_itm_leq_clin<-ifelse(is.na(v2_clin$v2_ausschluss1_rekr_datum), NA,
ifelse(((is.na(v2_itm_leq_chk_clin) | v2_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)==F),leq_clin_old_name,
ifelse(((is.na(v2_itm_leq_chk_clin) | v2_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)), -999, v2_itm_leq_clin)))
v2_itm_leq_con<-ifelse(is.na(v2_con$v2_rekru_visit_rekr_datum), NA,
ifelse(((is.na(v2_itm_leq_chk_con) | v2_itm_leq_chk_con!=2) & is.na(leq_con_old_name)==F),leq_con_old_name,
ifelse(((is.na(v2_itm_leq_chk_con) | v2_itm_leq_chk_con!=2) & is.na(leq_con_old_name)), -999, v2_itm_leq_con)))
v2_all_itm_leq<-c(v2_itm_leq_clin,v2_itm_leq_con)
v2_all_itm_leq[v2_all_itm_leq==1]<-"good"
v2_all_itm_leq[v2_all_itm_leq==0]<-"bad"
v2_all_itm_leq<-factor(v2_all_itm_leq)
assign(leq_new_name,v2_all_itm_leq,envir=.GlobalEnv)
descT(v2_all_itm_leq)}
LEQ A Items, Visit 3
#First and second arguments w/o quotes, third with quotes
v3_leq_a_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v3_itm_leq_chk_clin<-v3_clin$v3_leq_a_verwer_fragebogen
v3_itm_leq_chk_con<-v3_con$v3_leq_a_leq_korrekt
v3_itm_leq_clin<-rep(NA,dim(v3_clin)[1])
v3_itm_leq_con<-rep(NA,dim(v3_con)[1])
v3_itm_leq_clin<-ifelse(is.na(v3_clin$v3_ausschluss1_rekr_datum), NA,
ifelse(((is.na(v3_itm_leq_chk_clin) | v3_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)==F),leq_clin_old_name,
ifelse(((is.na(v3_itm_leq_chk_clin) | v3_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)), -999, v3_itm_leq_clin)))
v3_itm_leq_con<-ifelse(is.na(v3_con$v3_rekru_visit_rekr_datum), NA,
ifelse(((is.na(v3_itm_leq_chk_con) | v3_itm_leq_chk_con!=2) & is.na(leq_con_old_name)==F),leq_con_old_name,
ifelse(((is.na(v3_itm_leq_chk_con) | v3_itm_leq_chk_con!=2) & is.na(leq_con_old_name)), -999, v3_itm_leq_con)))
v3_all_itm_leq<-c(v3_itm_leq_clin,v3_itm_leq_con)
v3_all_itm_leq[v3_all_itm_leq==1]<-"good"
v3_all_itm_leq[v3_all_itm_leq==0]<-"bad"
v3_all_itm_leq<-factor(v3_all_itm_leq)
assign(leq_new_name,v3_all_itm_leq,envir=.GlobalEnv)
descT(v3_all_itm_leq)}
LEQ A Items, Visit 4
#First and second arguments w/o quotes, third with quotes
v4_leq_a_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v4_itm_leq_chk_clin<-v4_clin$v4_leq_a_verwer_fragebogen
v4_itm_leq_chk_con<-v4_con$v4_leq_a_leq_korrekt
v4_itm_leq_clin<-rep(NA,dim(v4_clin)[1])
v4_itm_leq_con<-rep(NA,dim(v4_con)[1])
v4_itm_leq_clin<-ifelse(is.na(v4_clin$v4_ausschluss1_rekr_datum), NA,
ifelse(((is.na(v4_itm_leq_chk_clin) | v4_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)==F),leq_clin_old_name,
ifelse(((is.na(v4_itm_leq_chk_clin) | v4_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name)), -999, v4_itm_leq_clin)))
v4_itm_leq_con<-ifelse(is.na(v4_con$v4_rekru_visit_rekr_datum), NA,
ifelse(((is.na(v4_itm_leq_chk_con) | v4_itm_leq_chk_con!=2) & is.na(leq_con_old_name)==F),leq_con_old_name,
ifelse(((is.na(v4_itm_leq_chk_con) | v4_itm_leq_chk_con!=2) & is.na(leq_con_old_name)), -999, v4_itm_leq_con)))
v4_all_itm_leq<-c(v4_itm_leq_clin,v4_itm_leq_con)
v4_all_itm_leq[v4_all_itm_leq==1]<-"good"
v4_all_itm_leq[v4_all_itm_leq==0]<-"bad"
v4_all_itm_leq<-factor(v4_all_itm_leq)
assign(leq_new_name,v4_all_itm_leq,envir=.GlobalEnv)
descT(v4_all_itm_leq)}
LEQ B Items, Visit 1
#First and second arguments w/o quotes, third with quotes
v1_leq_b_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v1_itm_leq_chk_clin<-v1_clin$v1_leq_a_verwer_fragebogen
v1_itm_leq_chk_con<-v1_con$v1_leq_a_leq_korrekt
v1_itm_leq_b_clin<-rep(NA,dim(v1_clin)[1])
v1_itm_leq_b_con<-rep(NA,dim(v1_con)[1])
v1_itm_leq_b_clin<-ifelse((is.na(v1_itm_leq_chk_clin) | v1_itm_leq_chk_clin!=2) &
is.na(leq_clin_old_name), -999,
#data present but this LEQ item empty -> -999
ifelse((is.na(v1_itm_leq_chk_clin) | v1_itm_leq_chk_clin!=2) &
!is.na(leq_clin_old_name),leq_clin_old_name,NA))
v1_itm_leq_b_con<-ifelse((is.na(v1_itm_leq_chk_con) | v1_itm_leq_chk_con!=2) &
is.na(leq_con_old_name), -999,
#data present but this LEQ item empty -> -999
ifelse((is.na(v1_itm_leq_chk_con) | v1_itm_leq_chk_con!=2) &
!is.na(leq_con_old_name),leq_con_old_name,NA))
v1_all_itm_leq_b<-factor(c(v1_itm_leq_b_clin,v1_itm_leq_b_con),ordered=T)
assign(leq_new_name,v1_all_itm_leq_b,envir=.GlobalEnv)
descT(v1_all_itm_leq_b)}
LEQ B Items, Visit 2
#First and second arguments w/o quotes, third with quotes
v2_leq_b_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v2_itm_leq_chk_clin<-v2_clin$v2_leq_a_verwer_fragebogen
v2_itm_leq_chk_con<-v2_con$v2_leq_a_leq_korrekt
v2_itm_leq_b_clin<-rep(NA,dim(v2_clin)[1])
v2_itm_leq_b_con<-rep(NA,dim(v2_con)[1])
v2_itm_leq_b_clin<-ifelse(is.na(v2_clin$v2_ausschluss1_rekr_datum), NA,
ifelse((is.na(v2_itm_leq_chk_clin) | v2_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name), -999, #data but LEQ item empty -> -999
ifelse((is.na(v2_itm_leq_chk_clin) | v2_itm_leq_chk_clin!=2) & !is.na(leq_clin_old_name),leq_clin_old_name,NA)))
v2_itm_leq_b_con<-ifelse(is.na(v2_con$v2_rekru_visit_rekr_datum), NA,
ifelse((is.na(v2_itm_leq_chk_con) | v2_itm_leq_chk_con!=2) & is.na(leq_con_old_name), -999, #data but LEQ item empty -> -999
ifelse((is.na(v2_itm_leq_chk_con) | v2_itm_leq_chk_con!=2) & !is.na(leq_con_old_name),leq_con_old_name,NA)))
v2_all_itm_leq_b<-factor(c(v2_itm_leq_b_clin,v2_itm_leq_b_con),ordered=T)
assign(leq_new_name,v2_all_itm_leq_b,envir=.GlobalEnv)
descT(v2_all_itm_leq_b)}
LEQ B Items, Visit 3
#First and second arguments w/o quotes, third with quotes
v3_leq_b_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v3_itm_leq_chk_clin<-v3_clin$v3_leq_a_verwer_fragebogen
v3_itm_leq_chk_con<-v3_con$v3_leq_a_leq_korrekt
v3_itm_leq_b_clin<-rep(NA,dim(v3_clin)[1])
v3_itm_leq_b_con<-rep(NA,dim(v3_con)[1])
v3_itm_leq_b_clin<-ifelse(is.na(v3_clin$v3_ausschluss1_rekr_datum), NA,
ifelse((is.na(v3_itm_leq_chk_clin) | v3_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name), -999, #data but LEQ item empty -> -999
ifelse((is.na(v3_itm_leq_chk_clin) | v3_itm_leq_chk_clin!=2) & !is.na(leq_clin_old_name),leq_clin_old_name,NA)))
v3_itm_leq_b_con<-ifelse(is.na(v3_con$v3_rekru_visit_rekr_datum), NA,
ifelse((is.na(v3_itm_leq_chk_con) | v3_itm_leq_chk_con!=2) & is.na(leq_con_old_name), -999, #data but LEQ item empty -> -999
ifelse((is.na(v3_itm_leq_chk_con) | v3_itm_leq_chk_con!=2) & !is.na(leq_con_old_name),leq_con_old_name,NA)))
v3_all_itm_leq_b<-factor(c(v3_itm_leq_b_clin,v3_itm_leq_b_con),ordered=T)
assign(leq_new_name,v3_all_itm_leq_b,envir=.GlobalEnv)
descT(v3_all_itm_leq_b)}
LEQ B Items, Visit 4
#First and second arguments w/o quotes, third with quotes
v4_leq_b_recode <- function(leq_clin_old_name,leq_con_old_name,leq_new_name) {
v4_itm_leq_chk_clin<-v4_clin$v4_leq_a_verwer_fragebogen
v4_itm_leq_chk_con<-v4_con$v4_leq_a_leq_korrekt
v4_itm_leq_b_clin<-rep(NA,dim(v4_clin)[1])
v4_itm_leq_b_con<-rep(NA,dim(v4_con)[1])
v4_itm_leq_b_clin<-ifelse(is.na(v4_clin$v4_ausschluss1_rekr_datum), NA,
ifelse((is.na(v4_itm_leq_chk_clin) | v4_itm_leq_chk_clin!=2) & is.na(leq_clin_old_name), -999, #data but LEQ item empty -> -999
ifelse((is.na(v4_itm_leq_chk_clin) | v4_itm_leq_chk_clin!=2) & !is.na(leq_clin_old_name),leq_clin_old_name,NA)))
v4_itm_leq_b_con<-ifelse(is.na(v4_con$v4_rekru_visit_rekr_datum), NA,
ifelse((is.na(v4_itm_leq_chk_con) | v4_itm_leq_chk_con!=2) & is.na(leq_con_old_name), -999, #data but LEQ item empty -> -999
ifelse((is.na(v4_itm_leq_chk_con) | v4_itm_leq_chk_con!=2) & !is.na(leq_con_old_name),leq_con_old_name,NA)))
v4_all_itm_leq_b<-factor(c(v4_itm_leq_b_clin,v4_itm_leq_b_con),ordered=T)
assign(leq_new_name,v4_all_itm_leq_b,envir=.GlobalEnv)
descT(v4_all_itm_leq_b)}
WHOQOL-BREF Items, Visit 1
#First and second arguments w/o quotes, third with quotes
v1_quol_recode <- function(quol_clin_old_name,quol_con_old_name,quol_new_name,recode) {
v1_itm_quol_chk_clin<-v1_clin$v1_whoqol_bref_verwer_fragebogen
v1_itm_quol_chk_con<-v1_con$v1_whoqol_bref_whoqol_korrekt
v1_itm_quol_clin<-ifelse((is.na(v1_itm_quol_chk_clin) | v1_itm_quol_chk_clin!=2),
quol_clin_old_name,NA)
v1_itm_quol_con<-ifelse((is.na(v1_itm_quol_chk_con) | v1_itm_quol_chk_con!=2),
quol_con_old_name,NA)
if(recode==0) {v1_all_itm_quol<-factor(c(v1_itm_quol_clin,v1_itm_quol_con),ordered=T)}
else {v1_all_itm_quol<-factor(6-c(v1_itm_quol_clin,v1_itm_quol_con),ordered=T)}
assign(quol_new_name,v1_all_itm_quol,envir=.GlobalEnv)
desc(v1_all_itm_quol)}
WHOQOL-BREF Items, Visit 2
#First and second arguments w/o quotes, third with quotes
v2_quol_recode <- function(quol_clin_old_name,quol_con_old_name,quol_new_name,recode) {
v2_itm_quol_chk_clin<-v2_clin$v2_whoqol_bref_verwer_fragebogen
v2_itm_quol_chk_con<-v2_con$v2_whoqol_bref_whoqol_korrekt
v2_itm_quol_clin<-ifelse((is.na(v2_itm_quol_chk_clin) | v2_itm_quol_chk_clin!=2),
quol_clin_old_name,NA)
v2_itm_quol_con<-ifelse((is.na(v2_itm_quol_chk_con) | v2_itm_quol_chk_con!=2),
quol_con_old_name,NA)
if(recode==0) {v2_all_itm_quol<-factor(c(v2_itm_quol_clin,v2_itm_quol_con),ordered=T)}
else {v2_all_itm_quol<-factor(6-c(v2_itm_quol_clin,v2_itm_quol_con),ordered=T)}
assign(quol_new_name,v2_all_itm_quol,envir=.GlobalEnv)
desc(v2_all_itm_quol)}
WHOQOL-BREF Items, Visit 3
#First and second arguments w/o quotes, third with quotes
v3_quol_recode <- function(quol_clin_old_name,quol_con_old_name,quol_new_name,recode) {
v3_itm_quol_chk_clin<-v3_clin$v3_whoqol_bref_verwer_fragebogen
v3_itm_quol_chk_con<-v3_con$v3_whoqol_bref_whoqol_korrekt
v3_itm_quol_clin<-ifelse((is.na(v3_itm_quol_chk_clin) | v3_itm_quol_chk_clin!=2),
quol_clin_old_name,NA)
v3_itm_quol_con<-ifelse((is.na(v3_itm_quol_chk_con) | v3_itm_quol_chk_con!=2),
quol_con_old_name,NA)
if(recode==0) {v3_all_itm_quol<-factor(c(v3_itm_quol_clin,v3_itm_quol_con),ordered=T)}
else {v3_all_itm_quol<-factor(6-c(v3_itm_quol_clin,v3_itm_quol_con),ordered=T)}
assign(quol_new_name,v3_all_itm_quol,envir=.GlobalEnv)
desc(v3_all_itm_quol)}
WHOQOL-BREF Items, Visit 4
#First and second arguments w/o quotes, third with quotes
v4_quol_recode <- function(quol_clin_old_name,quol_con_old_name,quol_new_name,recode) {
v4_itm_quol_chk_clin<-v4_clin$v4_whoqol_bref_verwer_fragebogen
v4_itm_quol_chk_con<-v4_con$v4_whoqol_bref_whoqol_korrekt
v4_itm_quol_clin<-ifelse((is.na(v4_itm_quol_chk_clin) | v4_itm_quol_chk_clin!=2),
quol_clin_old_name,NA)
v4_itm_quol_con<-ifelse((is.na(v4_itm_quol_chk_con) | v4_itm_quol_chk_con!=2),
quol_con_old_name,NA)
if(recode==0) {v4_all_itm_quol<-factor(c(v4_itm_quol_clin,v4_itm_quol_con),ordered=T)}
else {v4_all_itm_quol<-factor(6-c(v4_itm_quol_clin,v4_itm_quol_con),ordered=T)}
assign(quol_new_name,v4_all_itm_quol,envir=.GlobalEnv)
desc(v4_all_itm_quol)}
Big Five Personality Items
#First and second arguments w/o quotes, third with quotes
big_five_recode <- function(big_five_clin_old_name,big_five_con_old_name,big_five_new_name,recode) {
itm_big_five_chk_clin<-v1_clin$v1_bfi_10_verwer_fragebogen
itm_big_five_chk_con<-v1_con$v1_bfi_10_bfi_korrekt
itm_big_five_clin<-ifelse((is.na(itm_big_five_chk_clin) | itm_big_five_chk_clin!=2),
big_five_clin_old_name,NA)
itm_big_five_con<-ifelse((is.na(itm_big_five_chk_con) | itm_big_five_chk_con!=2),
big_five_con_old_name,NA)
if(recode==0) {all_itm_big_five<-factor(c(itm_big_five_clin,itm_big_five_con),ordered=T)}
else {all_itm_big_five<-factor(6-c(itm_big_five_clin,itm_big_five_con),ordered=T)}
assign(big_five_new_name,all_itm_big_five,envir=.GlobalEnv)
desc(all_itm_big_five)}
Life event between study visits, LEQ item number, Visit 2
leq_event_recode_v2<- function(leq_ev_old_name,leq_ev_new_name) {
leq_itm_no<-c(rep(NA,dim(v2_clin)[1]),rep(-999,dim(v2_con)[1]))
leq_itm_no<-ifelse(v2_clin_ill_ep_snc_lst=="Y" & is.na(c(leq_ev_old_name,rep(-999,dim(v2_con)[1])))==F,
c(leq_ev_old_name,rep(-999,dim(v2_con)[1])),
ifelse((v2_clin_ill_ep_snc_lst=="Y" & is.na(c(leq_ev_old_name,rep(-999,dim(v2_con)[1])))) |
v2_clin_ill_ep_snc_lst=="N" | v2_clin_ill_ep_snc_lst=="C",-999,leq_itm_no))
leq_itm_no<-factor(leq_itm_no)
assign(leq_ev_new_name,leq_itm_no,envir=.GlobalEnv)
descT(leq_itm_no)}
Life event between study visits, LEQ item number, Visit 3
leq_event_recode_v3<- function(leq_ev_old_name,leq_ev_new_name) {
leq_itm_no<-c(rep(NA,dim(v3_clin)[1]),rep(-999,dim(v3_con)[1]))
leq_itm_no<-ifelse(v3_clin_ill_ep_snc_lst=="Y" & is.na(c(leq_ev_old_name,rep(-999,dim(v3_con)[1])))==F,
c(leq_ev_old_name,rep(-999,dim(v3_con)[1])),
ifelse((v3_clin_ill_ep_snc_lst=="Y" & is.na(c(leq_ev_old_name,rep(-999,dim(v3_con)[1])))) |
v3_clin_ill_ep_snc_lst=="N" | v3_clin_ill_ep_snc_lst=="C",-999,leq_itm_no))
leq_itm_no<-factor(leq_itm_no)
assign(leq_ev_new_name,leq_itm_no,envir=.GlobalEnv)
descT(leq_itm_no)}
Life event between study visits, LEQ item number, Visit 4
leq_event_recode_v4<- function(leq_ev_old_name,leq_ev_new_name) {
leq_itm_no<-c(rep(NA,dim(v4_clin)[1]),rep(-999,dim(v4_con)[1]))
leq_itm_no<-ifelse(v4_clin_ill_ep_snc_lst=="Y" & is.na(c(leq_ev_old_name,rep(-999,dim(v4_con)[1])))==F,
c(leq_ev_old_name,rep(-999,dim(v4_con)[1])),
ifelse((v4_clin_ill_ep_snc_lst=="Y" & is.na(c(leq_ev_old_name,rep(-999,dim(v4_con)[1])))) |
v4_clin_ill_ep_snc_lst=="N" | v4_clin_ill_ep_snc_lst=="C",-999,leq_itm_no))
leq_itm_no<-factor(leq_itm_no)
assign(leq_ev_new_name,leq_itm_no,envir=.GlobalEnv)
descT(leq_itm_no)}
Life events between study visits, occurred before illness episode, Visit 2
#First argument w/o quotes, second with quotes
b4_event_recode_v2<- function(between_clin_old_name,between_new_name) {
itm_btw<-c(rep(NA,dim(v2_clin)[1]),rep(-999,dim(v2_con)[1]))
itm_btw<-ifelse(v2_clin_ill_ep_snc_lst=="Y" & c(between_clin_old_name,rep(-999,dim(v2_con)[1]))==1,"Y",
ifelse(v2_clin_ill_ep_snc_lst=="Y" & c(between_clin_old_name,rep(-999,dim(v2_con)[1]))==2,"N",-999))
itm_btw<-factor(itm_btw)
assign(between_new_name,itm_btw,envir=.GlobalEnv)
descT(itm_btw)}
Life events between study visits, occurred before illness episode, Visit 3
#First argument w/o quotes, second with quotes
b4_event_recode_v3<- function(between_clin_old_name,between_new_name) {
itm_btw<-c(rep(NA,dim(v3_clin)[1]),rep(-999,dim(v3_con)[1]))
itm_btw<-ifelse(v3_clin_ill_ep_snc_lst=="Y" & c(between_clin_old_name,rep(-999,dim(v3_con)[1]))==1,"Y",
ifelse(v3_clin_ill_ep_snc_lst=="Y" & c(between_clin_old_name,rep(-999,dim(v3_con)[1]))==2,"N",-999))
itm_btw<-factor(itm_btw)
assign(between_new_name,itm_btw,envir=.GlobalEnv)
descT(itm_btw)}
Life events between study visits, occurred before illness episode, Visit 4
#First argument w/o quotes, second with quotes
b4_event_recode_v4<- function(between_clin_old_name,between_new_name) {
itm_btw<-c(rep(NA,dim(v4_clin)[1]),rep(-999,dim(v4_con)[1]))
itm_btw<-ifelse(v4_clin_ill_ep_snc_lst=="Y" & c(between_clin_old_name,rep(-999,dim(v4_con)[1]))==1,"Y",
ifelse(v4_clin_ill_ep_snc_lst=="Y" & c(between_clin_old_name,rep(-999,dim(v4_con)[1]))==2,"N",-999))
itm_btw<-factor(itm_btw)
assign(between_new_name,itm_btw,envir=.GlobalEnv)
descT(itm_btw)}
Life events between study visits, was a preciptitating factor, Visit 2
#First argument w/o quotes, second with quotes
prcp_event_recode_v2<- function(prcp_clin_old_name,prcp_new_name) {
itm_prcp<-c(rep(NA,dim(v2_clin)[1]),rep(-999,dim(v2_con)[1]))
itm_prcp<-ifelse(v2_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v2_con)[1]))==1,"Y",
ifelse(v2_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v2_con)[1]))==2,"N",
ifelse(v2_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v2_con)[1]))==3,"U",-999)))
itm_prcp<-factor(itm_prcp)
assign(prcp_new_name,itm_prcp,envir=.GlobalEnv)
descT(itm_prcp)}
Life events between study visits, was a preciptitating factor, Visit 3
#First argument w/o quotes, second with quotes
prcp_event_recode_v3<- function(prcp_clin_old_name,prcp_new_name) {
itm_prcp<-c(rep(NA,dim(v3_clin)[1]),rep(-999,dim(v3_con)[1]))
itm_prcp<-ifelse(v3_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v3_con)[1]))==1,"Y",
ifelse(v3_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v3_con)[1]))==2,"N",
ifelse(v3_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v3_con)[1]))==3,"U",-999)))
itm_prcp<-factor(itm_prcp)
assign(prcp_new_name,itm_prcp,envir=.GlobalEnv)
descT(itm_prcp)}
Life events between study visits, was a preciptitating factor, Visit 4
#First argument w/o quotes, second with quotes
prcp_event_recode_v4<- function(prcp_clin_old_name,prcp_new_name) {
itm_prcp<-c(rep(NA,dim(v4_clin)[1]),rep(-999,dim(v4_con)[1]))
itm_prcp<-ifelse(v4_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v4_con)[1]))==1,"Y",
ifelse(v4_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v4_con)[1]))==2,"N",
ifelse(v4_clin_ill_ep_snc_lst=="Y" & c(prcp_clin_old_name,rep(-999,dim(v4_con)[1]))==3,"U",-999)))
itm_prcp<-factor(itm_prcp)
assign(prcp_new_name,itm_prcp,envir=.GlobalEnv)
descT(itm_prcp)}
Childhood Trauma Screener
#First and second arguments w/o quotes, third with quotes
cts_recode <- function(cts_clin_old_name,cts_con_old_name,cts_new_name,recode) {
itm_cts_chk_clin<-v3_clin$v3_chidlhood_verwer_fragebogen
itm_cts_chk_con<-v3_con$v3_chidlhood_childhood_korrekt
itm_cts_clin<-ifelse((is.na(itm_cts_chk_clin) | itm_cts_chk_clin!=2),
cts_clin_old_name,NA)
itm_cts_clin[itm_cts_clin==0]<-NA #0 means missing
itm_cts_con<-ifelse((is.na(itm_cts_chk_con) | itm_cts_chk_con!=2),
cts_con_old_name,NA)
itm_cts_con[itm_cts_con==0]<-NA #0 means missing
if(recode==0) {all_itm_cts<-factor(c(itm_cts_clin,itm_cts_con),ordered=T)}
else {all_itm_cts<-factor(6-c(itm_cts_clin,itm_cts_con),ordered=T)}
assign(cts_new_name,all_itm_cts,envir=.GlobalEnv)
desc(all_itm_cts)}
## [1] 1320
## [1] 466
In some participants, an incorrect date of interview was entered into the original phenotype database, which I correct here.
## [1] 20170902
## [1] "20160902"
Clinical participants
Control participants
Combine clincal and control participants Code as factor
v1_center<-factor(c(v1_clin_center,v1_con_center),ordered=F)
Number of participants (clinical and control combined) by recruitment center
descT(v1_center)
## 1 2 3 4 5 6 7 10 11 12 13 14 16 18 19
## [1,] No. cases 19 39 13 5 50 62 32 8 13 36 13 264 378 104 100
## [2,] Percent 1.1 2.2 0.7 0.3 2.8 3.5 1.8 0.4 0.7 2 0.7 14.8 21.2 5.8 5.6
## 20 21 22 23 25
## [1,] 227 147 102 47 127 1786
## [2,] 12.7 8.2 5.7 2.6 7.1 100
par(mar=c(5.1,4.1,2.1,0))
ctr<-barplot(table(v1_center),las=2,ylim=c(0,400),lwd=2,horiz=F,axisnames=F, ylab="Number of baseline interviews", xlab="Study Center")
nmctr<-names(table(v1_center))
text(ctr, par("usr")[3], labels=nmctr, srt = 45, adj = c(1.1,1.1), xpd = TRUE, cex=.8)
Interviewers were de-identified due to data protection requirements.
Clinical participants
Control participants
Combine clincal and control participants
v1_tstlt<-as.factor(c(as.character(v1_clin_int),as.character(v1_con_int)))
Determine number of interviewers (teams counted as separate raters)
length(unique(v1_tstlt))
## [1] 98
Create dataset
v1_rec<-data.frame(v1_stat,v1_center,v1_tstlt,v1_interv_date)
v1_clin_sex<-ifelse(v1_clin$v1_demogr_s1_dem1_ses01_geschl==1,"M","F")
v1_con_sex<-ifelse(v1_con$v1_demo1_sex==1,"M","F")
v1_sex<-c(v1_clin_sex,v1_con_sex)
v1_sex<-as.factor(v1_sex)
descT(v1_sex)
## F M
## [1,] No. cases 869 917 1786
## [2,] Percent 48.7 51.3 100
v1_age_years_clin<-as.numeric(substr(v1_clin$v1_ausschluss_rekr_datum,1,4))-as.numeric(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,1,4))
v1_age_years_clin[v1_age_years_clin==-54]<-46 #correct age of one participant, typo in phenotype database
v1_age_years_con<-as.numeric(substr(v1_con$v1_rek_rekrdat,1,4))-as.numeric(substr(v1_con$v1_demo1_gebdat,1,4))
v1_age_years<-c(v1_age_years_clin,v1_age_years_con)
v1_age<-ifelse(c(as.numeric(substr(v1_clin$v1_ausschluss_rekr_datum,5,6)),as.numeric(substr(v1_con$v1_rek_rekrdat,5,6)))<
c(as.numeric(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,5,6)),as.numeric(substr(v1_con$v1_demo1_gebdat,5,6))),
v1_age_years-1,v1_age_years)
summary(v1_age)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 18.00 28.00 40.00 40.87 52.00 86.00
v1_yob_clin<-as.integer(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,1,4))
v1_yob_con<-as.integer(substr(v1_con$v1_demo1_gebdat,1,4))
v1_yob<-c(v1_yob_clin,v1_yob_con)
summary(v1_yob)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1931 1963 1974 1974 1986 2000
v1_seas_birth_clin<-rep(NA,dim(v1_clin)[1])
v1_seas_birth_clin<-ifelse(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,5,6) %in% c("03","04","05"), "Spring",
ifelse(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,5,6) %in% c("06","07","08"), "Summer",
ifelse(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,5,6) %in% c("09","10","11"), "Fall",
ifelse(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,5,6) %in% c("12","01","02"),"Winter", v1_seas_birth_clin))))
table(v1_seas_birth_clin)
## v1_seas_birth_clin
## Fall Spring Summer Winter
## 340 335 318 327
v1_seas_birth_con<-rep(NA,dim(v1_con)[1])
v1_seas_birth_con<-ifelse(substr(v1_con$v1_demo1_gebdat,5,6) %in% c("03","04","05"), "Spring",
ifelse(substr(v1_con$v1_demo1_gebdat,5,6) %in% c("06","07","08"), "Summer",
ifelse(substr(v1_con$v1_demo1_gebdat,5,6) %in% c("09","10","11"), "Fall",
ifelse(substr(v1_con$v1_demo1_gebdat,5,6) %in% c("12","01","02"),"Winter", v1_seas_birth_con))))
table(v1_seas_birth_con)
## v1_seas_birth_con
## Fall Spring Summer Winter
## 108 144 107 107
v1_seas_birth<-c(v1_seas_birth_clin,v1_seas_birth_con)
v1_seas_birth<-as.factor(v1_seas_birth)
table(v1_seas_birth)
## v1_seas_birth
## Fall Spring Summer Winter
## 448 479 425 434
v1_age_m_birth_clin<-as.integer(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,1,4))-as.integer(
substr(v1_clin$v1_demogr_s1_dem4_geb_m,1,4))
v1_age_m_birth_clin[v1_age_m_birth_clin==0]<-NA #set one case of 0 to NA
v1_age_m_birth_con<-as.integer(substr(v1_con$v1_demo1_gebdat,1,4))-as.integer(substr(v1_con$v1_demo1_mgebdat,1,4))
v1_age_m_birth<-c(v1_age_m_birth_clin,v1_age_m_birth_con)
summary(v1_age_m_birth)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 12.00 24.00 28.00 28.22 32.00 174.00 257
v1_age_f_birth_clin<-as.integer(substr(v1_clin$v1_demogr_s1_dem2_ses02_geb,1,4))-as.integer(substr(v1_clin$v1_demogr_s1_dem5_geb_v,1,4))
v1_age_f_birth_con<-as.integer(substr(v1_con$v1_demo1_gebdat,1,4))-as.integer(substr(v1_con$v1_demo1_vgebdat,1,4))
v1_age_f_birth<-c(v1_age_f_birth_clin,v1_age_f_birth_con)
summary(v1_age_f_birth)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 13.00 27.00 31.00 31.86 36.00 62.00 339
This variable reflects the official/legal German marriage status. It does not neccessarily reflect whether or not an individual has close personal relationships (see next variable).
v1_mar_clin<-v1_clin$v1_demogr_s1_dem6_ses12_famstand
v1_mar_con<-v1_con$v1_demo1_famstand
cat_mar<-c("Married","Married_living_sep","Single","Divorced","Widowed")
v1_marital_stat_clin<-cat_mar[v1_mar_clin]
v1_marital_stat_con<-cat_mar[v1_mar_con]
v1_marital_stat<-as.factor(c(v1_marital_stat_clin,v1_marital_stat_con))
descT(v1_marital_stat)
## Divorced Married Married_living_sep Single Widowed <NA>
## [1,] No. cases 225 380 74 1032 23 52 1786
## [2,] Percent 12.6 21.3 4.1 57.8 1.3 2.9 100
v1_clin_partner<-ifelse(v1_clin$v1_demogr_s1_dem9_ses13_partner==1,"Y","N")
v1_con_partner<-ifelse(v1_con$v1_demo1_partner==1,"Y","N")
v1_partner<-as.factor(c(v1_clin_partner,v1_con_partner))
desc(v1_partner)
## N Y NA's
## [1,] No. cases 795 870 121 1786
## [2,] Percent 44.5 48.7 6.8 100
v1_no_bio_chld<-c(v1_clin$v1_demogr_s1_dem10_ses15a_lkind,v1_con$v1_demo1_lkind)
descT(v1_no_bio_chld)
## 0 1 2 3 4 5 <NA>
## [1,] No. cases 1013 279 210 96 28 4 156 1786
## [2,] Percent 56.7 15.6 11.8 5.4 1.6 0.2 8.7 100
v1_no_adpt_chld<-c(v1_clin$v1_demogr_s1_dem11_ses15b_akind,v1_con$v1_demo1_adkind)
descT(v1_no_adpt_chld)
## 0 1 2 <NA>
## [1,] No. cases 1607 2 2 175 1786
## [2,] Percent 90 0.1 0.1 9.8 100
v1_stp_chld<-c(v1_clin$v1_demogr_s1_dem12_skind,v1_con$v1_demo1_stkind)
descT(v1_stp_chld)
## 0 1 2 3 4 <NA>
## [1,] No. cases 1547 26 27 7 2 177 1786
## [2,] Percent 86.6 1.5 1.5 0.4 0.1 9.9 100
v1_brothers<-c(v1_clin$v1_demogr_s1_dem13_brueder,v1_con$v1_demo1_bruder)
descT(v1_brothers)
## 0 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 627 631 216 65 20 7 2 1 217 1786
## [2,] Percent 35.1 35.3 12.1 3.6 1.1 0.4 0.1 0.1 12.2 100
v1_sisters<-c(v1_clin$v1_demogr_s1_dem13_schwestern,v1_con$v1_demo1_schwester)
descT(v1_sisters)
## 0 1 2 3 4 5 6 7 8 <NA>
## [1,] No. cases 704 579 189 51 9 11 2 2 1 238 1786
## [2,] Percent 39.4 32.4 10.6 2.9 0.5 0.6 0.1 0.1 0.1 13.3 100
v1_hlf_brthrs<-c(v1_clin$v1_demogr_s1_dem13_halbbrueder,v1_con$v1_demo1_hbruder)
descT(v1_hlf_brthrs)
## 0 1 2 3 4 5 6 <NA>
## [1,] No. cases 1285 110 36 17 2 1 1 334 1786
## [2,] Percent 71.9 6.2 2 1 0.1 0.1 0.1 18.7 100
v1_hlf_sstrs<-c(v1_clin$v1_demogr_s1_dem13_halbschwestern,v1_con$v1_demo1_hschwester)
descT(v1_hlf_sstrs)
## 0 1 2 3 4 5 6 9 <NA>
## [1,] No. cases 1276 115 41 9 6 3 1 1 334 1786
## [2,] Percent 71.4 6.4 2.3 0.5 0.3 0.2 0.1 0.1 18.7 100
v1_stp_brthrs<-c(v1_clin$v1_demogr_s1_dem13_as_brueder,v1_con$v1_demo1_adbrueder)
descT(v1_stp_brthrs)
## 0 1 2 3 <NA>
## [1,] No. cases 1396 32 9 1 348 1786
## [2,] Percent 78.2 1.8 0.5 0.1 19.5 100
v1_stp_sstrs<-c(v1_clin$v1_demogr_s1_dem13_as_schwestern,v1_con$v1_demo1_adschwester)
descT(v1_stp_sstrs)
## 0 1 2 3 <NA>
## [1,] No. cases 1392 30 10 3 351 1786
## [2,] Percent 77.9 1.7 0.6 0.2 19.7 100
v1_clin_twin_fam<-ifelse(v1_clin$v1_demogr_s1_dem14_zwillinge==1,"Y","N")
v1_con_twin_fam<-ifelse(v1_con$v1_demo1_zwillinge==1,"Y","N")
v1_twin_fam<-as.factor(c(v1_clin_twin_fam,v1_con_twin_fam))
descT(v1_twin_fam)
## N Y <NA>
## [1,] No. cases 1451 160 175 1786
## [2,] Percent 81.2 9 9.8 100
v1_clin_twin_slf<-ifelse(v1_clin$v1_demogr_s1_dem15_selbst_zwill==1,"Y","N")
v1_con_twin_slf<-ifelse(v1_con$v1_demo1_szwilling==1,"Y","N")
v1_twin_slf<-as.factor(c(v1_clin_twin_slf,v1_con_twin_slf))
descT(v1_twin_slf)
## N Y <NA>
## [1,] No. cases 1570 47 169 1786
## [2,] Percent 87.9 2.6 9.5 100
v1_clin_liv_aln<-ifelse(v1_clin$v1_demogr_s1_dem17_allein==1,"Y","N")
v1_con_liv_aln<-ifelse(v1_con$v1_demo1_allein==1,"Y","N")
v1_liv_aln<-as.factor(c(v1_clin_liv_aln,v1_con_liv_aln))
descT(v1_liv_aln)
## N Y
## [1,] No. cases 1138 648 1786
## [2,] Percent 63.7 36.3 100
Status in the German educational system is assessed in detail. However, many specialized types of German schools are unknown to English-speaking investigators and detailed information does not seem to play a role. Furthermore, high-school and professional education are assessed seperately in the interview. In order to combine the aforementioned types of education, we have transformed both scales to values that can be added together to form an “Educational status” variable. High-school level education was transformed into an ordinal scale from 0 to 3 (people still in high school at the time of the interview are give NA). Professional eduction is also transformed into an ordinal scale from 0 to 3. These two scales are added together to give an ordinal educational status scale ranging from 0 to 6.
The following transformation was used: “no information”/“missing”-NA, “no graduation”-0, “Hauptschule”-1, “Realschule”-2, “Polytechnische Oberschule”-2, “Fachhochschule”-3, “Allgemeine Hochschulreife”-3; still in school”/“other degree”- -999.
NB: Transformation to ordered factor below, after creation of v1_ed_status variable.
v1_clin_school<-rep(NA,dim(v1_clin)[1])
v1_con_school<-rep(NA,dim(v1_con)[1])
v1_clin_school<-ifelse(v1_clin$v1_demogr_s2_dem18_ses18_sabschl %in% c(1:2),v1_clin$v1_demogr_s2_dem18_ses18_sabschl-1,v1_clin_school)
v1_clin_school<-ifelse(v1_clin$v1_demogr_s2_dem18_ses18_sabschl %in% c(3:4),2,v1_clin_school)
v1_clin_school<-ifelse(v1_clin$v1_demogr_s2_dem18_ses18_sabschl %in% c(5:6),3,v1_clin_school)
v1_clin_school<-ifelse(v1_clin$v1_demogr_s2_dem18_ses18_sabschl %in% c(7:8),-999,v1_clin_school)
v1_con_school<-ifelse(v1_con$v1_demo2_abschl %in% c(1:2),v1_con$v1_demo2_abschl-1,v1_con_school)
v1_con_school<-ifelse(v1_con$v1_demo2_abschl %in% c(3:4),2,v1_con_school)
v1_con_school<-ifelse(v1_con$v1_demo2_abschl %in% c(5:6),3,v1_con_school)
v1_con_school<-ifelse(v1_con$v1_demo2_abschl %in% c(7:8),-999,v1_con_school)
v1_school<-c(v1_clin_school,v1_con_school)
descT(v1_school)
## -999 0 1 2 3 <NA>
## [1,] No. cases 24 28 303 402 1012 17 1786
## [2,] Percent 1.3 1.6 17 22.5 56.7 1 100
The following transformation was used: - missing or no
information-NA,
- “no professional education”/“beruflich-betriebliche Anlernzeit, aber
keine Lehre; Teilfacharbeiterabschluss”/“in professional
education”-0,
- “beruflich-betriebliche Ausbildung (Lehre)”-1,
- “beruflich-schulische Ausbildung”-2,
- “Fachhochschul-/Universitätsabschluss”-3,
- “other professional degree” - -999,
NB: Transformation to ordered factor below, after creation of v1_ed_status variable.
v1_clin_prof_dgr<-rep(NA,dim(v1_clin)[1])
v1_con_prof_dgr<-rep(NA,dim(v1_con)[1])
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_aba==1,-999,v1_clin_prof_dgr)
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_kba==1,0,v1_clin_prof_dgr)
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_anlern==1,0,v1_clin_prof_dgr)
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_in_ausb==1,0,v1_clin_prof_dgr)
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_lehre==1,1,v1_clin_prof_dgr)
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_ausb==1,2,v1_clin_prof_dgr)
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_fachs==1,2,v1_clin_prof_dgr)
v1_clin_prof_dgr<-ifelse(v1_clin$v1_demogr_s2_dem19_ses19_fh_uni==1,3,v1_clin_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_a_babschl==1,-999,v1_con_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_kba==1,0,v1_con_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_anlern==1,0,v1_con_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_ausbild==1,0,v1_con_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_lehre==1,1,v1_con_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_ausb==1,2,v1_con_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_fachs==1,2,v1_con_prof_dgr)
v1_con_prof_dgr<-ifelse(v1_con$v1_demo2_fhuni==1,3,v1_con_prof_dgr)
v1_prof_dgr<-c(v1_clin_prof_dgr,v1_con_prof_dgr)
descT(v1_prof_dgr)
## -999 0 1 2 3 <NA>
## [1,] No. cases 17 439 426 365 454 85 1786
## [2,] Percent 1 24.6 23.9 20.4 25.4 4.8 100
Important: more than one answer is possible, as people may have several professional degrees. The order of the commands above makes sure higher professional degrees overwrite lower ones.
As describe above, this scale was newly created.
v1_ed_status<-v1_school+v1_prof_dgr
v1_ed_status[v1_ed_status<0]<-NA
v1_ed_status<-factor(v1_ed_status, ordered=T)
descT(v1_ed_status)
## 0 1 2 3 4 5 6 <NA>
## [1,] No. cases 22 80 251 433 249 182 441 128 1786
## [2,] Percent 1.2 4.5 14.1 24.2 13.9 10.2 24.7 7.2 100
Transform school and professional degree variables to factors.
v1_school<-factor(v1_school, ordered=T)
v1_prof_dgr<-factor(v1_prof_dgr, ordered=T)
Because of several categories that are unique to the Germany labor market, several of answer categories were pooled to arrive at a more clear-cut (Y/N) answer to this question. Thr following transformations were used: “no information”-NA, “full-time”-Y, “part-time”-Y, “partial retirement”-Y, “marginal employment”-Y, “1-euro-job”-Y, “Occassionally/infrequently”-999, “in professional training”-Y, “professional retraining”-Y, “voluntary service/alternative military service”-Y, “maternity leave or other leave”-Y, “not employed”-N.
v1_clin_curr_paid_empl<-rep(NA,dim(v1_clin)[1])
v1_con_curr_paid_empl<-rep(NA,dim(v1_con)[1])
v1_clin_curr_paid_empl<-ifelse(v1_clin$v1_demogr_s2_dem20_ses20_erwbtaet %in% c(1:5,7:10),"Y",v1_clin_curr_paid_empl)
v1_clin_curr_paid_empl<-ifelse(v1_clin$v1_demogr_s2_dem20_ses20_erwbtaet %in% c(6,11),"N",v1_clin_curr_paid_empl)
v1_con_curr_paid_empl<-ifelse(v1_con$v1_demo2_erwerb %in% c(1:5,7:10),"Y",v1_con_curr_paid_empl)
v1_con_curr_paid_empl<-ifelse(v1_con$v1_demo2_erwerb %in% c(6,11),"N",v1_con_curr_paid_empl)
v1_curr_paid_empl<-c(v1_clin_curr_paid_empl,v1_con_curr_paid_empl)
v1_curr_paid_empl<-as.factor(v1_curr_paid_empl)
descT(v1_curr_paid_empl)
## N Y <NA>
## [1,] No. cases 945 767 74 1786
## [2,] Percent 52.9 42.9 4.1 100
v1_clin_disabl_pens<-ifelse(v1_clin$v1_demogr_s2_dem20_ses20_rente==1,"Y","N")
v1_con_disabl_pens<-ifelse(v1_con$v1_demo2_rente==1,"Y","N")
v1_disabl_pens<-as.factor(c(v1_clin_disabl_pens,v1_con_disabl_pens))
descT(v1_disabl_pens)
## N Y <NA>
## [1,] No. cases 853 398 535 1786
## [2,] Percent 47.8 22.3 30 100
v1_clin_spec_emp<-ifelse(v1_clin$v1_demogr_s2_dem20_ses20_werk==1,"Y","N")
v1_con_spec_emp<-ifelse(v1_con$v1_demo2_wfbm==1,"Y","N")
v1_spec_emp<-as.factor(c(v1_clin_spec_emp,v1_con_spec_emp))
descT(v1_spec_emp)
## N Y <NA>
## [1,] No. cases 638 75 1073 1786
## [2,] Percent 35.7 4.2 60.1 100
Cases are set ot -999 in the following cases: 1) Pension, 2) Unknown, 3) Filled out but >60 months are set to -999.
v1_clin_wrk_abs_pst_5_yrs<-ifelse((v1_clin$v1_demogr_s2_dem23_unbekannt==1 | v1_clin$v1_demogr_s2_dem23_rente==1 | v1_clin$v1_demogr_s2_dem23_arbeitsausf>60),-999, v1_clin$v1_demogr_s2_dem23_arbeitsausf)
v1_con_wrk_abs_pst_5_yrs<-ifelse((v1_con$v1_demo2_ausfallu==1 | v1_con$v1_demo2_rente==1 | v1_con$v1_demo2_ausfallm>60),-999, v1_con$v1_demo2_ausfallm)
v1_wrk_abs_pst_5_yrs<-c(v1_clin_wrk_abs_pst_5_yrs,v1_con_wrk_abs_pst_5_yrs)
descT(v1_wrk_abs_pst_5_yrs)
## -999 0 1 2 3 4 5 6 7 8 9 10 11 12 13
## [1,] No. cases 549 363 55 66 42 32 32 51 11 22 14 20 3 41 7
## [2,] Percent 30.7 20.3 3.1 3.7 2.4 1.8 1.8 2.9 0.6 1.2 0.8 1.1 0.2 2.3 0.4
## 14 15 16 17 18 20 22 23 24 25 26 27 28 30 33 35 36 38
## [1,] 3 9 6 3 23 6 3 1 33 1 2 2 1 12 1 2 14 1
## [2,] 0.2 0.5 0.3 0.2 1.3 0.3 0.2 0.1 1.8 0.1 0.1 0.1 0.1 0.7 0.1 0.1 0.8 0.1
## 42 45 48 50 52 54 60 <NA>
## [1,] 3 1 13 2 1 2 41 292 1786
## [2,] 0.2 0.1 0.7 0.1 0.1 0.1 2.3 16.3 100
Important: if receiving pension, this question refers to impairments in the household
v1_clin_cur_work_restr<-ifelse(v1_clin$v1_demogr_s2_dem24_arbeitseinschr==1,"Y","N")
v1_con_cur_work_restr<-ifelse(v1_con$v1_demo2_psyeinsch==1,"Y","N")
v1_cur_work_restr<-as.factor(c(v1_clin_cur_work_restr,v1_con_cur_work_restr))
descT(v1_cur_work_restr)
## N Y <NA>
## [1,] No. cases 732 816 238 1786
## [2,] Percent 41 45.7 13.3 100
Create dataset
v1_dem<-data.frame(v1_sex,v1_age,v1_yob,v1_seas_birth,v1_age_m_birth,v1_age_f_birth,
v1_marital_stat,v1_partner,v1_no_bio_chld,v1_no_adpt_chld,
v1_stp_chld,v1_brothers,v1_sisters,v1_hlf_brthrs,v1_hlf_sstrs,
v1_stp_brthrs,v1_stp_sstrs,v1_twin_fam,v1_twin_slf,v1_liv_aln,
v1_school,v1_prof_dgr,v1_ed_status,v1_curr_paid_empl,
v1_disabl_pens,v1_spec_emp,v1_wrk_abs_pst_5_yrs,v1_cur_work_restr)
v1_clin_cntr_brth<-v1_clin$v1_demogr_s2_dem25_ses03a_lst_lnd
v1_clin_cntr_brth<-ifelse(is.na(v1_clin_cntr_brth) & v1_clin$v1_demogr_s2_dem25_ses03a_land_st==1,
"Deutschland",as.character(v1_clin_cntr_brth))
v1_con_cntr_brth<-v1_con$v1_demo2_land1
v1_con_cntr_brth<-ifelse(is.na(v1_con_cntr_brth) & v1_con$v1_demo2_gebort==1,
"Deutschland",as.character(v1_con$v1_con_cntr_brth))
v1_cntr_brth<-as.factor(c(v1_clin_cntr_brth,v1_con_cntr_brth))
descT(v1_cntr_brth)
## Afghanistan Ägypten anderes Land Argentinien Äthiopien
## [1,] No. cases 1 1 1 1 2
## [2,] Percent 0.1 0.1 0.1 0.1 0.1
## Australien Belarus (Weißrussland) Bosnien und Herzegowina Brasilien
## [1,] 1 1 3 1
## [2,] 0.1 0.1 0.2 0.1
## Deutschland Eritrea Estland Finnland Frankreich Griechenland Irak
## [1,] 1370 2 1 1 2 1 2
## [2,] 76.7 0.1 0.1 0.1 0.1 0.1 0.1
## Iran, Islamische Republik Italien Kasachstan Kirgisistan Kroatien Marokko
## [1,] 3 1 8 2 4 1
## [2,] 0.2 0.1 0.4 0.1 0.2 0.1
## Mazedonien, ehem. jugoslawische Republik Moldawien (Republik Moldau)
## [1,] 2 1
## [2,] 0.1 0.1
## Mongolei Niederlande Nigeria Österreich Pakistan Polen Rumänien
## [1,] 1 1 1 153 1 27 14
## [2,] 0.1 0.1 0.1 8.6 0.1 1.5 0.8
## Russische Föderation Senegal Serbien Slowakei Slowenien Sri Lanka
## [1,] 11 1 9 1 1 1
## [2,] 0.6 0.1 0.5 0.1 0.1 0.1
## Südafrika Tadschikistan Thailand Tschechische Republik Türkei Ukraine
## [1,] 1 1 1 4 9 1
## [2,] 0.1 0.1 0.1 0.2 0.5 0.1
## Ungarn Usbekistan Vereinigte Staaten von Amerika
## [1,] 2 1 2
## [2,] 0.1 0.1 0.1
## Vereinigtes Königreich Großbritannien und Nordirland Vietnam <NA>
## [1,] 2 1 126 1786
## [2,] 0.1 0.1 7.1 100
v1_clin_cntr_brth_m<-v1_clin$v1_demogr_s2_dem26_ses06_lm_lnd
v1_clin_cntr_brth_m<-ifelse(is.na(v1_clin_cntr_brth_m) & v1_clin$v1_demogr_s2_dem26_ses06_land_m==1,
"Deutschland",as.character(v1_clin_cntr_brth_m))
v1_con_cntr_brth_m<-v1_con$v1_demo2_land2
v1_con_cntr_brth_m<-ifelse(is.na(v1_con_cntr_brth_m) & v1_con$v1_demo2_gebortm==1,
"Deutschland",as.character(v1_con_cntr_brth_m))
v1_cntr_brth_m<-as.factor(c(v1_clin_cntr_brth_m,v1_con_cntr_brth_m))
descT(v1_cntr_brth_m)
## Afghanistan Algerien anderes Land Argentinien Äthiopien
## [1,] No. cases 1 1 2 1 2
## [2,] Percent 0.1 0.1 0.1 0.1 0.1
## Belarus (Weißrussland) Belgien Bosnien und Herzegowina Brasilien Bulgarien
## [1,] 2 1 6 1 2
## [2,] 0.1 0.1 0.3 0.1 0.1
## Chile Dänemark Deutschland Eritrea Estland Finnland Frankreich
## [1,] 2 1 1075 2 2 1 2
## [2,] 0.1 0.1 60.2 0.1 0.1 0.1 0.1
## Griechenland Indien Indonesien Irak Iran, Islamische Republik Irland
## [1,] 1 1 2 2 6 1
## [2,] 0.1 0.1 0.1 0.1 0.3 0.1
## Israel Italien Japan Kasachstan Kenia Kirgisistan
## [1,] 1 9 1 9 1 1
## [2,] 0.1 0.5 0.1 0.5 0.1 0.1
## Korea, Republik (Südkorea) Kroatien
## [1,] 1 10
## [2,] 0.1 0.6
## Libysch-Arabische Dschamahirija (Libyen) Litauen Luxemburg Marokko
## [1,] 1 1 3 1
## [2,] 0.1 0.1 0.2 0.1
## Mazedonien, ehem. jugoslawische Republik Mongolei Namibia Niederlande
## [1,] 3 1 2 1
## [2,] 0.2 0.1 0.1 0.1
## Nigeria Norwegen Österreich Pakistan Polen Rumänien Russische Föderation
## [1,] 1 1 199 1 97 16 25
## [2,] 0.1 0.1 11.1 0.1 5.4 0.9 1.4
## Schweiz (Confoederatio Helvetica) Senegal Serbien Singapur Slowakei
## [1,] 2 1 13 1 3
## [2,] 0.1 0.1 0.7 0.1 0.2
## Slowenien Spanien Sri Lanka Thailand Tschechische Republik Türkei Ukraine
## [1,] 5 3 3 1 24 20 10
## [2,] 0.3 0.2 0.2 0.1 1.3 1.1 0.6
## Ungarn Usbekistan Vereinigtes Königreich Großbritannien und Nordirland
## [1,] 12 1 3
## [2,] 0.7 0.1 0.2
## <NA>
## [1,] 181 1786
## [2,] 10.1 100
v1_clin_cntr_brth_f<-v1_clin$v1_demogr_s2_dem27_ses07_lv_lnd
v1_clin_cntr_brth_f<-ifelse(is.na(v1_clin_cntr_brth_f)==T & v1_clin$v1_demogr_s2_dem27_ses07_land_v==1,
"Deutschland",as.character(v1_clin_cntr_brth_f))
v1_con_cntr_brth_f<-v1_con$v1_demo2_land3
v1_con_cntr_brth_f<-ifelse(is.na(v1_con_cntr_brth_f)==T & v1_con$v1_demo2_gebortv==1,
"Deutschland",as.character(v1_con_cntr_brth_f))
v1_cntr_brth_f<-as.factor(c(v1_clin_cntr_brth_f,v1_con_cntr_brth_f))
descT(v1_cntr_brth_f)
## Afghanistan Ägypten anderes Land Argentinien Armenien Äthiopien
## [1,] No. cases 1 1 4 3 1 1
## [2,] Percent 0.1 0.1 0.2 0.2 0.1 0.1
## Australien Belarus (Weißrussland) Belgien Bosnien und Herzegowina
## [1,] 2 1 2 4
## [2,] 0.1 0.1 0.1 0.2
## Bulgarien Chile Deutschland Dominikanische Republik Eritrea Estland
## [1,] 3 3 1034 1 3 3
## [2,] 0.2 0.2 57.9 0.1 0.2 0.2
## Frankreich Griechenland Indien Indonesien Irak Iran, Islamische Republik
## [1,] 5 1 1 1 2 6
## [2,] 0.3 0.1 0.1 0.1 0.1 0.3
## Israel Italien Japan Jemen Kasachstan Kenia Korea, Republik (Südkorea)
## [1,] 1 10 2 1 8 1 1
## [2,] 0.1 0.6 0.1 0.1 0.4 0.1 0.1
## Kroatien Libanon Luxemburg Marokko
## [1,] 5 1 1 2
## [2,] 0.3 0.1 0.1 0.1
## Mazedonien, ehem. jugoslawische Republik Mongolei Namibia Nigeria Norwegen
## [1,] 3 1 2 2 2
## [2,] 0.2 0.1 0.1 0.1 0.1
## Österreich Pakistan Palästinensische Autonomiegebiete Polen Rumänien
## [1,] 209 2 1 114 14
## [2,] 11.7 0.1 0.1 6.4 0.8
## Russische Föderation Senegal Serbien Slowakei Slowenien Spanien Sri Lanka
## [1,] 32 1 9 2 3 1 2
## [2,] 1.8 0.1 0.5 0.1 0.2 0.1 0.1
## Tadschikistan Thailand Tschechische Republik Türkei Ukraine Ungarn
## [1,] 1 1 23 24 8 7
## [2,] 0.1 0.1 1.3 1.3 0.4 0.4
## Usbekistan Vereinigte Staaten von Amerika
## [1,] 1 5
## [2,] 0.1 0.3
## Vereinigtes Königreich Großbritannien und Nordirland <NA>
## [1,] 4 196 1786
## [2,] 0.2 11 100
v1_clin_cntr_brth_gmm<-v1_clin$v1_demogr_s2_dem28_land_gm_ms_lnd
v1_clin_cntr_brth_gmm<-ifelse(is.na(v1_clin_cntr_brth_gmm)==T & v1_clin$v1_demogr_s2_dem28_land_gm_ms==1,
"Deutschland",as.character(v1_clin_cntr_brth_gmm))
v1_con_cntr_brth_gmm<-v1_con$v1_demo2_land4
v1_con_cntr_brth_gmm<-ifelse(is.na(v1_con_cntr_brth_gmm)==T & v1_con$v1_demo2_gebortgmm==1,
"Deutschland",as.character(v1_con_cntr_brth_gmm))
v1_cntr_brth_gmm<-as.factor(c(v1_clin_cntr_brth_gmm,v1_con_cntr_brth_gmm))
descT(v1_cntr_brth_gmm)
## Afghanistan anderes Land Argentinien Äthiopien
## [1,] No. cases 1 2 1 1
## [2,] Percent 0.1 0.1 0.1 0.1
## Belarus (Weißrussland) Belgien Bosnien und Herzegowina Bulgarien Chile
## [1,] 2 1 7 1 2
## [2,] 0.1 0.1 0.4 0.1 0.1
## China, Volksrepublik Dänemark Deutschland Eritrea Estland Finnland
## [1,] 1 2 893 2 2 2
## [2,] 0.1 0.1 50 0.1 0.1 0.1
## Frankreich Georgien Griechenland Indien Indonesien Irak
## [1,] 1 1 3 2 1 2
## [2,] 0.1 0.1 0.2 0.1 0.1 0.1
## Iran, Islamische Republik Israel Italien Japan Kasachstan Kenia Kolumbien
## [1,] 6 2 9 1 5 1 1
## [2,] 0.3 0.1 0.5 0.1 0.3 0.1 0.1
## Korea, Republik (Südkorea) Kroatien Litauen Luxemburg Marokko
## [1,] 1 10 2 3 1
## [2,] 0.1 0.6 0.1 0.2 0.1
## Mazedonien, ehem. jugoslawische Republik Mongolei Namibia Niederlande
## [1,] 3 1 1 3
## [2,] 0.2 0.1 0.1 0.2
## Nigeria Norwegen Österreich Pakistan Polen Rumänien Russische Föderation
## [1,] 1 1 183 1 127 12 21
## [2,] 0.1 0.1 10.2 0.1 7.1 0.7 1.2
## Schweden Schweiz (Confoederatio Helvetica) Senegal Serbien Slowakei
## [1,] 1 3 1 13 2
## [2,] 0.1 0.2 0.1 0.7 0.1
## Slowenien Spanien Sri Lanka Thailand Tschechische Republik Türkei Ukraine
## [1,] 6 4 3 1 34 18 16
## [2,] 0.3 0.2 0.2 0.1 1.9 1 0.9
## Ungarn Usbekistan Vereinigte Staaten von Amerika
## [1,] 15 1 1
## [2,] 0.8 0.1 0.1
## Vereinigtes Königreich Großbritannien und Nordirland <NA>
## [1,] 3 338 1786
## [2,] 0.2 18.9 100
v1_clin_cntr_brth_gfm<-v1_clin$v1_demogr_s2_dem29_land_gv_ms_lnd
v1_clin_cntr_brth_gfm<-ifelse(is.na(v1_clin_cntr_brth_gfm)==T & v1_clin$v1_demogr_s2_dem29_land_gv_ms==1,
"Deutschland",as.character(v1_clin_cntr_brth_gfm))
v1_con_cntr_brth_gfm<-v1_con$v1_demo2_land5
v1_con_cntr_brth_gfm<-ifelse(is.na(v1_con_cntr_brth_gfm)==T & v1_con$v1_demo2_gebortgmv==1,
"Deutschland",as.character(v1_con_cntr_brth_gfm))
v1_cntr_brth_gfm<-as.factor(c(v1_clin_cntr_brth_gfm,v1_con_cntr_brth_gfm))
descT(v1_cntr_brth_gfm)
## Afghanistan anderes Land Argentinien Aserbaidschan Äthiopien
## [1,] No. cases 1 2 1 1 1
## [2,] Percent 0.1 0.1 0.1 0.1 0.1
## Belarus (Weißrussland) Belgien Bosnien und Herzegowina Bulgarien Chile
## [1,] 3 1 7 1 2
## [2,] 0.2 0.1 0.4 0.1 0.1
## China, Volksrepublik Dänemark Deutschland Eritrea Estland Finnland
## [1,] 2 1 821 2 2 1
## [2,] 0.1 0.1 46 0.1 0.1 0.1
## Frankreich Georgien Griechenland Indien Indonesien Irak
## [1,] 3 1 4 2 1 2
## [2,] 0.2 0.1 0.2 0.1 0.1 0.1
## Iran, Islamische Republik Israel Italien Japan Kasachstan Kenia
## [1,] 6 2 7 1 5 1
## [2,] 0.3 0.1 0.4 0.1 0.3 0.1
## Korea, Demokratische Volksrepublik (Nordkorea) Korea, Republik (Südkorea)
## [1,] 1 1
## [2,] 0.1 0.1
## Kroatien Luxemburg Marokko Mazedonien, ehem. jugoslawische Republik
## [1,] 10 3 1 3
## [2,] 0.6 0.2 0.1 0.2
## Mongolei Namibia Niederlande Nigeria Norwegen Österreich Pakistan Polen
## [1,] 1 2 5 1 1 178 1 114
## [2,] 0.1 0.1 0.3 0.1 0.1 10 0.1 6.4
## Rumänien Russische Föderation Schweden Schweiz (Confoederatio Helvetica)
## [1,] 11 26 1 2
## [2,] 0.6 1.5 0.1 0.1
## Senegal Serbien Slowakei Slowenien Spanien Sri Lanka Thailand
## [1,] 1 12 3 5 4 3 1
## [2,] 0.1 0.7 0.2 0.3 0.2 0.2 0.1
## Tschechische Republik Türkei Ukraine Ungarn Usbekistan
## [1,] 24 19 8 16 1
## [2,] 1.3 1.1 0.4 0.9 0.1
## Vereinigte Staaten von Amerika
## [1,] 1
## [2,] 0.1
## Vereinigtes Königreich Großbritannien und Nordirland <NA>
## [1,] 2 440 1786
## [2,] 0.1 24.6 100
v1_clin_cntr_brth_gmf<-v1_clin$v1_demogr_s2_dem30_land_gm_vs_lnd
v1_clin_cntr_brth_gmf<-ifelse(is.na(v1_clin_cntr_brth_gmf)==T & v1_clin$v1_demogr_s2_dem30_land_gm_vs==1,
"Deutschland",as.character(v1_clin_cntr_brth_gmf))
v1_con_cntr_brth_gmf<-v1_con$v1_demo2_land6
v1_con_cntr_brth_gmf<-ifelse(is.na(v1_con_cntr_brth_gmf)==T & v1_con$v1_demo2_gebortgvm==1,
"Deutschland",as.character(v1_con_cntr_brth_gmf))
v1_cntr_brth_gmf<-as.factor(c(v1_clin_cntr_brth_gmf,v1_con_cntr_brth_gmf))
descT(v1_cntr_brth_gmf)
## Afghanistan Ägypten anderes Land Argentinien Australien
## [1,] No. cases 1 1 5 1 1
## [2,] Percent 0.1 0.1 0.3 0.1 0.1
## Belarus (Weißrussland) Belgien Bosnien und Herzegowina Bulgarien Chile
## [1,] 1 1 4 2 3
## [2,] 0.1 0.1 0.2 0.1 0.2
## Dänemark Deutschland Dominikanische Republik Eritrea Estland Frankreich
## [1,] 1 814 1 3 2 6
## [2,] 0.1 45.6 0.1 0.2 0.1 0.3
## Ghana Griechenland Indien Irak Iran, Islamische Republik Israel Italien
## [1,] 1 3 2 2 6 1 10
## [2,] 0.1 0.2 0.1 0.1 0.3 0.1 0.6
## Japan Jemen Kasachstan Kenia Korea, Republik (Südkorea) Kroatien Libanon
## [1,] 2 1 3 1 1 4 2
## [2,] 0.1 0.1 0.2 0.1 0.1 0.2 0.1
## Luxemburg Marokko Mazedonien, ehem. jugoslawische Republik
## [1,] 1 1 3
## [2,] 0.1 0.1 0.2
## Moldawien (Republik Moldau) Mongolei Namibia Niederlande Nigeria Norwegen
## [1,] 2 2 1 2 2 2
## [2,] 0.1 0.1 0.1 0.1 0.1 0.1
## Österreich Pakistan Polen Rumänien Russische Föderation
## [1,] 191 1 109 12 31
## [2,] 10.7 0.1 6.1 0.7 1.7
## Schweiz (Confoederatio Helvetica) Senegal Serbien Slowakei Slowenien
## [1,] 1 1 10 2 4
## [2,] 0.1 0.1 0.6 0.1 0.2
## Spanien Sri Lanka Südafrika Thailand Tschechische Republik Türkei Ukraine
## [1,] 3 2 1 1 29 21 8
## [2,] 0.2 0.1 0.1 0.1 1.6 1.2 0.4
## Ungarn Usbekistan Vereinigte Staaten von Amerika
## [1,] 10 1 4
## [2,] 0.6 0.1 0.2
## Vereinigtes Königreich Großbritannien und Nordirland <NA>
## [1,] 4 438 1786
## [2,] 0.2 24.5 100
v1_clin_cntr_brth_gff<-v1_clin$v1_demogr_s2_dem31_land_gv_vs_lnd
v1_clin_cntr_brth_gff<-ifelse(is.na(v1_clin_cntr_brth_gff)==T & v1_clin$v1_demogr_s2_dem31_land_gv_vs==1,
"Deutschland",as.character(v1_clin_cntr_brth_gff))
v1_con_cntr_brth_gff<-v1_con$v1_demo2_land7
v1_con_cntr_brth_gff<-ifelse(is.na(v1_con_cntr_brth_gff)==T & v1_con$v1_demo2_gebortgvv==1,
"Deutschland",as.character(v1_con_cntr_brth_gff))
v1_cntr_brth_gff<-as.factor(c(v1_clin_cntr_brth_gff,v1_con_cntr_brth_gff))
descT(v1_cntr_brth_gff)
## Afghanistan Ägypten Algerien anderes Land Australien
## [1,] No. cases 1 1 1 5 1
## [2,] Percent 0.1 0.1 0.1 0.3 0.1
## Belarus (Weißrussland) Belgien Bosnien und Herzegowina Bulgarien Chile
## [1,] 1 2 4 2 4
## [2,] 0.1 0.1 0.2 0.1 0.2
## Deutschland Eritrea Estland Frankreich Ghana Griechenland Indien Irak
## [1,] 847 3 1 5 1 1 2 2
## [2,] 47.4 0.2 0.1 0.3 0.1 0.1 0.1 0.1
## Iran, Islamische Republik Israel Italien Japan Jemen Kasachstan Kenia
## [1,] 7 1 9 2 1 3 1
## [2,] 0.4 0.1 0.5 0.1 0.1 0.2 0.1
## Korea, Republik (Südkorea) Kroatien Litauen Luxemburg Marokko
## [1,] 1 5 2 1 1
## [2,] 0.1 0.3 0.1 0.1 0.1
## Mazedonien, ehem. jugoslawische Republik Mongolei Namibia Niederlande
## [1,] 3 1 2 1
## [2,] 0.2 0.1 0.1 0.1
## Nigeria Norwegen Österreich Pakistan Palästinensische Autonomiegebiete
## [1,] 2 2 191 1 2
## [2,] 0.1 0.1 10.7 0.1 0.1
## Polen Rumänien Russische Föderation Senegal Serbien Slowakei Slowenien
## [1,] 109 12 31 1 9 3 5
## [2,] 6.1 0.7 1.7 0.1 0.5 0.2 0.3
## Spanien Sri Lanka Thailand Tschechische Republik Türkei Ukraine Ungarn
## [1,] 3 2 1 26 22 7 11
## [2,] 0.2 0.1 0.1 1.5 1.2 0.4 0.6
## Usbekistan Vereinigte Staaten von Amerika
## [1,] 1 6
## [2,] 0.1 0.3
## Vereinigtes Königreich Großbritannien und Nordirland <NA>
## [1,] 3 411 1786
## [2,] 0.2 23 100
Create dataset
v1_eth<-data.frame(v1_cntr_brth,v1_cntr_brth_m,v1_cntr_brth_f,v1_cntr_brth_gmm,
v1_cntr_brth_gfm,v1_cntr_brth_gmf,v1_cntr_brth_gff)
This is an ordinal scale with four levels: “no”-1, “yes, outpatient”-2, “yes, day patient”-3, “yes, inpatient”-4.
v1_clin_cur_psy_trm<-rep(NA,dim(v1_clin)[1])
v1_con_cur_psy_trm<-rep(NA,dim(v1_con)[1])
v1_clin_cur_psy_trm<-ifelse(v1_clin$v1_psy_vorg_akt_pva1_akt_behand==0,"1",
ifelse(v1_clin$v1_psy_vorg_akt_pva1_akt_behand==3,"2",
ifelse(v1_clin$v1_psy_vorg_akt_pva1_akt_behand==2,"3",
ifelse(v1_clin$v1_psy_vorg_akt_pva1_akt_behand==1,"4",v1_clin_cur_psy_trm))))
v1_con_cur_psy_trm<-ifelse(v1_con$v1_psyaktuel_aktbehand==0,"1",
ifelse(v1_con$v1_psyaktuel_aktbehand==3,"2",
ifelse(v1_con$v1_psyaktuel_aktbehand==2,"3",
ifelse(v1_con$v1_psyaktuel_aktbehand==1,"4",v1_con_cur_psy_trm))))
v1_cur_psy_trm<-ordered(as.factor(c(v1_clin_cur_psy_trm,v1_con_cur_psy_trm)))
descT(v1_cur_psy_trm)
## 1 2 3 4 <NA>
## [1,] No. cases 476 640 78 555 37 1786
## [2,] Percent 26.7 35.8 4.4 31.1 2.1 100
This is an ordinal scale with four levels: “no”-1, “yes, consultation or short treatment”-2, “yes, continuous treatment for six months or numerous short episodes”-3, “yes, continuous treatment for several years or many short episodes”-4. The option “No information” was coded as “-999”.
v1_clin_outpat_psy_trm<-ifelse(v1_clin$v1_psy_vorg_akt_pva2_jemals_behand==0,-999,v1_clin$v1_psy_vorg_akt_pva2_jemals_behand)
v1_con_outpat_psy_trm<-ifelse(v1_con$v1_psyaktuel_jembehand==0,-999,v1_con$v1_psyaktuel_jembehand)
v1_outpat_psy_trm<-factor(c(v1_clin_outpat_psy_trm,v1_con_outpat_psy_trm),ordered=T)
summary(v1_outpat_psy_trm)
## -999 1 2 3 4 NA's
## 27 428 181 151 967 32
If controls were never treated for any mental health reason, they are coded as -999.
v1_age_1st_out_trm<-c(v1_clin$v1_psy_vorg_akt_pva3_alter_jahre,
ifelse(is.na(v1_con$v1_psyaktuel_alterj),-999,v1_con$v1_psyaktuel_alterj))
summary(v1_age_1st_out_trm)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -999.00 8.25 23.00 -221.19 32.00 73.00 120
v1_clin_daypat_inpat_trm<-ifelse(v1_clin$v1_psy_vorg_akt_pva4_teilst_behand==1, "Y","N")
v1_con_daypat_inpat_trm<-ifelse(v1_con$v1_psyaktuel_tstbehand==1, "Y","N")
v1_daypat_inpat_trm<-factor(c(v1_clin_daypat_inpat_trm,v1_con_daypat_inpat_trm))
descT(v1_daypat_inpat_trm)
## N Y <NA>
## [1,] No. cases 470 1281 35 1786
## [2,] Percent 26.3 71.7 2 100
v1_age_1st_inpat_trm<-c(v1_clin$v1_psy_vorg_akt_pva5_alter_jahre,
ifelse(is.na(v1_con$v1_psyaktuel_stalterj),-999,v1_con$v1_psyaktuel_stalterj))
summary(v1_age_1st_inpat_trm[v1_age_1st_inpat_trm>0])
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 5.00 22.00 27.00 30.25 37.00 73.00 74
This is a newly created variable by subtracting age at first inpatient treatment from age at first visit (unit is years). Please note that this assumes that the patient was hospitalized for the diagnosis given in here and may therefore not be entirely accurate. In control individuals this was set to -999.
v1_dur_illness_clin<-v1_age[v1_stat=="CLINICAL"]-v1_age_1st_inpat_trm[v1_stat=="CLINICAL"]
table(v1_dur_illness_clin)
## v1_dur_illness_clin
## -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
## 9 116 77 59 55 45 57 43 46 46 49 44 57 39 51 32 31 43 27 17
## 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
## 20 21 20 27 15 15 17 12 22 15 18 8 16 7 5 9 5 6 5 6
## 39 40 41 42 43 44 45 46 47 50 51 52 53
## 5 9 1 4 4 2 2 1 2 1 1 1 1
#Set negative values to NA
v1_dur_illness_clin[v1_dur_illness_clin<0]<-NA
table(v1_dur_illness_clin)
## v1_dur_illness_clin
## 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
## 116 77 59 55 45 57 43 46 46 49 44 57 39 51 32 31 43 27 17 20
## 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
## 21 20 27 15 15 17 12 22 15 18 8 16 7 5 9 5 6 5 6 5
## 40 41 42 43 44 45 46 47 50 51 52 53
## 9 1 4 4 2 2 1 2 1 1 1 1
#Set controls to -999
v1_dur_illness_con<-rep(-999,dim(v1_con)[1])
v1_dur_illness<-c(v1_dur_illness_clin,v1_dur_illness_con)
table(v1_dur_illness)
## v1_dur_illness
## -999 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
## 466 116 77 59 55 45 57 43 46 46 49 44 57 39 51 32
## 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
## 31 43 27 17 20 21 20 27 15 15 17 12 22 15 18 8
## 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
## 16 7 5 9 5 6 5 6 5 9 1 4 4 2 2 1
## 47 50 51 52 53
## 2 1 1 1 1
This is a newly created variable. Clinical participants with duration of illness of zero years are labeled as first-episode. Control participants have “-999”.
v1_1st_ep_con<-rep(-999,dim(v1_con)[1])
v1_1st_ep_clin<-ifelse(v1_dur_illness_clin==0,"Y","N")
v1_1st_ep<-factor(c(v1_1st_ep_clin,v1_1st_ep_con))
descT(v1_1st_ep)
## -999 N Y <NA>
## [1,] No. cases 466 1121 116 83 1786
## [2,] Percent 26.1 62.8 6.5 4.6 100
Interviewers were instructed to use the lowest number if information is imprecise and to use “99” if too many treatments occurred. If the participant is currently treated as in- or daypatient, the number given contains this treatment.
v1_clin_tms_daypat_outpat_trm<-v1_clin$v1_psy_vorg_akt_pva6_anz_psy_behand
v1_con_tms_daypat_outpat_trm<-v1_con$v1_psyaktuel_anzahl
v1_tms_daypat_outpat_trm<-c(v1_clin_tms_daypat_outpat_trm,v1_con_tms_daypat_outpat_trm)
summary(v1_tms_daypat_outpat_trm)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.000 2.000 4.000 6.204 6.000 99.000 542
We have decided to transform this variable into an ordinal variable using the following gradings: “smaller or equal five times”-1, “six to ten times”-2, “eleven to fourteen times”-3, “fifteen or more times”-4.
v1_clin_cat_daypat_outpat_trm<-rep(NA,dim(v1_clin)[1])
v1_con_cat_daypat_outpat_trm<-rep(NA,dim(v1_con)[1])
v1_clin_cat_daypat_outpat_trm<-ifelse(v1_clin_tms_daypat_outpat_trm<=5,"1",v1_clin_cat_daypat_outpat_trm)
v1_clin_cat_daypat_outpat_trm<-ifelse(v1_clin_tms_daypat_outpat_trm %in% c(6:10),"2",v1_clin_cat_daypat_outpat_trm)
v1_clin_cat_daypat_outpat_trm<-ifelse(v1_clin_tms_daypat_outpat_trm %in% c(11:14),"3",v1_clin_cat_daypat_outpat_trm)
v1_clin_cat_daypat_outpat_trm<-ifelse(v1_clin_tms_daypat_outpat_trm>=15,"4",v1_clin_cat_daypat_outpat_trm)
v1_con_cat_daypat_outpat_trm<-ifelse(v1_con_tms_daypat_outpat_trm<=5,"1",v1_con_cat_daypat_outpat_trm)
v1_con_cat_daypat_outpat_trm<-ifelse(v1_con_tms_daypat_outpat_trm %in% c(6:10),"2",v1_con_cat_daypat_outpat_trm)
v1_con_cat_daypat_outpat_trm<-ifelse(v1_con_tms_daypat_outpat_trm %in% c(11:14),"3",v1_con_cat_daypat_outpat_trm)
v1_con_cat_daypat_outpat_trm<-ifelse(v1_con_tms_daypat_outpat_trm>=15,"4",v1_con_cat_daypat_outpat_trm)
v1_cat_daypat_outpat_trm<-factor(c(v1_clin_cat_daypat_outpat_trm,v1_con_cat_daypat_outpat_trm),ordered=T)
descT(v1_cat_daypat_outpat_trm)
## 1 2 3 4 <NA>
## [1,] No. cases 841 270 49 84 542 1786
## [2,] Percent 47.1 15.1 2.7 4.7 30.3 100
Create dataset
v1_psy_trtmt<-data.frame(v1_cur_psy_trm,v1_outpat_psy_trm,v1_age_1st_out_trm,v1_daypat_inpat_trm,v1_age_1st_inpat_trm,
v1_dur_illness,v1_1st_ep,v1_tms_daypat_outpat_trm,v1_cat_daypat_outpat_trm)
The raw medication datasets and their description below show that the assessed medication variables are rather complex. To provide simple measures of medication load, we create variables below that quantify the number of different medications belonging to one category a study participant currently takes.
Variables for the following categories were created:
Number of antidepressants prescribed (continuous [number],
v1_Antidepressants)
Number of antipsychotics prescribed (continuous [number],
v1_Antipsychotics)
Number of mood stabilizers prescribed (continuous [number],
v1_Mood_stabilizers)
Number of tranquilizers prescribed (continuous [number],
v1_Tranquilizers)
Number of other psychiatric medications (continuous [number],
v1_Other_psychiatric)
#get the following variables from v1_clin
#1. Medication name ["_med_medi_1"]
#2. Medication category ["_med_kategorie_1"]
#3. Depot name ["_depot_medi_2"]
#4. Depot category ["_depot_kategorie_2"]
#5. Bedarf name ["_bedarf_medi_1"]
#6. Bedarf category ["_bedarf_kategorie_1"]
v1_clin_medication_variables_1<-as.data.frame(v1_clin[,grep("mnppsd|_med_medi_1|_med_kategorie_1|_depot_medi_2|_depot_kategorie_2|_bedarf_medi_1|_bedarf_kategorie_1",names(v1_clin))])
dim(v1_clin_medication_variables_1)
## [1] 1320 61
#recode the variables that are coded as characters/logicals in the "v1_clin_medication_variables_1" as factors
v1_clin_medication_variables_1$v1_medikabehand3_med_medi_199998_17<-as.factor(v1_clin_medication_variables_1$v1_medikabehand3_med_medi_199998_17)
v1_clin_medication_variables_1$v1_medikabehand3_med_kategorie_199998_17<-as.factor(v1_clin_medication_variables_1$v1_medikabehand3_med_kategorie_199998_17)
v1_clin_medication_variables_1$v1_medikabehand3_bedarf_medi_199584_10<-as.factor(v1_clin_medication_variables_1$v1_medikabehand3_bedarf_medi_199584_10)
v1_clin_medication_variables_1$v1_medikabehand3_bedarf_kategorie_199584_10<-as.factor(v1_clin_medication_variables_1$v1_medikabehand3_bedarf_kategorie_199584_10)
#make the duplicated data frame
v1_clin_medications_duplicated_1<-as.data.frame(t(apply(v1_clin_medication_variables_1[,!c(TRUE,FALSE)], 1, duplicated)))
dim(v1_clin_medications_duplicated_1)
## [1] 1320 30
#recode all duplicated variables, i.e. overlay "_medication_variables_" and "_medications_duplicated_".
#Important: quotes from "NA" are removed, because variable are coded as facors in v1_clin, not as character
v1_clin_medication_variables_1[,!c(TRUE, FALSE)][v1_clin_medications_duplicated_1=="TRUE"] <- NA
dim(v1_clin_medication_variables_1)
## [1] 1320 61
#bind columns id and medication names, but not categories together
v1_clin_medication_name_1<-as.data.frame(cbind("mnppsd"=v1_clin_medication_variables_1[,1], v1_clin_medication_variables_1[,!c(TRUE, FALSE)]))
dim(v1_clin_medication_name_1)
## [1] 1320 31
#get the medication categories from the "_medication_variables_1" dataframe
v1_clin_medication_categories_1<-as.data.frame(v1_clin_medication_variables_1[,c(TRUE, FALSE)])
dim(v1_clin_medication_categories_1)
## [1] 1320 31
#recode all duplicated variables, i.e. overlay "_medication_categories_" and "_medication_name_"
#Important: quotes from "NA" are removed, because variable are coded as facors in v1_clin, not as character
#Important: v1_clin_medication_name_1=="NA" replaced with is.na(v1_clin_medication_name_1)
v1_clin_medication_categories_1[is.na(v1_clin_medication_name_1)] <- NA
#write.csv(v1_clin_medication_categories_1, file="v1_clin_medication_group_1.csv")
#Make a count table of medications
v1_clin_med_table<-data.frame("mnppsd"=v1_clin$mnppsd)
v1_clin_med_table$v1_Antidepressants<-rowSums(v1_clin_medication_categories_1 == "Antidepressiva", na.rm = TRUE)
v1_clin_med_table$v1_Antipsychotics<-rowSums(v1_clin_medication_categories_1 == "Antipsychotika", na.rm = TRUE)
v1_clin_med_table$v1_Mood_stabilizers<-rowSums(v1_clin_medication_categories_1 == "Phasenprophylaktika", na.rm = TRUE)
v1_clin_med_table$v1_Tranquilizers<-rowSums(v1_clin_medication_categories_1 == "Sedativa", na.rm = TRUE)
v1_clin_med_table$v1_Other_psychiatric<-rowSums(v1_clin_medication_categories_1 == "Psychopharmaka nicht zuordenbar", na.rm = TRUE)
#get the following variables from v1_con
#1. Medication name ["_med_medi_2"]
#2. Medication category ["_med_kategorie_2"]
#3. Depot name ["_depot_medi_2"]
#4. Depot category ["_depot_kategorie_2"]
#5. Bedarf name ["_bedarf_medi_2"]
#6. Bedarf category ["_bedarf_kategorie_2"]
v1_con_medication_variables_1<-as.data.frame(v1_con[,grep("mnppsd|_med_medi_2|_med_kategorie_2|_depot_medi_2|_depot_kategorie_2|_bedarf_medi_2|_bedarf_kategorie_2",names(v1_con))])
dim(v1_con_medication_variables_1)
## [1] 466 29
#recode the variables that are coded as characters/logicals in the "v1_con_medication_variables_1" as factors
v1_con_medication_variables_1$v1_medikabehand3_depot_medi_201224_2<-as.factor(v1_con_medication_variables_1$v1_medikabehand3_depot_medi_201224_2)
v1_con_medication_variables_1$v1_medikabehand3_depot_kategorie_201224_2<-as.factor(v1_con_medication_variables_1$v1_medikabehand3_depot_kategorie_201224_2)
v1_con_medication_variables_1$v1_medikabehand3_bedarf_medi_201187_4<-as.factor(v1_con_medication_variables_1$v1_medikabehand3_bedarf_medi_201187_4)
v1_con_medication_variables_1$v1_medikabehand3_bedarf_kategorie_201187_4<-as.factor(v1_con_medication_variables_1$v1_medikabehand3_bedarf_kategorie_201187_4)
#make the duplicated data frame
v1_con_medications_duplicated_1<-as.data.frame(t(apply(v1_con_medication_variables_1[,!c(TRUE,FALSE)], 1, duplicated)))
dim(v1_con_medications_duplicated_1)
## [1] 466 14
#recode all duplicated variables, i.e. overlay "_medication_variables_" and "_medications_duplicated_".
#Important: quotes from "NA" are removed, because variable are coded as facors in v1_con, not as character
v1_con_medication_variables_1[,!c(TRUE, FALSE)][v1_con_medications_duplicated_1=="TRUE"] <- NA
dim(v1_con_medication_variables_1)
## [1] 466 29
#bind columns id and medication names, but not categories together
v1_con_medication_name_1<-as.data.frame(cbind("mnppsd"=v1_con_medication_variables_1[,1], v1_con_medication_variables_1[,!c(TRUE, FALSE)]))
dim(v1_con_medication_name_1)
## [1] 466 15
#get the medication categories from the "_medication_variables_1" dataframe
v1_con_medication_categories_1<-as.data.frame(v1_con_medication_variables_1[,c(TRUE, FALSE)])
dim(v1_con_medication_categories_1)
## [1] 466 15
#recode all duplicated variables, i.e. overlay "_medication_categories_" and "_medication_name_"
#Important: quotes from "NA" are removed, because variable are coded as facors in v1_con, not as character
#Important: v1_con_medication_name_1=="NA" replaced with is.na(v1_con_medication_name_1)
v1_con_medication_categories_1[is.na(v1_con_medication_name_1)] <- NA
#write.csv(v1_con_medication_categories_1, file="v1_con_medication_group_1.csv")
#Make a count table of medications
v1_con_med_table<-data.frame("mnppsd"=v1_con$mnppsd)
v1_con_med_table$v1_Antidepressants<-rowSums(v1_con_medication_categories_1 == "Antidepressiva", na.rm = TRUE)
v1_con_med_table$v1_Antipsychotics<-rowSums(v1_con_medication_categories_1 == "Antipsychotika", na.rm = TRUE)
v1_con_med_table$v1_Mood_stabilizers<-rowSums(v1_con_medication_categories_1 == "Phasenprophylaktika", na.rm = TRUE)
v1_con_med_table$v1_Tranquilizers<-rowSums(v1_con_medication_categories_1 == "Sedativa", na.rm = TRUE)
v1_con_med_table$v1_Other_psychiatric<-rowSums(v1_con_medication_categories_1 == "Psychopharmaka nicht zuordenbar", na.rm = TRUE)
Bind v1_clin and v1_con together by rows
v1_drugs<-rbind(v1_clin_med_table,v1_con_med_table)
dim(v1_drugs)
## [1] 1786 6
#check if the id column of v1_drugs and v1_id match
table(v1_drugs[,1]==v1_id)
##
## TRUE
## 1786
In control participants, this item is coded “-999”, as it was not assessed.
v1_clin_adv<-ifelse(v1_clin$v1_medikabehand_medi2_nebenwirk==1,"Y","N")
v1_con_adv<-rep("-999",dim(v1_con)[1])
v1_adv<-factor(c(v1_clin_adv,v1_con_adv))
descT(v1_adv)
## -999 N Y <NA>
## [1,] No. cases 466 304 558 458 1786
## [2,] Percent 26.1 17 31.2 25.6 100
In control participants, this item is coded “-999”, as it was not assessed.
v1_clin_medchange<-rep(NA,dim(v1_clin)[1])
v1_clin_medchange<-ifelse(v1_clin$v1_medikabehand_medi3_mediaenderung==1,"Y","N")
v1_con_medchange<-rep("-999",dim(v1_con)[1])
v1_medchange<-as.factor(c(v1_clin_medchange,v1_con_medchange))
descT(v1_medchange)
## -999 N Y <NA>
## [1,] No. cases 466 259 595 466 1786
## [2,] Percent 26.1 14.5 33.3 26.1 100
The following two items on medication with lithium are asked in all study vists, in order not to miss participants eligible for the ALDA scale, which is assessed at the last study visit.
v1_clin_lith<-rep(NA,dim(v1_clin)[1])
v1_clin_lith<-ifelse(v1_clin$v1_medikabehand_med_zusatz_lithium==1,"Y","N")
v1_con_lith<-rep("-999",dim(v1_con)[1])
v1_lith<-as.factor(c(v1_clin_lith,v1_con_lith))
v1_lith<-as.factor(v1_lith)
descT(v1_lith)
## -999 N Y <NA>
## [1,] No. cases 466 535 248 537 1786
## [2,] Percent 26.1 30 13.9 30.1 100
Ordinal variable, gradation the following: “less than one year”-1, “one to two years”-2, “two or more years”-3. Clinical paricipants not treated with lithium or control participants have “-999” here.
v1_clin_lith_prd<-rep(NA,dim(v1_clin)[1])
v1_con_lith_prd<-rep(-999,dim(v1_con)[1])
v1_clin_lith_prd<-ifelse(v1_clin_lith=="N", -999, ifelse(v1_clin$v1_medikabehand_med_zusatz_dauer==2,1,
ifelse(v1_clin$v1_medikabehand_med_zusatz_dauer==1,2,
ifelse(v1_clin$v1_medikabehand_med_zusatz_dauer==0,3,NA))))
v1_lith_prd<-factor(c(v1_clin_lith_prd,v1_con_lith_prd))
descT(v1_lith_prd)
## -999 1 2 3 <NA>
## [1,] No. cases 1001 106 26 116 537 1786
## [2,] Percent 56 5.9 1.5 6.5 30.1 100
Create dataset
v1_med<-data.frame(v1_drugs[,2:6],v1_adv,v1_medchange,v1_lith,v1_lith_prd)
Here, separate datasets for clinical and control participants are created that contain the raw medication information at visit 1, as specified in the phenotype database.
For each medication that the individual took at visit 1 (including non-psychiatric drugs), the information given below is assessed.
The last character of each variable name always refers to the medication in question, so items ending with _1 refer to the first drug, _2 to the second drug and so on. In the variable descriptions below, these endings are omitted.
The medications were not assessed in any specific order, i.e. the order was determined by the individual participant (whatever she or he mentioned first). To classify medications, we used a catalogue, from which the categories and subcategories a medication belongs to were selected (see below).
Below, the variable names of clinical/control participants, respectively, are given in quotes, and the coding is explained in the parentheses.
1.Was the individual treated with any medication? (1-yes, 2-no,
99-not assessed)
“v1_medikabehand3_keine_med”/“v1_medikabehand3_keine_med”
Regular medication: Name of the medication (character)
“v1_medikabehand3_med_medi_199998”/“v1_medikabehand3_med_medi_200705”
Regular medication: Category to which the medication belongs
(character)
“v1_medikabehand3_med_kategorie_199998”/“v1_medikabehand3_med_kategorie_200705”
Regular medication: Subcategory to which the medication belongs
(character)
“v1_medikabehand3_med_kategorie_sub_199998”/“v1_medikabehand3_med_kategorie_sub_200705”
Regular medication: Psychiatric medication? (0-no, 1-yes) “v1_medikabehand3_med_zusatz_199998”/“v1_medikabehand3_med_zusatz_200705”
Regular medication: Dose in the morning (unitless)
“v1_medikabehand3_s_medi1_morgens_199998”/“v1_medikabehand3_s_medi1_morgens_200705”
Regular medication: Dose at midday (unitless)
“v1_medikabehand3_smedi1_mittags_199998”/“v1_medikabehand3_smedi1_mittags_200705”
Regular medication: Dose in the evening (unitless)
“v1_medikabehand3_smedi1_abends_199998”/“v1_medikabehand3_smedi1_abends_200705”
Regular medication: Dose at night (unitless)
“v1_medikabehand3_smedi1_nachts_199998”/“v1_medikabehand3_smedi1_nachts_200705”
Regular medication: Unit of the medication asked in the last four
questions (1-milligram, 2-microgram, 3-millimol, 4-gram, 5-IE)
“v1_medikabehand3_smedi1_einheit_199998”/“v1_medikabehand3_smedi1_einheit_200705”
Regular medication: Total dose of the medication per day
(unitless)
“v1_medikabehand3_smedi1_gesamtdosis_199998”/“v1_medikabehand3_smedi1_gesamtdosis_200705”
Regular medication: Unit of the medication asked in the last
question (1-milligram, 2-microgram, 3-millimol, 4-gram, 5-IE)
“v1_medikabehand3_smedi1_einheit1_199998”/“v1_medikabehand3_smedi1_einheit1_200705”
Regular medication: Medication name, if not contained in our
catalog (character)
“v1_medikabehand3_medikament_text_199998”/“v1_medikabehand3_medikament_text_200705”
Depot medication: Name of the medication (character) “v1_medikabehand3_depot_medi_200170”/“v1_medikabehand3_depot_medi_201224
Depot medication: Category to which the medication belongs (character) “v1_medikabehand3_depot_kategorie_200170”/“v1_medikabehand3_depot_kategorie_201224
Depot medication: Subcategory to which the medication belongs
(character)
“v1_medikabehand3_depot_kategorie_sub_200170”/“v1_medikabehand3_depot_kategorie_sub_201224
Depot medication: Psychiatric medication? (0-no, 1-yes) “v1_medikabehand3_depot_zusatz_200170”/“v1_medikabehand3_depot_zusatz_201224”
Depot medication: Total Dose (unitless) “v1_medikabehand3_s_depot_gesamtdosis_200170”/“v1_medikabehand3_s_depot_gesamtdosis_201224”
Depot medication: Unit (1-milligram, 2-microgram, 3-millimol, 4-gram, 5-IE) “v1_medikabehand3_s_depot_einheit_200170”/ “v1_medikabehand3_s_depot_einheit_201224”
Interval, at which the depot medication is given (days) “v1_medikabehand3_s_depot_tage_200170”/“v1_medikabehand3_s_depot_tage_201224”
Medication name, if not contained in our catalog (character) “v1_medikabehand3_medikament_text_200170”/“v1_medikabehand3_medikament_text_201224”
Pro re nata (PRN) medication: Name of the medication (character) “v1_medikabehand3_bedarf_medi_199584”/“v1_medikabehand3_bedarf_medi_201187”
Pro re nata (PRN) medication: Category to which the
medication belongs (character)
“v1_medikabehand3_bedarf_kategorie_199584”/“v1_medikabehand3_bedarf_kategorie_201187”
Pro re nata (PRN) medication: Subcategory to which the medication belongs (character) “v1_medikabehand3_bedarf_kategorie_sub_199584”/“v1_medikabehand3_bedarf_kategorie_sub_201187”
Pro re nata (PRN) medication: Psychiatric medication? (0-no, 1-yes) “v1_medikabehand3_bedarf_zusatz_199584”/“v1_medikabehand3_bedarf_zusatz_201187”
Pro re nata (PRN) medication: Total dose up to (unitless) “v1_medikabehand3_s_bedarf_gesamtdosis_199584”/“v1_medikabehand3_s_bedarf_kommentar_201187
Pro re nata (PRN) medication: Unit (1-milligram, 2-microgram, 3-millimol, 4-gram, 5-IE) “v1_medikabehand3_s_bedarf_einheit1_199584”/“v1_medikabehand3_s_bedarf_einheit1_201187”
Pro re nata (PRN) medication: Comment (character) “v1_medikabehand3_s_bedarf_kommentar_199584”/“v1_medikabehand3_s_bedarf_kommentar_201187”
Pro re nata (PRN) medication: Medication name, if not contained in our catalog (character) “v1_medikabehand3_medikament_text_199584”/“v1_medikabehand3_medikament_text_201187”
Make datasets containing only information on medication
v1_med_clin_orig<-data.frame(v1_clin$mnppsd,v1_clin[,285:593])
names(v1_med_clin_orig)[1]<-"v1_id"
v1_med_con_orig<-data.frame(v1_con$mnppsd,v1_con[,247:391])
names(v1_med_con_orig)[1]<-"v1_id"
Save raw medication datasets of visit 1
save(v1_med_clin_orig, file="230614_v6.0_psycourse_clin_raw_med_visit1.RData")
save(v1_med_con_orig, file="230614_v6.0_psycourse_con_raw_med_visit1.RData")
Write .csv file
write.table(v1_med_clin_orig,file="230614_v6.0_psycourse_clin_raw_med_visit1.csv", quote=F, row.names=F, col.names=T, sep="\t")
write.table(v1_med_con_orig,file="230614_v6.0_psycourse_con_raw_med_visit1.csv", quote=F, row.names=F, col.names=T, sep="\t")
The option “Participant does not know” is coded as “NA”. The option “Participant does not want to disclose information” is coded as “-999”.
v1_clin_fam_hist<-rep(NA,dim(v1_clin)[1])
v1_con_fam_hist<-rep(NA,dim(v1_con)[1])
v1_clin_fam_hist<-ifelse(v1_clin$v1_psy_famanam_pfa_angeh_pe==0,"N",
ifelse(v1_clin$v1_psy_famanam_pfa_angeh_pe==1,"Y",
ifelse(v1_clin$v1_psy_famanam_pfa_angeh_pe==2,"-999",
ifelse(v1_clin$v1_psy_famanam_pfa_angeh_pe==3,NA,v1_clin_fam_hist))))
v1_con_fam_hist<-ifelse(v1_con$v1_famanam_psyangeh==0,"N",
ifelse(v1_con$v1_famanam_psyangeh==1,"Y",
ifelse(v1_con$v1_famanam_psyangeh==2,"-999",
ifelse(v1_con$v1_famanam_psyangeh==3,NA,v1_con_fam_hist))))
v1_fam_hist<-as.factor(c(v1_clin_fam_hist,v1_con_fam_hist))
descT(v1_fam_hist)
## -999 N Y <NA>
## [1,] No. cases 10 528 1120 128 1786
## [2,] Percent 0.6 29.6 62.7 7.2 100
Also, in the original assessment of psychiatric history, each affected family member is listed, together with an indication whther the diagnosis is certain or not. This detailed information is available on request.
The method of assessment of physical measures and somatic diseases changed during the course of the study. Initially, it was assessed whether a participant was ever affected by a group of diseases, and the specific disease was added as free text, with certain examples diseases specifically mentioned. The later method assessed selected diseases specifically as dichotomous yes/no items. To make use of all information, both systems were harmonized under the supervision of a medical doctor.
There are a few important points that have to be kept in mind when using this dataset:
Autoimmune diseases, traumatic brain injury, and disability status (present mode of assessment) were not covered by the original method of assessment, but were coded as “yes” when mentioned in the “other diseases category”, which was an option in the original method of assessment. As a “no” to these questions cannot be assumed in individuals with missing data, these items should be treated with caution.
Most items do not consider the pathogenesis of the disease in question. The category of autoimmune diseases does, however, and it should be noted that this item does only contain autoimmune diseases not captured by the other items (e.g. neurodermatitis).
Height (continuous [centimeters], v1_height)
v1_clin_height<-v1_clin$v1_medwkeii_groesse
v1_con_height<-v1_con$v1_medwkeii_groesse
v1_height<-c(v1_clin_height,v1_con_height)
summary(v1_height)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 114.0 167.0 174.0 173.8 180.0 203.0 37
Weight (continuous [kilograms], v1_weight)
v1_clin_weight<-v1_clin$v1_medwkeii_gewicht
v1_con_weight<-v1_con$v1_medwkeii_gewicht
v1_weight<-c(v1_clin_weight,v1_con_weight)
summary(v1_weight)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 39 67 79 82 92 190 45
Waist circumference (continouos [centimeters], v1_waist) This item was only recorded in a subset of individuals, because the question was introduced during the course of the study.
v1_clin_waist<-v1_clin$v1_medwkeii_mw1_taillenumfang
v1_con_waist<-v1_con$v1_medwkeii_mw1_taillenumfang
v1_waist<-c(v1_clin_waist,v1_con_waist)
summary(v1_waist)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 61.00 76.00 86.00 88.65 99.00 149.00 1275
Body mass index (BMI, continuous [BMI], v1_bmi) We here provide the body mass index of study participants, calculated as weight in kilograms divided by the squared height in meters.
v1_bmi<-round(v1_weight/(v1_height/100)^2,2)
summary(v1_bmi)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 16.18 22.79 25.89 27.08 30.04 75.41 45
1. Elevated cholesterol or triglyceride levels (dichotomous,v1_chol_trig)
v1_clin_chol_trig<-ifelse(v1_clin$v1_medwkeii_medwkeii_ecot==1,"Y","N")
v1_con_chol_trig<-ifelse(v1_con$v1_medwkeii_medwkeii_ecot==1,"Y","N")
v1_chol_trig<-factor(c(v1_clin_chol_trig,v1_con_chol_trig))
descT(v1_chol_trig)
## N Y <NA>
## [1,] No. cases 1403 213 170 1786
## [2,] Percent 78.6 11.9 9.5 100
2. Hypertension (dichotomous, v1_hyperten)
v1_clin_hyperten<-ifelse(v1_clin$v1_medwkeii_medwkeii_hyperton==1,"Y","N")
v1_con_hyperten<-ifelse(v1_con$v1_medwkeii_medwkeii_hyperton==1,"Y","N")
v1_hyperten<-factor(c(v1_clin_hyperten,v1_con_hyperten))
descT(v1_hyperten)
## N Y <NA>
## [1,] No. cases 1328 293 165 1786
## [2,] Percent 74.4 16.4 9.2 100
3. Angina pectoris (dichotomous, v1_ang_pec)
v1_clin_ang_pec<-ifelse(v1_clin$v1_medwkeii_medwkeii_angpec==1,"Y","N")
v1_con_ang_pec<-ifelse(v1_con$v1_medwkeii_medwkeii_angpec==1,"Y","N")
v1_ang_pec<-factor(c(v1_clin_ang_pec,v1_con_ang_pec))
descT(v1_ang_pec)
## N Y <NA>
## [1,] No. cases 1596 23 167 1786
## [2,] Percent 89.4 1.3 9.4 100
4. Heart attack (dichotomous, v1_heart_att)
v1_clin_heart_att<-ifelse(v1_clin$v1_medwkeii_medwkeii_herzinf==1,"Y","N")
v1_con_heart_att<-ifelse(v1_con$v1_medwkeii_medwkeii_herzinf==1,"Y","N")
v1_heart_att<-factor(c(v1_clin_heart_att,v1_con_heart_att))
descT(v1_heart_att)
## N Y <NA>
## [1,] No. cases 1596 22 168 1786
## [2,] Percent 89.4 1.2 9.4 100
5. Stroke (dichotomous, v1_stroke)
v1_clin_stroke<-ifelse(v1_clin$v1_medwkeii_medwkeii_schlag==1,"Y","N")
v1_con_stroke<-ifelse(v1_con$v1_medwkeii_medwkeii_schlag==1,"Y","N")
v1_stroke<-factor(c(v1_clin_stroke,v1_con_stroke))
descT(v1_stroke)
## N Y <NA>
## [1,] No. cases 1604 15 167 1786
## [2,] Percent 89.8 0.8 9.4 100
6. Diabetes (dichotomous, v1_diabetes)
v1_clin_diabetes<-ifelse(v1_clin$v1_medwkeii_medwkeii_zuck==1,"Y","N")
v1_con_diabetes<-ifelse(v1_con$v1_medwkeii_medwkeii_zuck==1,"Y","N")
v1_diabetes<-factor(c(v1_clin_diabetes,v1_con_diabetes))
descT(v1_diabetes)
## N Y <NA>
## [1,] No. cases 1491 126 169 1786
## [2,] Percent 83.5 7.1 9.5 100
7. Hyperthyroidism (dichotomous, v1_hyperthy)
v1_clin_hyperthy<-ifelse(v1_clin$v1_medwkeii_medwkeii_hypothy==1,"Y","N")
v1_con_hyperthy<-ifelse(v1_con$v1_medwkeii_medwkeii_hypothy==1,"Y","N")
v1_hyperthy<-factor(c(v1_clin_hyperthy,v1_con_hyperthy))
descT(v1_hyperthy)
## N Y <NA>
## [1,] No. cases 1319 258 209 1786
## [2,] Percent 73.9 14.4 11.7 100
8. Hypothyroidism (dichotomous, v1_hypothy)
v1_clin_hypothy<-ifelse(v1_clin$v1_medwkeii_medwkeii_hypothy==1,"Y","N")
v1_con_hypothy<-ifelse(v1_con$v1_medwkeii_medwkeii_hypothy==1,"Y","N")
v1_hypothy<-factor(c(v1_clin_hypothy,v1_con_hypothy))
descT(v1_hypothy)
## N Y <NA>
## [1,] No. cases 1319 258 209 1786
## [2,] Percent 73.9 14.4 11.7 100
9. Osteoporosis (dichotomous, v1_osteopor)
v1_clin_osteopor<-ifelse(v1_clin$v1_medwkeii_medwkeii_osterop==1,"Y","N")
v1_con_osteopor<-ifelse(v1_con$v1_medwkeii_medwkeii_osterop==1,"Y","N")
v1_osteopor<-factor(c(v1_clin_osteopor,v1_con_osteopor))
descT(v1_osteopor)
## N Y <NA>
## [1,] No. cases 1571 33 182 1786
## [2,] Percent 88 1.8 10.2 100
10. Asthma (dichotomous, v1_asthma)
v1_clin_asthma<-ifelse(v1_clin$v1_medwkeii_medwkeii_asthma==1,"Y","N")
v1_con_asthma<-ifelse(v1_con$v1_medwkeii_medwkeii_asthma==1,"Y","N")
v1_asthma<-factor(c(v1_clin_asthma,v1_con_asthma))
descT(v1_asthma)
## N Y <NA>
## [1,] No. cases 1486 134 166 1786
## [2,] Percent 83.2 7.5 9.3 100
11. COPD/chronic Bronchitis (dichotomous, v1_copd)
v1_clin_copd<-ifelse(v1_clin$v1_medwkeii_medwkeii_copd==1,"Y","N")
v1_con_copd<-ifelse(v1_con$v1_medwkeii_medwkeii_copd==1,"Y","N")
v1_copd<-factor(c(v1_clin_copd,v1_con_copd))
descT(v1_copd)
## N Y <NA>
## [1,] No. cases 1542 78 166 1786
## [2,] Percent 86.3 4.4 9.3 100
12. Allergies (dichotomus, v1_allerg)
v1_clin_allerg<-ifelse(v1_clin$v1_medwkeii_medwkeii_allerg==1,"Y","N")
v1_con_allerg<-ifelse(v1_con$v1_medwkeii_medwkeii_allerg==1,"Y","N")
v1_allerg<-factor(c(v1_clin_allerg,v1_con_allerg))
descT(v1_allerg)
## N Y <NA>
## [1,] No. cases 942 673 171 1786
## [2,] Percent 52.7 37.7 9.6 100
13. Neurodermatitis (dichotomous, v1_neuroder)
v1_clin_neuroder<-ifelse(v1_clin$v1_medwkeii_medwkeii_neurod==1,"Y","N")
v1_con_neuroder<-ifelse(v1_con$v1_medwkeii_medwkeii_neurod==1,"Y","N")
v1_neuroder<-factor(c(v1_clin_neuroder,v1_con_neuroder))
descT(v1_neuroder)
## N Y <NA>
## [1,] No. cases 1509 102 175 1786
## [2,] Percent 84.5 5.7 9.8 100
14. Psoriasis (dichotomous, v1_psoriasis)
v1_clin_psoriasis<-ifelse(v1_clin$v1_medwkeii_medwkeii_neurod==1,"Y","N")
v1_con_psoriasis<-ifelse(v1_con$v1_medwkeii_medwkeii_neurod==1,"Y","N")
v1_psoriasis<-factor(c(v1_clin_psoriasis,v1_con_psoriasis))
descT(v1_psoriasis)
## N Y <NA>
## [1,] No. cases 1509 102 175 1786
## [2,] Percent 84.5 5.7 9.8 100
15. Autoimmune diseases (dichotomous, v1_autoimm) This item was not contained in the initial method of assessment, and therefore contains many missing values.
v1_clin_autoimm_yn<-ifelse(v1_clin$v1_medwkeii_medwkeii_autoim==1,"Y","N")
v1_con_autoimm_yn<-ifelse(v1_con$v1_medwkeii_medwkeii_autoim==1,"Y","N")
v1_autoimm<-factor(c(v1_clin_autoimm_yn,v1_con_autoimm_yn))
descT(v1_autoimm)
## N Y <NA>
## [1,] No. cases 533 55 1198 1786
## [2,] Percent 29.8 3.1 67.1 100
16. Cancer (dichotomous, v1_cancer)
v1_clin_cancer<-ifelse(v1_clin$v1_medwkeii_medwkeii_kreberk==1,"Y","N")
v1_con_cancer<-ifelse(v1_con$v1_medwkeii_medwkeii_kreberk==1,"Y","N")
v1_cancer<-factor(c(v1_clin_cancer,v1_con_cancer))
descT(v1_cancer)
## N Y <NA>
## [1,] No. cases 1537 82 167 1786
## [2,] Percent 86.1 4.6 9.4 100
17. Stomach ulcer (dichotomous, v1_stom_ulc)
v1_clin_stom_ulc<-ifelse(v1_clin$v1_medwkeii_medwkeii_maggesch==1,"Y","N")
v1_con_stom_ulc<-ifelse(v1_con$v1_medwkeii_medwkeii_maggesch==1,"Y","N")
v1_stom_ulc<-factor(c(v1_clin_stom_ulc,v1_con_stom_ulc))
descT(v1_stom_ulc)
## N Y <NA>
## [1,] No. cases 1579 39 168 1786
## [2,] Percent 88.4 2.2 9.4 100
18. Kidney failure (dichotomous, v1_kid_fail)
v1_clin_kid_fail<-ifelse(v1_clin$v1_medwkeii_medwkeii_nierver==1,"Y","N")
v1_con_kid_fail<-ifelse(v1_con$v1_medwkeii_medwkeii_nierver==1,"Y","N")
v1_kid_fail<-factor(c(v1_clin_kid_fail,v1_con_kid_fail))
descT(v1_kid_fail)
## N Y <NA>
## [1,] No. cases 1598 17 171 1786
## [2,] Percent 89.5 1 9.6 100
19. Kidney-/Gallstone (dichotomous, v1_stone)
v1_clin_stone<-ifelse(v1_clin$v1_medwkeii_medwkeii_nierga==1,"Y","N")
v1_con_stone<-ifelse(v1_con$v1_medwkeii_medwkeii_nierga==1,"Y","N")
v1_stone<-factor(c(v1_clin_stone,v1_con_stone))
descT(v1_stone)
## N Y <NA>
## [1,] No. cases 1521 91 174 1786
## [2,] Percent 85.2 5.1 9.7 100
20. Epilepsy (dichotomous, v1_epilepsy)
v1_clin_epilepsy<-ifelse(v1_clin$v1_medwkeii_medwkeii_epile==1,"Y","N")
v1_con_epilepsy<-ifelse(v1_con$v1_medwkeii_medwkeii_epile==1,"Y","N")
v1_epilepsy<-factor(c(v1_clin_epilepsy,v1_con_epilepsy))
descT(v1_epilepsy)
## N Y <NA>
## [1,] No. cases 1576 34 176 1786
## [2,] Percent 88.2 1.9 9.9 100
21. Migraine (dichotomous, v1_migraine)
v1_clin_migraine<-ifelse(v1_clin$v1_medwkeii_medwkeii_mig==1,"Y","N")
v1_con_migraine<-ifelse(v1_con$v1_medwkeii_medwkeii_mig==1,"Y","N")
v1_migraine<-factor(c(v1_clin_migraine,v1_con_migraine))
descT(v1_migraine)
## N Y <NA>
## [1,] No. cases 1467 143 176 1786
## [2,] Percent 82.1 8 9.9 100
22. Parkinson syndrome (dichotomous, v1_parkinson)
v1_clin_parkinson<-ifelse(v1_clin$v1_medwkeii_medwkeii_parks==1,"Y","N")
v1_con_parkinson<-ifelse(v1_con$v1_medwkeii_medwkeii_parks==1,"Y","N")
v1_parkinson<-factor(c(v1_clin_parkinson,v1_con_parkinson))
descT(v1_parkinson)
## N Y <NA>
## [1,] No. cases 1600 9 177 1786
## [2,] Percent 89.6 0.5 9.9 100
23. Liver cirrhosis or inflammation (dichotomous, v1_liv_cir_inf)
v1_clin_liv_cir_inf<-ifelse(v1_clin$v1_medwkeii_medwkeii_leberz==1,"Y","N")
v1_con_liv_cir_inf<-ifelse(v1_con$v1_medwkeii_medwkeii_leberz==1,"Y","N")
v1_liv_cir_inf<-factor(c(v1_clin_liv_cir_inf,v1_con_liv_cir_inf))
descT(v1_liv_cir_inf)
## N Y <NA>
## [1,] No. cases 1606 7 173 1786
## [2,] Percent 89.9 0.4 9.7 100
24. Traumatic brain injury (dichotomous, v1_tbi) This item was not contained in the initial method of assessment, and therefore contains many missing values.
v1_clin_tbi<-ifelse(v1_clin$v1_medwkeii_medwkeii_sht==1,"Y","N")
v1_con_tbi<-ifelse(v1_con$v1_medwkeii_medwkeii_sht==1,"Y","N")
v1_tbi<-factor(c(v1_clin_tbi,v1_con_tbi))
descT(v1_tbi)
## N Y <NA>
## [1,] No. cases 540 29 1217 1786
## [2,] Percent 30.2 1.6 68.1 100
25. Severely disabled status (dichotomous, v1_beh) NOTE: This is a term of the Social Welfare Code (“Sozialgesetzbuch”). There is some more information, available on request: percentage, to which a person is severely disabled, and the specific type of disability. This item was not contained in the initial method of assessment, and therefore contains many missing values.
v1_clin_beh<-ifelse(v1_clin$v1_medwkeii_medwkeii_schwe==1,"Y","N")
v1_con_beh<-ifelse(v1_con$v1_medwkeii_medwkeii_schwe==1,"Y","N")
v1_beh<-factor(c(v1_clin_beh,v1_con_beh))
descT(v1_beh)
## N Y <NA>
## [1,] No. cases 497 75 1214 1786
## [2,] Percent 27.8 4.2 68 100
26. Disorders of the eyes or ears (dichotomous, v1_eyear) NOTE: Near- or farsightedness, according to our guidelines, is not a disease and should not be coded as such.
v1_clin_eyear<-ifelse(v1_clin$v1_medwkeii_medwkeii_auo==1,"Y","N")
v1_con_eyear<-ifelse(v1_con$v1_medwkeii_medwkeii_auo==1,"Y","N")
v1_eyear<-factor(c(v1_clin_eyear,v1_con_eyear))
descT(v1_eyear)
## N Y <NA>
## [1,] No. cases 1400 216 170 1786
## [2,] Percent 78.4 12.1 9.5 100
27. Infectious diseases (dichotomous, v1_inf) Importantly, assessment of this item was modified during the study. At some point, interviewers were instructed not to code childhood diseases (e.g. chickenpox) as infectious diseases anymore. During the harmonization process, in individuals answering “yes” to this question (initial method of assessment), the free text description of the disease in question was screened for a number of childhood diseases, and, if appropriate, set to “no” in the current method of assessment.
v1_clin_inf<-ifelse(v1_clin$v1_medwkeii_medwkeii_infek==1,"Y","N")
v1_con_inf<-ifelse(v1_con$v1_medwkeii_medwkeii_infek==1,"Y","N")
v1_inf<-factor(c(v1_clin_inf,v1_con_inf))
descT(v1_inf)
## N Y <NA>
## [1,] No. cases 1450 132 204 1786
## [2,] Percent 81.2 7.4 11.4 100
Create dataset
v1_som_dsrdr<-data.frame(v1_height,
v1_weight,
v1_waist,
v1_bmi,
v1_chol_trig,
v1_hyperten,
v1_ang_pec,
v1_heart_att,
v1_stroke,
v1_diabetes,
v1_hyperthy,
v1_hypothy,
v1_osteopor,
v1_asthma,
v1_copd,
v1_allerg,
v1_neuroder,
v1_psoriasis,
v1_autoimm,
v1_cancer,
v1_stom_ulc,
v1_kid_fail,
v1_stone,
v1_epilepsy,
v1_migraine,
v1_parkinson,
v1_liv_cir_inf,
v1_tbi,
v1_beh,
v1_eyear,
v1_inf)
There is some more information available (whether smokers have stopped smoking more than one year, if yes how many years, how many pipes, cigars and cigarillos), not part of the present dataset.
This is a categorical item with three optional answers: “never”-N, “yes”-Y, and “former” (having smoked in the past but not now)-F. It is required to have stopped smoking for at least three months to qualify as former smoker.
v1_clin_ever_smkd<-ifelse(v1_clin$v1_tabalk_ta1_jemals_ger==1,"N",
ifelse(v1_clin$v1_tabalk_ta1_jemals_ger==2,"Y",
ifelse(v1_clin$v1_tabalk_ta1_jemals_ger==3,"F",NA)))
v1_con_ever_smkd<-ifelse(v1_con$v1_tabalk_tabak1==1,"N",
ifelse(v1_con$v1_tabalk_tabak1==2,"Y",
ifelse(v1_con$v1_tabalk_tabak1==3,"F",NA)))
v1_ever_smkd<-factor(c(v1_clin_ever_smkd,v1_con_ever_smkd))
descT(v1_ever_smkd)
## F N Y <NA>
## [1,] No. cases 298 593 805 90 1786
## [2,] Percent 16.7 33.2 45.1 5 100
The original item has three optional answers (age unknown, age or alternatively year in which smoking started). Here, we give age at which smoking started. In cases in which the year in which smoking started was given, we calculated this as follows: year in which smoking stated minus (year of interview minus age at interview). For people who never smoked, this question is coded as “-999”.
v1_clin_age_smk<-ifelse(v1_clin$v1_tabalk_ta1_jemals_ger==1, -999, ifelse(is.na(v1_clin$v1_tabalk_ta2_alter_jahre)==T,
(v1_clin$v1_tabalk_ta2_anf_jahr-(as.numeric(format(v1_interv_date,'%Y'))-v1_clin$v1_ageBL)),v1_clin$v1_tabalk_ta2_alter_jahre))
v1_con_age_smk<-ifelse(v1_con$v1_tabalk_tabak1, -999, ifelse(is.na(v1_con$v1_tabalk_tabak2_alter)==T,
(v1_con$v1_tabalk_tabak2_jahr-(as.numeric(format(interv_date,'%Y'))-v1_ageBL)),v1_con$v1_tabalk_ta2_alter_jahre))
v1_age_smk<-factor(c(v1_clin_age_smk,v1_con_age_smk))
summary(v1_age_smk)
## -999 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
## 767 2 2 2 1 9 4 11 36 53 109 120 174 58 89 30
## 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36
## 43 23 10 11 7 11 2 3 5 5 13 2 2 2 4 1
## 38 40 44 45 48 53 57 61 NA's
## 1 1 2 1 1 1 1 1 166
In the original item, the number of cigarettes is to be entered by the investigator, however there are three options to which timeframe these cigarettes refer to: per day, per week or per month. Here, we have decided to give the cigarettes per year.
Please note that people who have stopped smoking but less than three months ago are still labeled as smokers, therefore zeros can occur. For people presently do not smoke this question is coded as “-999”.
v1_clin_no_cig<-ifelse(v1_clin$v1_tabalk_ta1_jemals_ger==1 | v1_clin_ever_smkd=="F", -999,
ifelse(v1_clin$v1_tabalk_ta3_zig_pro_zeit==1, v1_clin$v1_tabalk_ta3_anz_zig*365,
ifelse(v1_clin$v1_tabalk_ta3_zig_pro_zeit==2, v1_clin$v1_tabalk_ta3_anz_zig*52,
ifelse(v1_clin$v1_tabalk_ta3_zig_pro_zeit==3, v1_clin$v1_tabalk_ta3_anz_zig*12,NA))))
v1_con_no_cig<-ifelse((v1_con$v1_tabalk_tabak1==1 | v1_con_ever_smkd=="F"), -999,
ifelse(v1_con$v1_tabalk_tabak3_zeit==1, v1_con$v1_tabalk_ta3_anz_zig*365,
ifelse(v1_con$v1_tabalk_tabak3_zeit==2, v1_con$v1_tabalk_ta3_anz_zig*52,
ifelse(v1_con$v1_tabalk_tabak3_zeit==3, v1_con$v1_tabalk_ta3_anz_zig*12,NA))))
v1_no_cig<-c(v1_clin_no_cig,v1_con_no_cig)
summary(v1_no_cig)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -999 -999 -999 2478 6570 23725 205
This is and ordinal item. Optional answers are: “never”-1, “only on special occasions”-2, “once per month or less”-3, “two to four times per month”-4, “two to three times per week”-5, “four times per week or several times but not daily”-6, “daily”-7.
v1_alc_pst12_mths<-factor(c(v1_clin$v1_tabalk_ta9_alkkonsum,v1_con$v1_tabalk_alkohol9), ordered=T)
descT(v1_alc_pst12_mths)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 299 356 191 390 206 70 71 203 1786
## [2,] Percent 16.7 19.9 10.7 21.8 11.5 3.9 4 11.4 100
This is an ordinal item. Optional answers are: “never”-1, “once or twice”-2, “three to five times”-3, “six to eleven times”-4, “approximately once per month”-5, “two to three times per month”-6, “one to two times per week”-7, “three to four times per week”-8, “daily or almost daily”-9. Note that this item was skipped if participants chose answering alternatives 1, 2 or 3 in the previous question. In these cases, coding is -999.
v1_clin_alc_5orm<-ifelse((v1_clin$v1_tabalk_ta9_alkkonsum==1 | v1_clin$v1_tabalk_ta9_alkkonsum==2 | v1_clin$v1_tabalk_ta9_alkkonsum==3),
-999,ifelse(is.na(v1_clin$v1_tabalk_ta10_alk_haeufigk_m)==T,
v1_clin$v1_tabalk_ta11_alk_haeufigk_f,v1_clin$v1_tabalk_ta10_alk_haeufigk_m))
v1_con_alc_5orm<-ifelse((v1_con$v1_tabalk_alkohol9==1 | v1_con$v1_tabalk_alkohol9==2 | v1_con$v1_tabalk_alkohol9==3),
-999,ifelse(is.na(v1_con$v1_tabalk_alkohol10)==T,
v1_con$v1_tabalk_alkohol11,v1_con$v1_tabalk_alkohol10))
v1_alc_5orm<-factor(c(v1_clin_alc_5orm,v1_con_alc_5orm), ordered=T)
descT(v1_alc_5orm)
## -999 1 2 3 4 5 6 7 8 9 <NA>
## [1,] No. cases 846 228 106 107 69 70 80 42 17 13 208 1786
## [2,] Percent 47.4 12.8 5.9 6 3.9 3.9 4.5 2.4 1 0.7 11.6 100
The criteria for alcohol dependence are checked, resulting in a dichotomous assessment whether lifetime alcohol dependence is present.
v1_clin_lftm_alc_dep<-ifelse(v1_clin$v1_tabalk_ta12_alk_vorhanden==1,"N",ifelse(v1_clin$v1_tabalk_ta12_alk_vorhanden==3,"Y",NA))
v1_con_lftm_alc_dep<-ifelse(v1_con$v1_tabalk_alkohol_abhaengig==1,"N",ifelse(v1_con$v1_tabalk_alkohol_abhaengig==3,"Y",NA))
v1_lftm_alc_dep<-factor(c(v1_clin_lftm_alc_dep,v1_con_lftm_alc_dep))
descT(v1_lftm_alc_dep)
## N Y <NA>
## [1,] No. cases 1359 131 296 1786
## [2,] Percent 76.1 7.3 16.6 100
In the PsyCourse Study, much information on illigit drugs was collected. Specifically, at the first visit, it was assessed whether the participant ever consumed illicit drugs, and, if yes:
In the present dataset, only a few variables (see below and follow-up visits) are included. At the end of this section, a specific file is exported containing the raw illicit drug data of the first visit (see below), which can be referred to if raw data is needed.
Preparations for preparing data on illicit drugs
Check whether for each illicit drug, only one category is ticked (code and results not shown).
Clinical participants
After review of the original data, modify the data of one individual, in which two categories were checked
Control participants
Recode several original items because they are wrongly coded in secuTrial exports (the graphical user interface and the exports do not match).
Assessment of frequency consumed when most frequently consumed
#clinical
#define function that recodes
v1_clin_mst_oft_recode <- function(drg_no) {
attach(v1_clin)
v1_clin_ill_mst_frq_oftn_mod<-ifelse(eval(as.name(paste("v1_drogen_s_dga_haeufigk_30043_",drg_no,sep="")))==5,1,
ifelse(eval(as.name(paste("v1_drogen_s_dga_haeufigk_30043_",drg_no,sep="")))==4,5,
ifelse(eval(as.name(paste("v1_drogen_s_dga_haeufigk_30043_",drg_no,sep="")))==3,4,
ifelse(eval(as.name(paste("v1_drogen_s_dga_haeufigk_30043_",drg_no,sep="")))==2,3,
ifelse(eval(as.name(paste("v1_drogen_s_dga_haeufigk_30043_",drg_no,sep="")))==1,2,NA)))))
detach(v1_clin)
assign(noquote(paste("v1_clin_drg_",drg_no,"_mst_frq_oftn",sep="")),v1_clin_ill_mst_frq_oftn_mod, envir=globalenv())
}
#apply function to all drugs (maximal number: 9)
for(no in c(1:9)){v1_clin_mst_oft_recode(no)}
#control
#define function that recodes
v1_con_mst_oft_recode <- function(drg_no) {
attach(v1_con)
v1_con_ill_mst_frq_oftn_mod<-ifelse(eval(as.name(paste("v1_drogen_droge_haeufig_117983_",drg_no,sep="")))==5,1,
ifelse(eval(as.name(paste("v1_drogen_droge_haeufig_117983_",drg_no,sep="")))==4,5,
ifelse(eval(as.name(paste("v1_drogen_droge_haeufig_117983_",drg_no,sep="")))==3,4,
ifelse(eval(as.name(paste("v1_drogen_droge_haeufig_117983_",drg_no,sep="")))==2,3,
ifelse(eval(as.name(paste("v1_drogen_droge_haeufig_117983_",drg_no,sep="")))==1,2,NA)))))
detach(v1_con)
assign(noquote(paste("v1_con_drg_",drg_no,"_mst_frq_oftn",sep="")),v1_con_ill_mst_frq_oftn_mod, envir=globalenv())
}
#apply function to all drugs (maximal number: 8)
for(no in c(1:8)){v1_con_mst_oft_recode(no)}
Assessment of frequency consumed in the past six months
v1_clin_pst_six_frq_recode <- function(drg_no) {
attach(v1_clin)
v1_clin_ill_pst_six_frq_mod<-ifelse(eval(as.name(paste("v1_drogen_s_dge_l6m_haeufig_30043_",drg_no,sep="")))==5,1,
ifelse(eval(as.name(paste("v1_drogen_s_dge_l6m_haeufig_30043_",drg_no,sep="")))==4,5,
ifelse(eval(as.name(paste("v1_drogen_s_dge_l6m_haeufig_30043_",drg_no,sep="")))==3,4,
ifelse(eval(as.name(paste("v1_drogen_s_dge_l6m_haeufig_30043_",drg_no,sep="")))==2,3,
ifelse(eval(as.name(paste("v1_drogen_s_dge_l6m_haeufig_30043_",drg_no,sep="")))==1,2,NA)))))
detach(v1_clin)
assign(noquote(paste("v1_clin_drg_",drg_no,"_pst_six_oftn",sep="")),v1_clin_ill_pst_six_frq_mod, envir=globalenv())
}
#apply function to all drugs (maximal number: 9)
for(no in c(1:9)){v1_clin_pst_six_frq_recode(no)}
v1_con_pst_six_frq_recode <- function(drg_no) {
attach(v1_con)
v1_con_ill_pst_six_frq_mod<-ifelse(eval(as.name(paste("v1_drogen_droge_letzte6m_117983_",drg_no,sep="")))==5,1,
ifelse(eval(as.name(paste("v1_drogen_droge_letzte6m_117983_",drg_no,sep="")))==4,5,
ifelse(eval(as.name(paste("v1_drogen_droge_letzte6m_117983_",drg_no,sep="")))==3,4,
ifelse(eval(as.name(paste("v1_drogen_droge_letzte6m_117983_",drg_no,sep="")))==2,3,
ifelse(eval(as.name(paste("v1_drogen_droge_letzte6m_117983_",drg_no,sep="")))==1,2,NA)))))
detach(v1_con)
assign(noquote(paste("v1_con_drg_",drg_no,"_pst_six_oftn",sep="")),v1_con_ill_pst_six_frq_mod, envir=globalenv())
}
#apply function to all drugs (maximal number: 8)
for(no in c(1:8)){v1_con_pst_six_frq_recode(no)}
Prepare the illicit drug items contained in this dataset
“Have you ever taken illicit drugs?” (dichotomous, v1_evr_ill_drg)
v1_clin_evr_ill_drg<-ifelse(v1_clin$v1_drogen_dg1_konsum==2, "Y", "N")
v1_con_evr_ill_drg<-ifelse(v1_con$v1_drogen_drogenkonsum==2, "Y", "N")
v1_evr_ill_drg<-factor(c(v1_clin_evr_ill_drg,v1_con_evr_ill_drg))
descT(v1_evr_ill_drg)
## N Y <NA>
## [1,] No. cases 894 695 197 1786
## [2,] Percent 50.1 38.9 11 100
Make datasets containing only information on illicit drugs
v1_drg_clin<-v1_clin[,880:1023]
v1_drg_con<-v1_con[,504:631]
Create vectors containg the different names of the different drug categories (and their dataframes; see below)
v1_drg_cat<-c("sti","can","opi","kok","hal","inh","tra","var")
v1_drg_cat_df_clin<-c("v1_sti_cli","v1_can_cli","v1_opi_cli","v1_kok_cli","v1_hal_cli","v1_inh_cli","v1_tra_cli","v1_var_cli")
v1_drg_cat_df_con<-c("v1_sti_con","v1_can_con","v1_opi_con","v1_kok_con","v1_hal_con","v1_inh_con","v1_tra_con","v1_var_con")
names(v1_drg_cat_df_clin)<-c(1:8)
names(v1_drg_cat_df_con)<-c(1:8)
The following variables are created below:
“Number of stimulants drugs ever consumed” (continuous
[number], v1_sti_cat_evr)
“Number of cannabis drugs ever consumed” (continuous [number],
v1_can_cat_evr)
“Number of opioid drugs ever consumed” (continuous [number],
v1_opi_cat_evr)
“Number of cocaine drugs ever consumed” (continuous [number],
v1_kok_cat_evr)
“Number of hallucinogenic drugs ever consumed” (continuous
[number], v1_hal_cat_evr)
“Number of inhalant drugs ever consumed” (continuous [number],
v1_inh_cat_evr)
“Number of tranquillizer drugs ever consumed” (continuous
[number], v1_tra_cat_evr)
“Number of other drugs ever consumed” (continuous [number],
v1_var_cat_evr)
The category of each drug is classified by checking a checkbox, corresponding to the category (e.g. stimulants). Here, for each individual drug ever taken, I select each checkbox corresponding to the same category, and sum across these, resulting in the number of drugs from the category (e.g. “stimulants”) that was ever taken. The same is done for all other categories.
Create dataframes, each for a different drug category, separately for clinical and control individuals. The last column of each of these dataframes contains the count across the rows of each dataframe.
for(i in c(1:8)){
assign(v1_drg_cat_df_clin[i],row_sums(v1_drg_clin[,grep(paste("v1_drogen_s_dg_drogekt",i,"_30043_",sep=""),names(v1_drg_clin))],var="v1_clin_evr",n=1))
assign(v1_drg_cat_df_con[i],row_sums(v1_drg_con[,grep(paste("v1_drogen_droge",i,"_117983_",sep=""),names(v1_drg_con))],var="v1_con_evr",n=1))
}
Bind each last column of the dataframes created above together. This results in a dataframe, in which the number of drugs from each category a participant has EVER TAKEN are listed.
Clinical participants: Combine into one dataframe
v1_drg_evr_cats_clin<-data.frame(v1_sti_cli[,dim(v1_sti_cli)[2]],
v1_can_cli[,dim(v1_can_cli)[2]],
v1_opi_cli[,dim(v1_opi_cli)[2]],
v1_kok_cli[,dim(v1_kok_cli)[2]],
v1_hal_cli[,dim(v1_hal_cli)[2]],
v1_inh_cli[,dim(v1_inh_cli)[2]],
v1_tra_cli[,dim(v1_tra_cli)[2]],
v1_var_cli[,dim(v1_var_cli)[2]])
names(v1_drg_evr_cats_clin)<-paste("v1_",v1_drg_cat,"_cat_evr",sep="")
Control participants: Combine into one dataframe
v1_drg_evr_cats_con<-data.frame(v1_sti_con[,dim(v1_sti_con)[2]],
v1_can_con[,dim(v1_can_con)[2]],
v1_opi_con[,dim(v1_opi_con)[2]],
v1_kok_con[,dim(v1_kok_con)[2]],
v1_hal_con[,dim(v1_hal_con)[2]],
v1_inh_con[,dim(v1_inh_con)[2]],
v1_tra_con[,dim(v1_tra_con)[2]],
v1_var_con[,dim(v1_var_con)[2]])
names(v1_drg_evr_cats_con)<-names(v1_drg_evr_cats_clin)
**Combine clinical and control drug datasets into dataset drg_evr_cats
drg_evr_cats<-rbind(v1_drg_evr_cats_clin,v1_drg_evr_cats_con)
“Was the participant ever a HEAVY USER of ANY DRUG? (dichotomous, v1_evr_hvy_usr)
clin_evr_hvy_usr<-ifelse(apply(data.frame(v1_clin_drg_1_mst_frq_oftn,
v1_clin_drg_2_mst_frq_oftn,
v1_clin_drg_3_mst_frq_oftn,
v1_clin_drg_4_mst_frq_oftn,
v1_clin_drg_5_mst_frq_oftn,
v1_clin_drg_6_mst_frq_oftn,
v1_clin_drg_7_mst_frq_oftn,
v1_clin_drg_8_mst_frq_oftn,
v1_clin_drg_9_mst_frq_oftn), 1, function(m) any(m %in% c(4,5))),"Y","N")
con_evr_hvy_usr<-ifelse(apply(data.frame(v1_con_drg_1_mst_frq_oftn,
v1_con_drg_2_mst_frq_oftn,
v1_con_drg_3_mst_frq_oftn,
v1_con_drg_4_mst_frq_oftn,
v1_con_drg_5_mst_frq_oftn,
v1_con_drg_6_mst_frq_oftn,
v1_con_drg_7_mst_frq_oftn,
v1_con_drg_8_mst_frq_oftn), 1, function(m) any(m %in% c(4,5))),"Y","N")
drg_evr_cats$v1_evr_hvy_usr<-c(clin_evr_hvy_usr,con_evr_hvy_usr)
“During the past six months, did you take ANY illicit drugs?” (dichotomous, v1_pst6_ill_drg)
v1_clin_lst6_any<-ifelse(apply(v1_drg_clin[,grep("v1_drogen_s_dgd_letzte6m_30043_",names(v1_drg_clin))], 1, function(r) any(r %in% 1)),"Y","N")
v1_con_lst6_any<-ifelse(apply(v1_drg_con[,grep("v1_drogen_droge_letzte6m_117983_",names(v1_drg_con))], 1, function(r) any(r %in% 1)),"Y","N")
v1_pst6_ill_drg<-c(v1_clin_lst6_any,v1_con_lst6_any)
v1_pst6_ill_drg[is.na(v1_evr_ill_drg)]<-NA #make NA if this item was not assessed
IMPORTANT: Make all row in df drg_evr_cats NA in individuals in which the drug consumption section was NOT assessed.
drg_evr_cats[is.na(v1_evr_ill_drg),]<-NA
Create dataset
v1_subst<-data.frame(v1_ever_smkd,
v1_age_smk,
v1_no_cig,
v1_alc_pst12_mths,
v1_alc_5orm,
v1_lftm_alc_dep,
v1_evr_ill_drg,
drg_evr_cats,
v1_pst6_ill_drg)
Here, separate datasets for clinical and control participants are created that contain the raw information on illicit drugs at visit 1, exactly as specified in the phenotype database.
For each illicit drug ever taken, the information given below is assessed.
The last character of each variable name always refers to the drug in question, so items ending with _1 refer to the first drug, _2 to the second drug and so on. In the variable descriptions below, these endings are omitted.
The drugs are not assessed in any specific order, i.e. the order is determined by the individual participant (whatever she or he mentions first).
Below, the variable names of clinical/control participants are given in quotes, and the coding is explained in the parentheses.
1. The name of the drug: “v1_drogen_s_dg_droge_30043”/“v1_drogen_droge_117983” (character)
The category to which the drug belongs (each item below is a checkbox: 0-not checked, 1-checked):
2. Stimulants:
“v1_drogen_s_dg_drogekt1_30043”/“v1_drogen_droge1_117983”
3. Cannabis:
“v1_drogen_s_dg_drogekt2_30043”/“v1_drogen_droge2_117983”
4. Opiates and pain reliefers:
“v1_drogen_s_dg_drogekt3_30043”/“v1_drogen_droge3_117983”
5. Cocaine:
“v1_drogen_s_dg_drogekt4_30043”/“v1_drogen_droge4_117983”
6. Hallucinogens:
“v1_drogen_s_dg_drogekt5_30043”/“v1_drogen_droge5_117983”
7. Inhalants:
“v1_drogen_s_dg_drogekt6_30043”/“v1_drogen_droge6_117983”
8. Tranquilizers:
“v1_drogen_s_dg_drogekt7_30043”/“v1_drogen_droge7_117983”
9. Other:
“v1_drogen_s_dg_drogekt8_30043”/“v1_drogen_droge8_117983”
10. “Referring to the time you consumed the drug most often, how often did you consume it?” “v1_drogen_s_dga_haeufigk_30043”/“v1_drogen_droge_haeufig_117983”
The coding is given below:
1 - tried 1 time
2 - less than once a month
3 - about once a month
4 - at least 2 times but less than 10 times a month
5 - at least 10 times a month
“How long was the period of time during which you consumed the
drug?”
11. Checkbox, if the period during which the drug was most often
consumed cannot be assessed:
“v1_drogen_s_dgb_zr_unbekannt_30043”/“v1_drogen_droge_zeit_u_117983”
12. Time (months): “v1_drogen_s_dgb_zeitraum_30043”/“v1_drogen_droge_zeit_117983”
13. “Referring to the period of time during which you consumed the drug most often, did you have to take more of the drug to achieve the same effect?” (Coding: 1-no, 2-yes). “v1_drogen_s_dgc_dosis_30043”/“v1_drogen_droge_dosis_117983”
14. “Did you ever consume this drug during the last six months?” (Coding: 1-no, 2-yes). “v1_drogen_s_dgd_letzte6m_30043/”v1_drogen_droge_letzte6m_117983”
If yes to question 14: *15.”Referring to the past six months, how often did you take consume the substance?“*”v1_drogen_s_dge_l6m_haeufig_30043”/“v1_drogen_droge_haeufig6m_117983_1”
The coding is given below: 2 - less than once a month
3 - about once a month
4 - at least two times but less than ten times a month
5 - at least ten times a month
16. “Referring to the past six months, did you have to take more of the drug to achieve the same effect?” (Coding: 1-no, 2-yes). “v1_drogen_s_dgf_l6m_dosis_30043”/“v1_drogen_droge_dosis6m_117983
Important: There is an error in the original phenotype database, that affects the coding of item 10 and 15 (above). In all drugs the exports of the phenotype database do not reflect the input into the graphical user interface. Below, the incorrect variables are replaced with the corrected ones
Clinical participants
v1_clin_ill_drugs_orig<-data.frame(v1_clin$mnppsd,v1_drg_clin)
names(v1_clin_ill_drugs_orig)[1]<-"v1_id"
#recode wrongly coded item 10
for(i in c(0:8)){
v1_clin_ill_drugs_orig[,11+i*16]<-ifelse(v1_clin_ill_drugs_orig[,11+i*16]==5,1,
ifelse(v1_clin_ill_drugs_orig[,11+i*16]==4,5,
ifelse(v1_clin_ill_drugs_orig[,11+i*16]==3,4,
ifelse(v1_clin_ill_drugs_orig[,11+i*16]==2,3,
ifelse(v1_clin_ill_drugs_orig[,11+i*16]==1,2,NA)))))}
#recode wrongly coded item 15
for(i in c(0:8)){
v1_clin_ill_drugs_orig[,16+i*16]<-ifelse(v1_clin_ill_drugs_orig[,16+i*16]==5,1,
ifelse(v1_clin_ill_drugs_orig[,16+i*16]==4,5,
ifelse(v1_clin_ill_drugs_orig[,16+i*16]==3,4,
ifelse(v1_clin_ill_drugs_orig[,16+i*16]==2,3,
ifelse(v1_clin_ill_drugs_orig[,16+i*16]==1,2,NA)))))}
Control participants
v1_con_ill_drugs_orig<-data.frame(v1_con$mnppsd,v1_drg_con)
names(v1_con_ill_drugs_orig)[1]<-"v1_id"
#recode wrongly coded item 10
for(i in c(0:7)){
v1_con_ill_drugs_orig[,11+i*16]<-ifelse(v1_con_ill_drugs_orig[,11+i*16]==5,1,
ifelse(v1_con_ill_drugs_orig[,11+i*16]==4,5,
ifelse(v1_con_ill_drugs_orig[,11+i*16]==3,4,
ifelse(v1_con_ill_drugs_orig[,11+i*16]==2,3,
ifelse(v1_con_ill_drugs_orig[,11+i*16]==1,2,NA)))))}
#recode wrongly coded item 15
for(i in c(0:7)){
v1_con_ill_drugs_orig[,16+i*16]<-ifelse(v1_con_ill_drugs_orig[,16+i*16]==5,1,
ifelse(v1_con_ill_drugs_orig[,16+i*16]==4,5,
ifelse(v1_con_ill_drugs_orig[,16+i*16]==3,4,
ifelse(v1_con_ill_drugs_orig[,16+i*16]==2,3,
ifelse(v1_con_ill_drugs_orig[,16+i*16]==1,2,NA)))))}
Save raw illicit drug dataset from visit 1
save(v1_clin_ill_drugs_orig, file="230614_v6.0_psycourse_clin_raw_ill_drg_visit1.RData")
save(v1_con_ill_drugs_orig, file="230614_v6.0_psycourse_con_raw_ill_drg_visit1.RData")
Write .csv file
write.table(v1_clin_ill_drugs_orig,file="230614_v6.0_psycourse_clin_raw_ill_drg_visit1.csv", quote=F, row.names=F, col.names=T, sep="\t")
write.table(v1_con_ill_drugs_orig,file="230614_v6.0_psycourse_con_raw_ill_drg_visit1.csv", quote=F, row.names=F, col.names=T, sep="\t")
Parts of the Structured Clinical Interview for DSM Disorders (SCID) were carried out (sections A Affective Syndromes, B Psychotic and Associated Symptoms, X Suicide attempts and suicidal ideation, and either section C (Differential diagnosis of Psychotic disorders) or section D (Differential diagnosis of Affective disorders). The most important variables of sections A, B, ans X are included in this dataset, usually coded “Y”-yes, “N”-no and “U”-unknown.
For control participants, every SCID variable is coded “-999”.
We have included the DSM-IV diagnosis resulting from the combined efforts of a SCID interview and a screening of medical records (if available). Difficult cases were resolved by a discussion of experts.
There are study participants in which this item reads “MImicSS”. These are PsyCourse participants, but they have been recruited using a modified protocol, in which their ICD-10 diagnoses were not reassessed within the DSM-IV framework.
All of these clinical participants have ICD-10 Schizophrenia (F20.0).
v1_clin_scid_dsm_dx<-v1_clin$v1_skid_deckblatt_dsmiv_konsensusdiag_34407_1
v1_clin_scid_dsm_dx<-as.character(v1_clin_scid_dsm_dx)
v1_clin_scid_dsm_dx[v1_clin_scid_dsm_dx=="296.x"]<-"296.X"
v1_con_scid_dsm_dx<-rep("-999",dim(v1_con)[1])
v1_scid_dsm_dx<-c(v1_clin_scid_dsm_dx,v1_con_scid_dsm_dx)
descT(v1_scid_dsm_dx)
## -999 295.10 295.20 295.30 295.40 295.60 295.70 295.90 296.3
## [1,] No. cases 466 15 11 437 12 4 100 12 101
## [2,] Percent 26.1 0.8 0.6 24.5 0.7 0.2 5.6 0.7 5.7
## 296.89 296.X 298.80 MImicSS
## [1,] 120 446 6 56 1786
## [2,] 6.7 25 0.3 3.1 100
DSM-IV diagnoses in human readable form for non-clinical researchers. Please note the following:
v1_clin_scid_dsm_dx_cat<-rep("NA",dim(v1_clin)[1])
v1_con_scid_dsm_dx_cat<-rep("NA",dim(v1_con)[1])
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("295.10", "295.20", "295.30", "295.60",
"295.90")]<-"Schizophrenia"
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("295.70")]<-"Schizoaffective Disorder"
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("295.40")]<-"Schizophreniform Disorder"
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("298.80")]<-"Brief Psychotic Disorder"
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("296.X")]<-"Bipolar-I Disorder"
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("296.89")]<-"Bipolar-II Disorder"
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("296.3")]<-"Recurrent Depression"
v1_clin_scid_dsm_dx_cat[v1_clin_scid_dsm_dx %in% c("MImicSS")]<-"ICD-10 Schizophrenia"
v1_con_scid_dsm_dx_cat<-rep("Control",dim(v1_con)[1])
v1_scid_dsm_dx_cat<-c(v1_clin_scid_dsm_dx_cat,v1_con_scid_dsm_dx_cat)
descT(v1_scid_dsm_dx_cat)
## Bipolar-I Disorder Bipolar-II Disorder Brief Psychotic Disorder
## [1,] No. cases 446 120 6
## [2,] Percent 25 6.7 0.3
## Control ICD-10 Schizophrenia Recurrent Depression Schizoaffective Disorder
## [1,] 466 56 101 100
## [2,] 26.1 3.1 5.7 5.6
## Schizophrenia Schizophreniform Disorder
## [1,] 479 12 1786
## [2,] 26.8 0.7 100
The following items were assessed in clincal participants only!
Age at first MDD episode (continuous [years], v1_scid_age_MDE) This item includes all individuals that ever fulfilled MDD criteria. Also a person with e.g. schizophrenia can have a value on this item. If the individual ever fulfilled MDD criteria, the age at the first MDD episode is given. NA on this item means that age at first MDD episode is missing. Individuals that never experienced an MDD episode are coded as “-999”.
Control individiuals are coded as “-999”.
v1_clin_scid_age_MDE<-ifelse(is.na(v1_clin$v1_sna_21_mde1_a79_beurteilung),-999,
ifelse(v1_clin$v1_sna_21_mde1_a79_beurteilung==3, v1_clin$v1_sna_21_mde1_s_snx_alter_jahre_30038_1,
ifelse((v1_clin$v1_sna_21_mde1_a79_beurteilung==1 | v1_clin$v1_sna_21_mde1_a79_beurteilung==0), -999, NA)))
descT(v1_clin_scid_age_MDE)
## -999 2 4 6 7 8 9 10 11 12 13 14 15 16 17 18
## [1,] No. cases 409 1 1 3 4 1 4 8 10 12 14 27 22 40 40 37
## [2,] Percent 31 0.1 0.1 0.2 0.3 0.1 0.3 0.6 0.8 0.9 1.1 2 1.7 3 3 2.8
## 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
## [1,] 45 41 41 24 31 34 38 23 26 21 12 37 17 25 13 12 11 10 14
## [2,] 3.4 3.1 3.1 1.8 2.3 2.6 2.9 1.7 2 1.6 0.9 2.8 1.3 1.9 1 0.9 0.8 0.8 1.1
## 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
## [1,] 6 7 15 12 10 13 5 15 5 8 8 5 10 3 9 7 3 3 2
## [2,] 0.5 0.5 1.1 0.9 0.8 1 0.4 1.1 0.4 0.6 0.6 0.4 0.8 0.2 0.7 0.5 0.2 0.2 0.2
## 57 58 59 60 61 69 <NA>
## [1,] 1 1 1 3 1 1 58 1320
## [2,] 0.1 0.1 0.1 0.2 0.1 0.1 4.4 100
v1_scid_age_MDE<-c(v1_clin_scid_age_MDE,rep(-999,dim(v1_con)[1]))
descT(v1_scid_age_MDE)
## -999 2 4 6 7 8 9 10 11 12 13 14 15 16 17 18
## [1,] No. cases 875 1 1 3 4 1 4 8 10 12 14 27 22 40 40 37
## [2,] Percent 49 0.1 0.1 0.2 0.2 0.1 0.2 0.4 0.6 0.7 0.8 1.5 1.2 2.2 2.2 2.1
## 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
## [1,] 45 41 41 24 31 34 38 23 26 21 12 37 17 25 13 12 11 10 14
## [2,] 2.5 2.3 2.3 1.3 1.7 1.9 2.1 1.3 1.5 1.2 0.7 2.1 1 1.4 0.7 0.7 0.6 0.6 0.8
## 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
## [1,] 6 7 15 12 10 13 5 15 5 8 8 5 10 3 9 7 3 3
## [2,] 0.3 0.4 0.8 0.7 0.6 0.7 0.3 0.8 0.3 0.4 0.4 0.3 0.6 0.2 0.5 0.4 0.2 0.2
## 56 57 58 59 60 61 69 <NA>
## [1,] 2 1 1 1 3 1 1 58 1786
## [2,] 0.1 0.1 0.1 0.1 0.2 0.1 0.1 3.2 100
Number of MDD episodes (continuous [number], v1_scid_no_MDE) In individuals that ever fulfilled MDD criteria, the number of MDD episodes is given. Please note the following:
v1_clin_scid_no_MDE<-ifelse(is.na(v1_clin$v1_sna_21_mde1_a79_beurteilung),-999,
ifelse(v1_clin$v1_sna_21_mde1_a79_beurteilung==3, v1_clin$v1_sna_21_mde1_a81_anzahl,
ifelse((v1_clin$v1_sna_21_mde1_a79_beurteilung==1 | v1_clin$v1_sna_21_mde1_a79_beurteilung==0), -999, NA)))
descT(v1_clin_scid_no_MDE)
## -999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
## [1,] No. cases 409 75 96 95 86 64 35 19 33 9 40 8 14 3 4 18
## [2,] Percent 31 5.7 7.3 7.2 6.5 4.8 2.7 1.4 2.5 0.7 3 0.6 1.1 0.2 0.3 1.4
## 16 17 18 20 21 22 23 25 26 29 30 32 35 36 39 40 50 60
## [1,] 2 3 1 21 1 1 1 3 2 2 12 1 1 1 1 2 2 2
## [2,] 0.2 0.2 0.1 1.6 0.1 0.1 0.1 0.2 0.2 0.2 0.9 0.1 0.1 0.1 0.1 0.2 0.2 0.2
## 70 75 99 <NA>
## [1,] 1 1 199 52 1320
## [2,] 0.1 0.1 15.1 3.9 100
v1_scid_no_MDE<-c(v1_clin_scid_no_MDE,rep(-999,dim(v1_con)[1])) #add -999 for control individuals
descT(v1_scid_no_MDE)
## -999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
## [1,] No. cases 875 75 96 95 86 64 35 19 33 9 40 8 14 3 4 18
## [2,] Percent 49 4.2 5.4 5.3 4.8 3.6 2 1.1 1.8 0.5 2.2 0.4 0.8 0.2 0.2 1
## 16 17 18 20 21 22 23 25 26 29 30 32 35 36 39 40 50 60
## [1,] 2 3 1 21 1 1 1 3 2 2 12 1 1 1 1 2 2 2
## [2,] 0.1 0.2 0.1 1.2 0.1 0.1 0.1 0.2 0.1 0.1 0.7 0.1 0.1 0.1 0.1 0.1 0.1 0.1
## 70 75 99 <NA>
## [1,] 1 1 199 52 1786
## [2,] 0.1 0.1 11.1 2.9 100
###Mania and hypomania Age at first manic episode (continuous, v1_scid_age_mania) This item includes all individuals that ever fulfilled mania criteria. Also a person with e.g. schizophrenia can have a value on this item. If the individual ever fulfilled mania criteria, the age at the first manic episode is given. NA on this item means that age at first mania episode is missing.
Individuals that never experienced a manic episode are coded as “-999”.
Control individiuals are coded as “-999”.
v1_clin_scid_age_mania<-ifelse(is.na(v1_clin$v1_sna_23_manie1_a142_beurteilung),-999,
ifelse(v1_clin$v1_sna_23_manie1_a142_beurteilung==3, v1_clin$v1_sna_24_hypomane1_a143_alter_jahre,
ifelse((v1_clin$v1_sna_23_manie1_a142_beurteilung==1 | v1_clin$v1_sna_23_manie1_a142_beurteilung==0), -999, NA)))
descT(v1_clin_scid_age_mania)
## -999 5 10 11 12 13 14 15 16 17 18 19 20 21 22 23
## [1,] No. cases 775 1 1 2 2 3 6 9 18 12 18 13 31 15 19 21
## [2,] Percent 58.7 0.1 0.1 0.2 0.2 0.2 0.5 0.7 1.4 0.9 1.4 1 2.3 1.1 1.4 1.6
## 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
## [1,] 20 32 16 19 17 9 13 7 6 9 17 7 9 8 8 5 15 14 8
## [2,] 1.5 2.4 1.2 1.4 1.3 0.7 1 0.5 0.5 0.7 1.3 0.5 0.7 0.6 0.6 0.4 1.1 1.1 0.6
## 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 59 60 61
## [1,] 6 6 9 5 3 2 4 4 4 4 4 3 2 3 3 1 2 1
## [2,] 0.5 0.5 0.7 0.4 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.2 0.2 0.2 0.2 0.1 0.2 0.1
## 65 <NA>
## [1,] 2 67 1320
## [2,] 0.2 5.1 100
v1_scid_age_mania<-c(v1_clin_scid_age_mania,rep(-999,dim(v1_con)[1])) #add -999 for control individuals
descT(v1_scid_age_mania)
## -999 5 10 11 12 13 14 15 16 17 18 19 20 21 22 23
## [1,] No. cases 1241 1 1 2 2 3 6 9 18 12 18 13 31 15 19 21
## [2,] Percent 69.5 0.1 0.1 0.1 0.1 0.2 0.3 0.5 1 0.7 1 0.7 1.7 0.8 1.1 1.2
## 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
## [1,] 20 32 16 19 17 9 13 7 6 9 17 7 9 8 8 5 15 14 8
## [2,] 1.1 1.8 0.9 1.1 1 0.5 0.7 0.4 0.3 0.5 1 0.4 0.5 0.4 0.4 0.3 0.8 0.8 0.4
## 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 59 60 61
## [1,] 6 6 9 5 3 2 4 4 4 4 4 3 2 3 3 1 2 1
## [2,] 0.3 0.3 0.5 0.3 0.2 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.1 0.2 0.2 0.1 0.1 0.1
## 65 <NA>
## [1,] 2 67 1786
## [2,] 0.1 3.8 100
Number of manic episodes (continuous [number], v1_scid_no_mania) In individuals that ever fulfilled criteria for mania, the number of mania episodes is given. Please note the following:
v1_clin_scid_no_mania<-ifelse(is.na(v1_clin$v1_sna_23_manie1_a142_beurteilung),-999,
ifelse(v1_clin$v1_sna_23_manie1_a142_beurteilung==3, v1_clin$v1_sna_24_hypomane1_a145_anzahl2,
ifelse((v1_clin$v1_sna_23_manie1_a142_beurteilung==1 | v1_clin$v1_sna_23_manie1_a142_beurteilung==0), -999, NA)))
descT(v1_clin_scid_no_mania)
## -999 1 2 3 4 5 6 7 8 10 11 12 13 14 15 17
## [1,] No. cases 775 90 68 54 37 33 20 12 14 25 2 5 1 2 3 1
## [2,] Percent 58.7 6.8 5.2 4.1 2.8 2.5 1.5 0.9 1.1 1.9 0.2 0.4 0.1 0.2 0.2 0.1
## 20 22 24 25 30 50 96 99 <NA>
## [1,] 12 1 1 1 4 1 1 47 110 1320
## [2,] 0.9 0.1 0.1 0.1 0.3 0.1 0.1 3.6 8.3 100
v1_scid_no_mania<-c(v1_clin_scid_no_mania,rep(-999,dim(v1_con)[1])) #add -999 for control individuals
descT(v1_scid_no_mania)
## -999 1 2 3 4 5 6 7 8 10 11 12 13 14 15 17
## [1,] No. cases 1241 90 68 54 37 33 20 12 14 25 2 5 1 2 3 1
## [2,] Percent 69.5 5 3.8 3 2.1 1.8 1.1 0.7 0.8 1.4 0.1 0.3 0.1 0.1 0.2 0.1
## 20 22 24 25 30 50 96 99 <NA>
## [1,] 12 1 1 1 4 1 1 47 110 1786
## [2,] 0.7 0.1 0.1 0.1 0.2 0.1 0.1 2.6 6.2 100
Age at first hypomanic episode (continuous, v1_scid_age_hypomania) This item includes all individuals that ever fulfilled criteria for hypomania, but never fullfilled criteria for mania. Also a person with e.g. schizophrenia can have a value on this item. If the individual ever fulfilled hypomania criteria (without ever fulfilling criteria of mania), the age at the first hypomanic episode is given. NA on this item means that age at first hypomanic episode is missing.
Individuals that never experienced a hypomanic episode, or had one or more mania episodes, are coded as “-999”.
Control individiuals are coded as “-999”.
v1_clin_scid_age_hypomania<-ifelse(is.na(v1_clin$v1_sna_24_hypomane1_a_160_beurteilung),-999,
ifelse(v1_clin$v1_sna_24_hypomane1_a_160_beurteilung==3, v1_clin$v1_sna_24_hypomane1_a160a_alter_jahre,
ifelse((v1_clin$v1_sna_24_hypomane1_a_160_beurteilung==1 | v1_clin$v1_sna_24_hypomane1_a_160_beurteilung==0), -999, NA)))
descT(v1_clin_scid_age_hypomania)
## -999 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28
## [1,] No. cases 1185 2 5 4 1 5 6 4 7 5 7 1 4 3 4 1
## [2,] Percent 89.8 0.2 0.4 0.3 0.1 0.4 0.5 0.3 0.5 0.4 0.5 0.1 0.3 0.2 0.3 0.1
## 29 30 31 32 33 34 35 36 37 38 40 42 43 45 46 47 48 50
## [1,] 2 3 3 5 2 3 3 2 3 2 2 1 1 2 2 1 2 2
## [2,] 0.2 0.2 0.2 0.4 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.1 0.1 0.2 0.2 0.1 0.2 0.2
## 51 53 54 55 65 <NA>
## [1,] 1 1 5 5 1 22 1320
## [2,] 0.1 0.1 0.4 0.4 0.1 1.7 100
v1_scid_age_hypomania<-c(v1_clin_scid_age_hypomania,rep(-999,dim(v1_con)[1])) #add -999 for control individuals
descT(v1_scid_age_hypomania)
## -999 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28
## [1,] No. cases 1651 2 5 4 1 5 6 4 7 5 7 1 4 3 4 1
## [2,] Percent 92.4 0.1 0.3 0.2 0.1 0.3 0.3 0.2 0.4 0.3 0.4 0.1 0.2 0.2 0.2 0.1
## 29 30 31 32 33 34 35 36 37 38 40 42 43 45 46 47 48 50
## [1,] 2 3 3 5 2 3 3 2 3 2 2 1 1 2 2 1 2 2
## [2,] 0.1 0.2 0.2 0.3 0.1 0.2 0.2 0.1 0.2 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
## 51 53 54 55 65 <NA>
## [1,] 1 1 5 5 1 22 1786
## [2,] 0.1 0.1 0.3 0.3 0.1 1.2 100
Number of hypomanic episodes (continuous [number (but see below)], v1_scid_no_hypomania) In individuals that ever fulfilled criteria for hypomania, but never fullfilled criteria for mania, the number of hypomanic episodes is given. Please note the following:
v1_clin_scid_no_hypomania<-ifelse(is.na(v1_clin$v1_sna_24_hypomane1_a_160_beurteilung),-999,
ifelse(v1_clin$v1_sna_24_hypomane1_a_160_beurteilung==3, v1_clin$v1_sna_24_hypomane1_a161_anzahl,
ifelse((v1_clin$v1_sna_24_hypomane1_a_160_beurteilung==1 | v1_clin$v1_sna_24_hypomane1_a_160_beurteilung==0), -999, NA)))
descT(v1_clin_scid_no_hypomania)
## -999 1 2 3 4 5 6 7 8 10 12 14 15 18 20 30
## [1,] No. cases 1185 19 14 13 7 4 2 6 2 5 1 1 2 1 2 1
## [2,] Percent 89.8 1.4 1.1 1 0.5 0.3 0.2 0.5 0.2 0.4 0.1 0.1 0.2 0.1 0.2 0.1
## 70 75 99 <NA>
## [1,] 1 1 15 38 1320
## [2,] 0.1 0.1 1.1 2.9 100
v1_scid_no_hypomania<-c(v1_clin_scid_no_hypomania,rep(-999,dim(v1_con)[1])) #add -999 for control individuals
descT(v1_scid_no_hypomania)
## -999 1 2 3 4 5 6 7 8 10 12 14 15 18 20 30
## [1,] No. cases 1651 19 14 13 7 4 2 6 2 5 1 1 2 1 2 1
## [2,] Percent 92.4 1.1 0.8 0.7 0.4 0.2 0.1 0.3 0.1 0.3 0.1 0.1 0.1 0.1 0.1 0.1
## 70 75 99 <NA>
## [1,] 1 1 15 38 1786
## [2,] 0.1 0.1 0.8 2.1 100
This section was assessed in all study participants. If at least one item covering delusions (delusion item) or hallucinations (hallucination item) was answered in the affirmative this was coded “Y”, otherwise “N”. Please note that an individual was also coded as “N” if there was insufficient information (“0” on the original SCID item; occuring only in few individuals) or if the symptom was too mild to fulfill criteria (“2” on the original SCID item).
NA means that at least one question was not completed and all other completed questions were coded “N”.
v1_clin_scid_ever_delus<-ifelse((is.na(v1_clin$v1_snb_31_prodsymp1_b12_beeinflusswahn) &
is.na(v1_clin$v1_snb_31_prodsymp1_b13_gedankenentzug) &
is.na(v1_clin$v1_snb_31_prodsymp1_b14_gedankenueber) &
v1_clin$v1_snb_31_prodsymp1_b1_beziehungswahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b2_verfolgungswahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b3_groessenwahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b4_koerper_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b6_relig_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b7_schuld_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b8_eifer_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b9_liebe_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b10_nihilist_wahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b11_veram_wahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b12_sonstiger_wahn!=3), "N",
ifelse((v1_clin$v1_snb_31_prodsymp1_b12_beeinflusswahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b13_gedankenentzug!=3 &
v1_clin$v1_snb_31_prodsymp1_b14_gedankenueber!=3 &
v1_clin$v1_snb_31_prodsymp1_b1_beziehungswahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b2_verfolgungswahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b3_groessenwahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b4_koerper_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b6_relig_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b7_schuld_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b8_eifer_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b9_liebe_wahnideen!=3 &
v1_clin$v1_snb_31_prodsymp1_b10_nihilist_wahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b11_veram_wahn!=3 &
v1_clin$v1_snb_31_prodsymp1_b12_sonstiger_wahn!=3), "N",
ifelse((v1_clin$v1_snb_31_prodsymp1_b1_beziehungswahn==3 |
v1_clin$v1_snb_31_prodsymp1_b2_verfolgungswahn==3 |
v1_clin$v1_snb_31_prodsymp1_b3_groessenwahn==3 |
v1_clin$v1_snb_31_prodsymp1_b4_koerper_wahnideen==3 |
v1_clin$v1_snb_31_prodsymp1_b6_relig_wahnideen==3 |
v1_clin$v1_snb_31_prodsymp1_b7_schuld_wahnideen==3 |
v1_clin$v1_snb_31_prodsymp1_b8_eifer_wahnideen==3 |
v1_clin$v1_snb_31_prodsymp1_b9_liebe_wahnideen==3 |
v1_clin$v1_snb_31_prodsymp1_b10_nihilist_wahn==3 |
v1_clin$v1_snb_31_prodsymp1_b11_veram_wahn==3 |
v1_clin$v1_snb_31_prodsymp1_b12_sonstiger_wahn==3 |
v1_clin$v1_snb_31_prodsymp1_b12_beeinflusswahn==3 |
v1_clin$v1_snb_31_prodsymp1_b13_gedankenentzug==3 |
v1_clin$v1_snb_31_prodsymp1_b14_gedankenueber==3),"Y",NA)))
v1_scid_ever_delus<-factor(c(v1_clin_scid_ever_delus,rep(-999,dim(v1_con)[1])))
summary(v1_scid_ever_delus)
## -999 N Y NA's
## 466 333 873 114
v1_clin_scid_ever_halls<-ifelse(v1_clin$v1_snb_31_prodsymp1_b21_olfaktor_halluz==3 |
v1_clin$v1_snb_31_prodsymp1_b_21_gustator_halluz==3 |
v1_clin$v1_snb_31_prodsymp1_b20_taktil_halluz==3 |
v1_clin$v1_snb_31_prodsymp1_b19_opt_halluz==3 |
v1_clin$v1_snb_31_prodsymp1_b16_akust_halluz==3, "Y", "N")
v1_scid_ever_halls<-factor(c(v1_clin_scid_ever_halls,rep(-999,dim(v1_con)[1])))
summary(v1_scid_ever_halls)
## -999 N Y NA's
## 466 617 612 91
This item combines the two previous items. If ever delusional or ever hallucinations then yes. This is a crude operational definition of psychosis, as it takes into account only symptoms and not e.g. level of functioning or other aspects.
v1_clin_scid_ever_psyc<-ifelse(v1_clin_scid_ever_delus=="Y" | v1_clin_scid_ever_halls=="Y","Y","N")
v1_scid_ever_psyc<-factor(c(v1_clin_scid_ever_psyc,rep("-999",dim(v1_con)[1])))
summary(v1_scid_ever_psyc)
## -999 N Y NA's
## 466 304 897 119
Age at first occurence of psychotic symptoms (continuous [years], v1_scid_age_fst_psyc)
v1_clin_scid_age_fst_psy<-c(v1_clin$v1_snc_41_schizo4_c17_alter_jahre,rep(-999,dim(v1_con)[1]))
v1_scid_age_fst_psyc<-ifelse(v1_scid_ever_psyc=="Y",v1_clin_scid_age_fst_psy,-999)
summary(v1_scid_age_fst_psyc[v1_scid_age_fst_psyc>=0])
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 6.00 21.00 27.00 29.32 35.75 73.00 606
Year in which first psychotic symptoms occured (continuous [year], v1_scid_yr_fst_psyc)
v1_clin_scid_yr_fst_psyc<-c(v1_clin$v1_snc_41_schizo4_c17_psycho_jahr,rep(-999,dim(v1_con)[1]))
v1_scid_yr_fst_psyc<-ifelse(v1_scid_ever_psyc=="Y",v1_clin_scid_yr_fst_psyc,-999)
descT(v1_scid_yr_fst_psyc)
## -999 1950 1962 1965 1967 1969 1970 1971 1973 1974 1975 1976 1977
## [1,] No. cases 770 1 1 1 1 1 1 2 3 2 1 1 6
## [2,] Percent 43.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.1 0.1 0.1 0.3
## 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993
## [1,] 3 1 6 1 3 5 4 3 4 10 5 5 9 6 9
## [2,] 0.2 0.1 0.3 0.1 0.2 0.3 0.2 0.2 0.2 0.6 0.3 0.3 0.5 0.3 0.5
## 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008
## [1,] 5 9 14 6 9 16 11 13 14 15 11 15 17 21 13
## [2,] 0.3 0.5 0.8 0.3 0.5 0.9 0.6 0.7 0.8 0.8 0.6 0.8 1 1.2 0.7
## 2009 2010 2011 2012 2013 2014 2015 <NA>
## [1,] 10 16 20 12 13 8 4 649 1786
## [2,] 0.6 0.9 1.1 0.7 0.7 0.4 0.2 36.3 100
Please not that the following items on suicidal ideation were skipped (and coded -999) if this question was not answered positively. The answer “insufficient information” was coded as -999.
v1_scid_evr_suic_ide<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_scid_evr_suic_ide<-ifelse(c(v1_clin$v1_snx_112_suizged2_x7_suizid_gedanken,rep(-999,dim(v1_con)[1]))==0, -999,
ifelse(c(v1_clin$v1_snx_112_suizged2_x7_suizid_gedanken,rep(-999,dim(v1_con)[1]))==1, "N",
ifelse(c(v1_clin$v1_snx_112_suizged2_x7_suizid_gedanken,rep(-999,dim(v1_con)[1]))==3, "Y",
v1_scid_evr_suic_ide)))
descT(v1_scid_evr_suic_ide)
## -999 N Y <NA>
## [1,] No. cases 473 298 930 85 1786
## [2,] Percent 26.5 16.7 52.1 4.8 100
This is an ordinal item with the following gradation: “only fleeting thoughts”-1, “serious thoughts (details were elaborated)”-2, “persistent thoughts (serious and less serious)”-3, “options 2 and 3 together”-4. The item is coded “-999” if skipped (see above).
v1_scid_suic_ide<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_scid_suic_ide<-ifelse(v1_scid_evr_suic_ide!="Y", -999,
ifelse(c(v1_clin$v1_snx_112_suizged2_x8_suizged_inhalt,rep(-999,dim(v1_con)[1]))==1, 1,
ifelse(c(v1_clin$v1_snx_112_suizged2_x8_suizged_inhalt,rep(-999,dim(v1_con)[1]))==2, 2,
ifelse(c(v1_clin$v1_snx_112_suizged2_x8_suizged_inhalt,rep(-999,dim(v1_con)[1]))==3, 3,
ifelse(c(v1_clin$v1_snx_112_suizged2_x8_suizged_inhalt==4,rep(-999,dim(v1_con)[1])), 4, v1_scid_suic_ide)))))
v1_scid_suic_ide<-factor(v1_scid_suic_ide,ordered=T)
descT(v1_scid_suic_ide)
## -999 1 2 3 4 <NA>
## [1,] No. cases 771 297 124 134 345 115 1786
## [2,] Percent 43.2 16.6 6.9 7.5 19.3 6.4 100
This is an ordinal item with the following gradation: “no”-1, “yes, but no details”-2, “yes, including details”-3. The item is coded “-999” if skipped (see above).
v1_scid_suic_thght_mth<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_scid_suic_thght_mth<-ifelse(v1_scid_evr_suic_ide!="Y", -999,
ifelse(c(v1_clin$v1_snx_112_suizged2_x10_suiz_methoden,rep(-999,dim(v1_con)[1]))==1, 1,
ifelse(c(v1_clin$v1_snx_112_suizged2_x10_suiz_methoden,rep(-999,dim(v1_con)[1]))==2, 2,
ifelse(c(v1_clin$v1_snx_112_suizged2_x10_suiz_methoden,rep(-999,dim(v1_con)[1]))==3, 3,
v1_scid_suic_thght_mth))))
v1_scid_suic_thght_mth<-factor(v1_scid_suic_thght_mth,ordered=T)
descT(v1_scid_suic_thght_mth)
## -999 1 2 3 <NA>
## [1,] No. cases 771 271 284 328 132 1786
## [2,] Percent 43.2 15.2 15.9 18.4 7.4 100
This is on ordinal item with the following gradation: “no”-1, “having thought about”-2, “persistent thoughts (serious and less serious)”-3, “options 2 and 3 together”-4. The item is coded “-999” if skipped (see above).
v1_scid_suic_note_thgts<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_scid_suic_note_thgts<-ifelse(v1_scid_evr_suic_ide!="Y", -999,
ifelse(c(v1_clin$v1_snx_112_suizged2_x11_best_erledigt,rep(-999,dim(v1_con)[1]))==1, 1,
ifelse(c(v1_clin$v1_snx_112_suizged2_x11_best_erledigt,rep(-999,dim(v1_con)[1]))==2, 2,
ifelse(c(v1_clin$v1_snx_112_suizged2_x11_best_erledigt,rep(-999,dim(v1_con)[1]))==3, 3,
ifelse(c(v1_clin$v1_snx_112_suizged2_x11_best_erledigt,rep(-999,dim(v1_con)[1]))==4, 4, v1_scid_suic_note_thgts)))))
v1_scid_suic_note_thgts<-factor(v1_scid_suic_note_thgts,ordered=T)
descT(v1_scid_suic_note_thgts)
## -999 1 2 3 4 <NA>
## [1,] No. cases 771 681 46 28 117 143 1786
## [2,] Percent 43.2 38.1 2.6 1.6 6.6 8 100
This is on ordinal item with the following gradation: “no”-1, “interruption of attempt”-2, “yes”-3. Please not that the following items on suicidal attempt were skipped if this question was answered with “no”.The answer “insufficient information was coded as -999.
v1_suic_attmpt<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_suic_attmpt<-ifelse(c(v1_clin$v1_snx_111_suizvrs2_x1_suiz_vers,rep(-999,dim(v1_con)[1]))==0, -999,
ifelse(c(v1_clin$v1_snx_111_suizvrs2_x1_suiz_vers,rep(-999,dim(v1_con)[1]))==1, 1,
ifelse(c(v1_clin$v1_snx_111_suizvrs2_x1_suiz_vers,rep(-999,dim(v1_con)[1]))==2, 2,
ifelse(c(v1_clin$v1_snx_111_suizvrs2_x1_suiz_vers,rep(-999,dim(v1_con)[1]))==3, 3,
v1_suic_attmpt))))
v1_suic_attmpt<-factor(v1_suic_attmpt,ordered=T)
descT(v1_suic_attmpt)
## -999 1 2 3 <NA>
## [1,] No. cases 475 806 53 364 88 1786
## [2,] Percent 26.6 45.1 3 20.4 4.9 100
This is on ordinal item with the following gradation: “1 time”-1, “2 times”-2, “3-times”-3, “4 times”-4, “5 times”-5, “6 or more times”-6. The item is coded “-999” if skipped (see above).
Please note: the maximum number of suicide attemts in the dataset is three, although an even higher number of attempts can theoretically be coded in the eCRF.
v1_scid_no_suic_attmpt<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_scid_no_suic_attmpt<-ifelse(v1_suic_attmpt==1, -999,
ifelse(v1_suic_attmpt>1, c(v1_clin$v1_snx_111_suizvrs2_x2_suiz_anz,rep(-999,dim(v1_con)[1])), v1_scid_no_suic_attmpt))
v1_scid_no_suic_attmpt<-factor(v1_scid_no_suic_attmpt,ordered=T)
descT(v1_scid_no_suic_attmpt)
## -999 1 2 3 <NA>
## [1,] No. cases 1272 226 97 81 110 1786
## [2,] Percent 71.2 12.7 5.4 4.5 6.2 100
This is an ordinal item with the following gradation: “no preparation (impulsive attempt)”-1, “little preparation”-2, “moderate preparation”-3, “Extensive, all details planned”-4. The item is coded “-999” if skipped (see above).
v1_prep_suic_attp_ord<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_prep_suic_attp_ord<-ifelse(v1_suic_attmpt==1, -999,
ifelse(v1_suic_attmpt>1 &
c(v1_clin$v1_snx_111_suizvrs2_x5_suiz_vorb,rep(-999,dim(v1_con)[1]))==1, 1,
ifelse(v1_suic_attmpt>1 &
c(v1_clin$v1_snx_111_suizvrs2_x5_suiz_vorb,rep(-999,dim(v1_con)[1]))==2, 2,
ifelse(v1_suic_attmpt>1 &
c(v1_clin$v1_snx_111_suizvrs2_x5_suiz_vorb,rep(-999,dim(v1_con)[1]))==3, 3,
ifelse(v1_suic_attmpt>1 &
c(v1_clin$v1_snx_111_suizvrs2_x5_suiz_vorb,rep(-999,dim(v1_con)[1]))==4, 4,
v1_prep_suic_attp_ord)))))
v1_prep_suic_attp_ord<-factor(v1_prep_suic_attp_ord,ordered=T)
descT(v1_prep_suic_attp_ord)
## -999 1 2 3 4 <NA>
## [1,] No. cases 1272 123 40 71 136 144 1786
## [2,] Percent 71.2 6.9 2.2 4 7.6 8.1 100
This is on ordinal item with the following gradation: “no”-1, “having thought about”-2, “persistent thoughts (serious and less serious)”-3, “options 2 and 3 together”-4. The item is coded “-999” if skipped (see above).
v1_suic_note_attmpt<-c(rep(NA,dim(v1_clin)[1]),rep(-999,dim(v1_con)[1]))
v1_suic_note_attmpt<-ifelse(v1_suic_attmpt==1, -999,
ifelse(v1_suic_attmpt>1 & c(v1_clin$v1_snx_111_suizvrs2_x6_abschiedshdl
,rep(-999,dim(v1_con)[1]))==1, "1",
ifelse(v1_suic_attmpt>1 & c(v1_clin$v1_snx_111_suizvrs2_x6_abschiedshdl
,rep(-999,dim(v1_con)[1]))==2, "2",
ifelse(v1_suic_attmpt>1 & c(v1_clin$v1_snx_111_suizvrs2_x6_abschiedshdl
,rep(-999,dim(v1_con)[1]))==3, "3",
ifelse(v1_suic_attmpt>1 & c(v1_clin$v1_snx_111_suizvrs2_x6_abschiedshdl
,rep(-999,dim(v1_con)[1]))==4, "4",
v1_suic_note_attmpt)))))
v1_suic_note_attmpt<-factor(v1_suic_note_attmpt,ordered=T)
descT(v1_suic_note_attmpt)
## -999 1 2 3 4 <NA>
## [1,] No. cases 1272 260 17 17 92 128 1786
## [2,] Percent 71.2 14.6 1 1 5.2 7.2 100
v1_age_fst_suic_att<-ifelse(v1_suic_attmpt>2,c(v1_clin$v1_snx_111_suizvrs2_s_snx_alter_jahre_31171_1,rep(-999,dim(v1_con)[1])),-999)
descT(v1_age_fst_suic_att)
## -999 2 3 7 8 9 10 11 12 13 14 15 16 17 18 19
## [1,] No. cases 1334 1 1 1 1 2 2 3 3 6 11 8 5 9 15 7
## [2,] Percent 74.7 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.3 0.6 0.4 0.3 0.5 0.8 0.4
## 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
## [1,] 14 14 11 10 17 17 6 19 8 13 15 7 6 6 6 7 8 3 4
## [2,] 0.8 0.8 0.6 0.6 1 1 0.3 1.1 0.4 0.7 0.8 0.4 0.3 0.3 0.3 0.4 0.4 0.2 0.2
## 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 55 56 57
## [1,] 8 3 4 5 2 6 9 3 6 4 2 2 3 1 2 4 2 1
## [2,] 0.4 0.2 0.2 0.3 0.1 0.3 0.5 0.2 0.3 0.2 0.1 0.1 0.2 0.1 0.1 0.2 0.1 0.1
## 58 59 61 62 63 65 <NA>
## [1,] 1 2 2 1 1 1 111 1786
## [2,] 0.1 0.1 0.1 0.1 0.1 0.1 6.2 100
All individuals that did not attempt suicide, or attemted suicide only once are coded as -999
v1_age_sec_suic_att<-ifelse(v1_suic_attmpt>2 & v1_scid_no_suic_attmpt>1,c(v1_clin$v1_snx_111_suizvrs2_s_snx_alter_jahre_31171_2,rep(-999,dim(v1_con)[1])),-999)
descT(v1_age_sec_suic_att)
## -999 8 12 13 14 15 16 17 18 19 20 21 22 23 24 25
## [1,] No. cases 1527 1 2 1 3 1 4 1 5 2 6 1 5 7 4 7
## [2,] Percent 85.5 0.1 0.1 0.1 0.2 0.1 0.2 0.1 0.3 0.1 0.3 0.1 0.3 0.4 0.2 0.4
## 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
## [1,] 6 11 9 2 7 2 5 3 3 4 3 2 2 1 6 1 3 1
## [2,] 0.3 0.6 0.5 0.1 0.4 0.1 0.3 0.2 0.2 0.2 0.2 0.1 0.1 0.1 0.3 0.1 0.2 0.1
## 45 46 47 48 49 50 52 54 57 58 63 64 <NA>
## [1,] 3 3 2 1 2 1 3 1 2 1 1 1 117 1786
## [2,] 0.2 0.2 0.1 0.1 0.1 0.1 0.2 0.1 0.1 0.1 0.1 0.1 6.6 100
All individuals that did not attempt suicide, or attemted suicide only once or twice are coded as -999
v1_age_thr_suic_att<-ifelse(v1_suic_attmpt>2 & v1_scid_no_suic_attmpt>2,c(v1_clin$v1_snx_111_suizvrs2_s_snx_alter_jahre_31171_3,rep(-999,dim(v1_con)[1])),-999)
descT(v1_age_thr_suic_att)
## -999 13 16 17 19 21 22 23 24 26 27 28 29 30 31 32
## [1,] No. cases 1612 3 4 2 2 2 1 2 4 3 2 2 2 3 2 2
## [2,] Percent 90.3 0.2 0.2 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.1 0.1 0.1 0.2 0.1 0.1
## 34 35 36 38 40 41 42 44 46 47 49 50 52 54 56 59 62 <NA>
## [1,] 1 3 1 1 2 2 2 1 2 3 1 2 2 1 1 1 1 111
## [2,] 0.1 0.2 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.1 0.1 0.1 0.1 0.1 0.1 0.1 6.2
##
## [1,] 1786
## [2,] 100
Create dataset
v1_scid<-data.frame(v1_scid_dsm_dx,
v1_scid_dsm_dx_cat,
v1_scid_age_MDE,
v1_scid_no_MDE,
v1_scid_age_mania,
v1_scid_no_mania,
v1_scid_age_hypomania,
v1_scid_no_hypomania,
v1_scid_ever_halls,
v1_scid_ever_delus,
v1_scid_ever_psyc,
v1_scid_age_fst_psyc,
v1_scid_yr_fst_psyc,
v1_scid_evr_suic_ide,
v1_scid_suic_ide,
v1_scid_suic_thght_mth,
v1_scid_suic_note_thgts,
v1_suic_attmpt,
v1_scid_no_suic_attmpt,
v1_prep_suic_attp_ord,
v1_suic_note_attmpt,
v1_age_fst_suic_att,
v1_age_sec_suic_att,
v1_age_thr_suic_att)
The PANSS (Kay, Fiszbein, & Opler, 1987) is a rating scale measuring positive and negative symptoms in schizophrenia. It has three subscales: positive, negative and gereral psychopathology symptoms. Each item is rated on an ordinal scale from one to seven with the following gradation: “absent”-1, “minimal”-2, “mild”-3, “moderate”-4, “moderate severe”-5, “severe”-6, “extreme”-7. On all items, higher scores mean more severe symptoms. The ratings refer to the past seven days. Please find the items below.
P1 Delusions (ordinal [1,2,3,4,5,6,7], v1_panss_p1)
v1_panss_p1<-c(v1_clin$v1_panss_p_p1_wahnideen,v1_con$v1_panss_p_p1_wahnideen)
v1_panss_p1<-factor(v1_panss_p1, ordered=T)
descT(v1_panss_p1)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1112 108 150 118 63 54 181 1786
## [2,] Percent 62.3 6 8.4 6.6 3.5 3 10.1 100
P2 Conceptual disorganization (ordinal [1,2,3,4,5,6,7], v1_panss_p2)
v1_panss_p2<-c(v1_clin$v1_panss_p_p2_form_denkst,v1_con$v1_panss_p_p2_form_denkst)
v1_panss_p2<-factor(v1_panss_p2, ordered=T)
descT(v1_panss_p2)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1019 186 225 117 51 8 1 179 1786
## [2,] Percent 57.1 10.4 12.6 6.6 2.9 0.4 0.1 10 100
P3 Hallucinatory behavior (ordinal [1,2,3,4,5,6,7], v1_panss_p3)
v1_panss_p3<-c(v1_clin$v1_panss_p_p3_halluz,v1_con$v1_panss_p_p3_halluz)
v1_panss_p3<-factor(v1_panss_p3, ordered=T)
descT(v1_panss_p3)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1336 81 69 59 46 15 1 179 1786
## [2,] Percent 74.8 4.5 3.9 3.3 2.6 0.8 0.1 10 100
P4 Excitement (ordinal [1,2,3,4,5,6,7], v1_panss_p4)
v1_panss_p4<-c(v1_clin$v1_panss_p_p4_erregung,v1_con$v1_panss_p_p4_erregung)
v1_panss_p4<-factor(v1_panss_p4, ordered=T)
descT(v1_panss_p4)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1095 160 269 60 17 3 182 1786
## [2,] Percent 61.3 9 15.1 3.4 1 0.2 10.2 100
P5 Grandiosity (ordinal [1,2,3,4,5,6,7], v1_panss_p5)
v1_panss_p5<-c(v1_clin$v1_panss_p_p5_groessenideen,v1_con$v1_panss_p_p5_groessenideen)
v1_panss_p5<-factor(v1_panss_p5, ordered=T)
descT(v1_panss_p5)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1348 104 91 36 19 6 182 1786
## [2,] Percent 75.5 5.8 5.1 2 1.1 0.3 10.2 100
P6 Suspiciousness/persecution (ordinal [1,2,3,4,5,6,7], v1_panss_p6)
v1_panss_p6<-c(v1_clin$v1_panss_p_p6_misstr_verfolg,v1_con$v1_panss_p_p6_misstr_verfolg)
v1_panss_p6<-factor(v1_panss_p6, ordered=T)
descT(v1_panss_p6)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1147 157 192 61 34 13 1 181 1786
## [2,] Percent 64.2 8.8 10.8 3.4 1.9 0.7 0.1 10.1 100
P7 Hostility (ordinal [1,2,3,4,5,6,7], v1_panss_p7)
v1_panss_p7<-c(v1_clin$v1_panss_p_p7_feindseligkeit,v1_con$v1_panss_p_p7_feindseligkeit)
v1_panss_p7<-factor(v1_panss_p7, ordered=T)
descT(v1_panss_p7)
## 1 2 3 4 5 <NA>
## [1,] No. cases 1400 104 78 18 4 182 1786
## [2,] Percent 78.4 5.8 4.4 1 0.2 10.2 100
PANSS Positive sum score (continuous [7-49], v1_panss_sum_pos)
v1_panss_sum_pos<-as.numeric.factor(v1_panss_p1)+
as.numeric.factor(v1_panss_p2)+
as.numeric.factor(v1_panss_p3)+
as.numeric.factor(v1_panss_p4)+
as.numeric.factor(v1_panss_p5)+
as.numeric.factor(v1_panss_p6)+
as.numeric.factor(v1_panss_p7)
summary(v1_panss_sum_pos)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 7.00 7.00 8.00 10.67 13.00 35.00 188
N1 Blunted affect (ordinal [1,2,3,4,5,6,7], v1_panss_n1)
v1_panss_n1<-c(v1_clin$v1_panss_n_n1_affektverflachung,v1_con$v1_panss_n_n1_affektverflachung)
v1_panss_n1<-factor(v1_panss_n1, ordered=T)
descT(v1_panss_n1)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 896 188 229 156 115 18 1 183 1786
## [2,] Percent 50.2 10.5 12.8 8.7 6.4 1 0.1 10.2 100
N2 Emotional withdrawal (ordinal [1,2,3,4,5,6,7], v1_panss_n2)
v1_panss_n2<-c(v1_clin$v1_panss_n_n2_emot_rueckzug,v1_con$v1_panss_n_n2_emot_rueckzug)
v1_panss_n2<-factor(v1_panss_n2, ordered=T)
descT(v1_panss_n2)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 973 179 209 192 37 10 1 185 1786
## [2,] Percent 54.5 10 11.7 10.8 2.1 0.6 0.1 10.4 100
N3 Poor rapport (ordinal [1,2,3,4,5,6,7], v1_panss_n3)
v1_panss_n3<-c(v1_clin$v1_panss_n_n3_mang_aff_rapp,v1_con$v1_panss_n_n3_mang_aff_rapp)
v1_panss_n3<-factor(v1_panss_n3, ordered=T)
descT(v1_panss_n3)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1089 183 210 89 28 4 183 1786
## [2,] Percent 61 10.2 11.8 5 1.6 0.2 10.2 100
N4 Passive/apathetic social withdrawal (ordinal [1,2,3,4,5,6,7], v1_panss_n4)
v1_panss_n4<-c(v1_clin$v1_panss_n_n4_soz_pass_apath,v1_con$v1_panss_n_n4_soz_pass_apath)
v1_panss_n4<-factor(v1_panss_n4, ordered=T)
descT(v1_panss_n4)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 995 149 274 122 51 9 186 1786
## [2,] Percent 55.7 8.3 15.3 6.8 2.9 0.5 10.4 100
N5 difficulty in abstract thinking (ordinal [1,2,3,4,5,6,7], v1_panss_n5)
v1_panss_n5<-c(v1_clin$v1_panss_n_n5_abstr_denken,v1_con$v1_panss_n_n5_abstr_denken)
v1_panss_n5<-factor(v1_panss_n5, ordered=T)
descT(v1_panss_n5)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 990 181 261 102 39 16 1 196 1786
## [2,] Percent 55.4 10.1 14.6 5.7 2.2 0.9 0.1 11 100
N6 Lack of spontaneity and flow of conversation (ordinal [1,2,3,4,5,6,7], v1_panss_n6)
v1_panss_n6<-c(v1_clin$v1_panss_n_n6_spon_fl_sprache,v1_con$v1_panss_n_n6_spon_fl_sprache)
v1_panss_n6<-factor(v1_panss_n6, ordered=T)
descT(v1_panss_n6)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1194 144 149 78 34 4 183 1786
## [2,] Percent 66.9 8.1 8.3 4.4 1.9 0.2 10.2 100
N7 Stereotyped thinking (ordinal [1,2,3,4,5,6,7], v1_panss_n7)
v1_panss_n7<-c(v1_clin$v1_panss_n_n7_stereotyp_ged,v1_con$v1_panss_n_n7_stereotyp_ged)
v1_panss_n7<-factor(v1_panss_n7, ordered=T)
descT(v1_panss_n7)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1228 152 164 43 11 5 183 1786
## [2,] Percent 68.8 8.5 9.2 2.4 0.6 0.3 10.2 100
PANSS Negative sum score (continuous [7-49], v1_panss_sum_neg)
v1_panss_sum_neg<-as.numeric.factor(v1_panss_n1)+
as.numeric.factor(v1_panss_n2)+
as.numeric.factor(v1_panss_n3)+
as.numeric.factor(v1_panss_n4)+
as.numeric.factor(v1_panss_n5)+
as.numeric.factor(v1_panss_n6)+
as.numeric.factor(v1_panss_n7)
summary(v1_panss_sum_neg)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 7.00 7.00 10.00 12.09 16.00 38.00 210
G1 Somatic concerns (ordinal [1,2,3,4,5,6,7], v1_panss_g1)
v1_panss_g1<-c(v1_clin$v1_panss_g_g1_sorge_gesundh,v1_con$v1_panss_g_g1_sorge_gesundh)
v1_panss_g1<-factor(v1_panss_g1, ordered=T)
descT(v1_panss_g1)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1083 197 192 87 35 9 3 180 1786
## [2,] Percent 60.6 11 10.8 4.9 2 0.5 0.2 10.1 100
G2 Anxiety (ordinal [1,2,3,4,5,6,7], v1_panss_g2)
v1_panss_g2<-c(v1_clin$v1_panss_g_g2_angst,v1_con$v1_panss_g_g2_angst)
v1_panss_g2<-factor(v1_panss_g2, ordered=T)
descT(v1_panss_g2)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 946 160 310 135 48 6 1 180 1786
## [2,] Percent 53 9 17.4 7.6 2.7 0.3 0.1 10.1 100
G3 Guilt feelings (ordinal [1,2,3,4,5,6,7], v1_panss_g3)
v1_panss_g3<-c(v1_clin$v1_panss_g_g3_schuldgefuehle,v1_con$v1_panss_g_g3_schuldgefuehle)
v1_panss_g3<-factor(v1_panss_g3, ordered=T)
descT(v1_panss_g3)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1076 176 196 123 30 5 1 179 1786
## [2,] Percent 60.2 9.9 11 6.9 1.7 0.3 0.1 10 100
G4 Tension (ordinal [1,2,3,4,5,6,7], v1_panss_g4)
v1_panss_g4<-c(v1_clin$v1_panss_g_g4_anspannung,v1_con$v1_panss_g_g4_anspannung)
v1_panss_g4<-factor(v1_panss_g4, ordered=T)
descT(v1_panss_g4)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 929 241 288 117 23 6 182 1786
## [2,] Percent 52 13.5 16.1 6.6 1.3 0.3 10.2 100
G5 Mannerisms & posturing (ordinal [1,2,3,4,5,6,7], v1_panss_g5)
v1_panss_g5<-c(v1_clin$v1_panss_g_g5_manier_koerperh,v1_con$v1_panss_g_g5_manier_koerperh)
v1_panss_g5<-factor(v1_panss_g5, ordered=T)
descT(v1_panss_g5)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1375 115 80 20 6 8 1 181 1786
## [2,] Percent 77 6.4 4.5 1.1 0.3 0.4 0.1 10.1 100
G6 Depression (ordinal [1,2,3,4,5,6,7], v1_panss_g6)
v1_panss_g6<-c(v1_clin$v1_panss_g_g6_depression,v1_con$v1_panss_g_g6_depression)
v1_panss_g6<-factor(v1_panss_g6, ordered=T)
descT(v1_panss_g6)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 821 169 282 199 116 16 4 179 1786
## [2,] Percent 46 9.5 15.8 11.1 6.5 0.9 0.2 10 100
G7 Motor retardation (ordinal [1,2,3,4,5,6,7], v1_panss_g7)
v1_panss_g7<-c(v1_clin$v1_panss_g_g7_mot_verlangs,v1_con$v1_panss_g_g7_mot_verlangs)
v1_panss_g7<-factor(v1_panss_g7, ordered=T)
descT(v1_panss_g7)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1016 187 268 107 23 5 180 1786
## [2,] Percent 56.9 10.5 15 6 1.3 0.3 10.1 100
G8 Uncooperativeness (ordinal [1,2,3,4,5,6,7], v1_panss_g8)
v1_panss_g8<-c(v1_clin$v1_panss_g_g8_unkoop_verh,v1_con$v1_panss_g_g8_unkoop_verh)
v1_panss_g8<-factor(v1_panss_g8, ordered=T)
descT(v1_panss_g8)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1456 77 54 13 3 2 181 1786
## [2,] Percent 81.5 4.3 3 0.7 0.2 0.1 10.1 100
G9 Unusual thought content (ordinal [1,2,3,4,5,6,7], v1_panss_g9)
v1_panss_g9<-c(v1_clin$v1_panss_g_g9_ungew_denkinh,v1_con$v1_panss_g_g9_ungew_denkinh)
v1_panss_g9<-factor(v1_panss_g9, ordered=T)
descT(v1_panss_g9)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1189 101 175 81 47 12 1 180 1786
## [2,] Percent 66.6 5.7 9.8 4.5 2.6 0.7 0.1 10.1 100
G10 Disorientation (ordinal [1,2,3,4,5,6,7], v1_panss_g10)
v1_panss_g10<-c(v1_clin$v1_panss_g_g10_desorient,v1_con$v1_panss_g_g10_desorient)
v1_panss_g10<-factor(v1_panss_g10, ordered=T)
descT(v1_panss_g10)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1421 108 67 4 4 2 180 1786
## [2,] Percent 79.6 6 3.8 0.2 0.2 0.1 10.1 100
G11 Poor attention (ordinal [1,2,3,4,5,6,7], v1_panss_g11)
v1_panss_g11<-c(v1_clin$v1_panss_g_g11_mang_aufmerks,v1_con$v1_panss_g_g11_mang_aufmerks)
v1_panss_g11<-factor(v1_panss_g11, ordered=T)
descT(v1_panss_g11)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 889 185 360 134 28 3 187 1786
## [2,] Percent 49.8 10.4 20.2 7.5 1.6 0.2 10.5 100
G12 Lack of judgement & insight (ordinal [1,2,3,4,5,6,7], v1_panss_g12)
v1_panss_g12<-c(v1_clin$v1_panss_g_g12_mang_urt_einsi,v1_con$v1_panss_g_g12_mang_urt_einsi)
v1_panss_g12<-factor(v1_panss_g12, ordered=T)
descT(v1_panss_g12)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1259 137 110 74 17 8 1 180 1786
## [2,] Percent 70.5 7.7 6.2 4.1 1 0.4 0.1 10.1 100
G13 Disturbance of volition (ordinal [1,2,3,4,5,6,7], v1_panss_g13)
v1_panss_g13<-c(v1_clin$v1_panss_g_g13_willensschwae,v1_con$v1_panss_g_g13_willensschwae)
v1_panss_g13<-factor(v1_panss_g13, ordered=T)
descT(v1_panss_g13)
## 1 2 3 4 5 <NA>
## [1,] No. cases 1317 118 124 42 2 183 1786
## [2,] Percent 73.7 6.6 6.9 2.4 0.1 10.2 100
G14 Poor impulse control (ordinal [1,2,3,4,5,6,7], v1_panss_g14)
v1_panss_g14<-c(v1_clin$v1_panss_g_g14_mang_impulsk,v1_con$v1_panss_g_g14_mang_impulsk)
v1_panss_g14<-factor(v1_panss_g14, ordered=T)
descT(v1_panss_g14)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1327 109 143 20 1 2 184 1786
## [2,] Percent 74.3 6.1 8 1.1 0.1 0.1 10.3 100
G15 Preoccupation (ordinal [1,2,3,4,5,6,7], v1_panss_g15)
v1_panss_g15<-c(v1_clin$v1_panss_g_g15_selbstbezog,v1_con$v1_panss_g_g15_selbstbezog)
v1_panss_g15<-factor(v1_panss_g15, ordered=T)
descT(v1_panss_g15)
## 1 2 3 4 5 6 <NA>
## [1,] No. cases 1318 127 110 42 8 1 180 1786
## [2,] Percent 73.8 7.1 6.2 2.4 0.4 0.1 10.1 100
G16 Active social avoidance (ordinal [1,2,3,4,5,6,7], v1_panss_g16)
v1_panss_g16<-c(v1_clin$v1_panss_g_g16_aktsoz_vermeid,v1_con$v1_panss_g_g16_aktsoz_vermeid)
v1_panss_g16<-factor(v1_panss_g16, ordered=T)
descT(v1_panss_g16)
## 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 1108 156 224 75 34 6 1 182 1786
## [2,] Percent 62 8.7 12.5 4.2 1.9 0.3 0.1 10.2 100
PANSS General Psychopathology sum score (continuous [16-112], v1_panss_sum_gen)
v1_panss_sum_gen<-as.numeric.factor(v1_panss_g1)+
as.numeric.factor(v1_panss_g2)+
as.numeric.factor(v1_panss_g3)+
as.numeric.factor(v1_panss_g4)+
as.numeric.factor(v1_panss_g5)+
as.numeric.factor(v1_panss_g6)+
as.numeric.factor(v1_panss_g7)+
as.numeric.factor(v1_panss_g8)+
as.numeric.factor(v1_panss_g9)+
as.numeric.factor(v1_panss_g10)+
as.numeric.factor(v1_panss_g11)+
as.numeric.factor(v1_panss_g12)+
as.numeric.factor(v1_panss_g13)+
as.numeric.factor(v1_panss_g14)+
as.numeric.factor(v1_panss_g15)+
as.numeric.factor(v1_panss_g16)
summary(v1_panss_sum_gen)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 16.00 17.00 22.00 24.99 31.00 74.00 210
Create PANSS Total score (continuous [30-210], v1_panss_sum_tot)
v1_panss_sum_tot<-v1_panss_sum_pos+v1_panss_sum_neg+v1_panss_sum_gen
summary(v1_panss_sum_tot)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 30.00 32.00 42.00 47.72 58.00 141.00 245
Create dataset
v1_symp_panss<-data.frame(v1_panss_p1,v1_panss_p2,v1_panss_p3,v1_panss_p4,v1_panss_p5,v1_panss_p6,v1_panss_p7,
v1_panss_n1,v1_panss_n2,v1_panss_n3,v1_panss_n4,v1_panss_n5,v1_panss_n6,v1_panss_n7,
v1_panss_g1,v1_panss_g2,v1_panss_g3,v1_panss_g4,v1_panss_g5,v1_panss_g6,v1_panss_g7,
v1_panss_g8,v1_panss_g9,v1_panss_g10,v1_panss_g11,v1_panss_g12,v1_panss_g13,v1_panss_g14,
v1_panss_g15,v1_panss_g16,v1_panss_sum_pos,v1_panss_sum_neg,v1_panss_sum_gen,
v1_panss_sum_tot)
The IDS-C30 is is a 30-item rating scale used to assess the severity of depressive symptoms. Each item is rated on an ordinal scale from zero to three with zero indicating absence of the respective symptom. One item, #9, has additional information. The ratings refer to the past seven days. On all items, higher scores indicate more severe symptoms. Please find the items below.
Item 1 Sleep onset insomnia (ordinal [0,1,2,3], v1_idsc_itm1)
v1_idsc_itm1<-c(v1_clin$v1_ids_c_s1_ids1_einschlafschw,v1_con$v1_ids_c_s1_ids1_einschlafschw)
v1_idsc_itm1<-factor(v1_idsc_itm1, ordered=T)
descT(v1_idsc_itm1)
## 0 1 2 3 <NA>
## [1,] No. cases 1110 248 124 113 191 1786
## [2,] Percent 62.2 13.9 6.9 6.3 10.7 100
Item 2 Mid-nocturnal insomnia (ordinal [0,1,2,3], v1_idsc_itm2)
v1_idsc_itm2<-c(v1_clin$v1_ids_c_s1_ids2_naechtl_aufw,v1_con$v1_ids_c_s1_ids2_naechtl_aufw)
v1_idsc_itm2<-factor(v1_idsc_itm2, ordered=T)
descT(v1_idsc_itm2)
## 0 1 2 3 <NA>
## [1,] No. cases 982 253 200 159 192 1786
## [2,] Percent 55 14.2 11.2 8.9 10.8 100
Item 3 Early morning insomnia (ordinal [0,1,2,3], v1_idsc_itm3)
v1_idsc_itm3<-c(v1_clin$v1_ids_c_s1_ids3_frueh_aufw,v1_con$v1_ids_c_s1_ids3_frueh_aufw)
v1_idsc_itm3<-factor(v1_idsc_itm3, ordered=T)
descT(v1_idsc_itm3)
## 0 1 2 3 <NA>
## [1,] No. cases 1262 123 108 97 196 1786
## [2,] Percent 70.7 6.9 6 5.4 11 100
Item 4 Hypersomnia (ordinal [0,1,2,3], v1_idsc_itm4)
v1_idsc_itm4<-c(v1_clin$v1_ids_c_s1_ids4_hypersomnie,v1_con$v1_ids_c_s1_ids4_hypersomnie)
v1_idsc_itm4<-factor(v1_idsc_itm4, ordered=T)
descT(v1_idsc_itm4)
## 0 1 2 3 <NA>
## [1,] No. cases 1077 329 155 31 194 1786
## [2,] Percent 60.3 18.4 8.7 1.7 10.9 100
Item 5 Mood (sad) (ordinal [0,1,2,3], v1_idsc_itm5)
v1_idsc_itm5<-c(v1_clin$v1_ids_c_s1_ids5_stimmung_trgk,v1_con$v1_ids_c_s1_ids5_stimmung_trgk)
v1_idsc_itm5<-factor(v1_idsc_itm5, ordered=T)
descT(v1_idsc_itm5)
## 0 1 2 3 <NA>
## [1,] No. cases 916 436 149 92 193 1786
## [2,] Percent 51.3 24.4 8.3 5.2 10.8 100
Item 6 Mood (irritable) (ordinal [0,1,2,3], v1_idsc_itm6)
v1_idsc_itm6<-c(v1_clin$v1_ids_c_s1_ids6_stimmung_grzt,v1_con$v1_ids_c_s1_ids6_stimmung_grzt)
v1_idsc_itm6<-factor(v1_idsc_itm6, ordered=T)
descT(v1_idsc_itm6)
## 0 1 2 3 <NA>
## [1,] No. cases 1172 326 60 36 192 1786
## [2,] Percent 65.6 18.3 3.4 2 10.8 100
Item 7 Mood (anxious) (ordinal [0,1,2,3], v1_idsc_itm7)
v1_idsc_itm7<-c(v1_clin$v1_ids_c_s1_ids7_stimmung_agst,v1_con$v1_ids_c_s1_ids7_stimmung_agst)
v1_idsc_itm7<-factor(v1_idsc_itm7, ordered=T)
descT(v1_idsc_itm7)
## 0 1 2 3 <NA>
## [1,] No. cases 1021 349 143 78 195 1786
## [2,] Percent 57.2 19.5 8 4.4 10.9 100
Item 8 Reactivity of mood (ordinal [0,1,2,3], v1_idsc_itm8)
v1_idsc_itm8<-c(v1_clin$v1_ids_c_s1_ids8_reakt_stimmung,v1_con$v1_ids_c_s1_ids8_reakt_stimmung)
v1_idsc_itm8<-factor(v1_idsc_itm8, ordered=T)
descT(v1_idsc_itm8)
## 0 1 2 3 <NA>
## [1,] No. cases 1259 207 80 47 193 1786
## [2,] Percent 70.5 11.6 4.5 2.6 10.8 100
Item 9 Mood Variation (ordinal [0,1,2,3], v1_idsc_itm9)
v1_idsc_itm9<-c(v1_clin$v1_ids_c_s1_ids9_stimmungsschw,v1_con$v1_ids_c_s1_ids9_stimmungsschw)
v1_idsc_itm9<-factor(v1_idsc_itm9, ordered=T)
descT(v1_idsc_itm9)
## 0 1 2 3 <NA>
## [1,] No. cases 1190 150 88 160 198 1786
## [2,] Percent 66.6 8.4 4.9 9 11.1 100
Item 9A (categorical [M, A, N], v1_idsc_itm9a)
Additional information if the answer on item 9 was 1,2 or 3: “When was
the mood usually worse?” (“M”-morning, “A”-afternoon, “N”-night).
v1_idsc_itm9a_pre<-c(v1_clin$v1_ids_c_s1_ids9a_stimmungsschw,v1_con$v1_ids_c_s1_ids9a_stimmungsschw)
v1_idsc_itm9a<-rep(NA,dim(v1_clin)[1]+dim(v1_con)[1])
v1_idsc_itm9a<-ifelse(v1_idsc_itm9!=0 & v1_idsc_itm9a_pre==1, "M", ifelse(v1_idsc_itm9==0, -999, v1_idsc_itm9a))
v1_idsc_itm9a<-ifelse(v1_idsc_itm9!=0 & v1_idsc_itm9a_pre==2, "A", ifelse(v1_idsc_itm9==0, -999, v1_idsc_itm9a))
v1_idsc_itm9a<-ifelse(v1_idsc_itm9!=0 & v1_idsc_itm9a_pre==3, "N", ifelse(v1_idsc_itm9==0, -999, v1_idsc_itm9a))
v1_idsc_itm9a<-factor(v1_idsc_itm9a, ordered=F)
descT(v1_idsc_itm9a)
## -999 A M N <NA>
## [1,] No. cases 1190 19 169 75 333 1786
## [2,] Percent 66.6 1.1 9.5 4.2 18.6 100
Item 9B (dichotomous, v1_idsc_itm9b) Additional information if the answer on item 9 was 1,2 or 3: “Is mood variation attributed to environment by the patient?”.
v1_idsc_itm9b_pre<-c(v1_clin$v1_ids_c_s1_ids9b_stimmungsschw,v1_con$v1_ids_c_s1_ids9b_stimmungsschw)
v1_idsc_itm9b<-rep(NA,dim(v1_clin)[1]+dim(v1_con)[1])
v1_idsc_itm9b<-ifelse(v1_idsc_itm9!=0 & v1_idsc_itm9b_pre==0, "N", ifelse(v1_idsc_itm9==0, -999, v1_idsc_itm9b))
v1_idsc_itm9b<-ifelse(v1_idsc_itm9!=0 & v1_idsc_itm9b_pre==1, "Y", ifelse(v1_idsc_itm9==0, -999, v1_idsc_itm9b))
v1_idsc_itm9b<-factor(v1_idsc_itm9b, ordered=F)
descT(v1_idsc_itm9b)
## -999 N Y <NA>
## [1,] No. cases 1190 117 98 381 1786
## [2,] Percent 66.6 6.6 5.5 21.3 100
Item 10 Quality of mood (ordinal [0,1,2,3], v1_idsc_itm10)
v1_idsc_itm10<-c(v1_clin$v1_ids_c_s1_ids10_quali_stimmung,v1_con$v1_ids_c_s1_ids10_quali_stimmung)
v1_idsc_itm10<-factor(v1_idsc_itm10, ordered=T)
descT(v1_idsc_itm10)
## 0 1 2 3 <NA>
## [1,] No. cases 1246 119 64 145 212 1786
## [2,] Percent 69.8 6.7 3.6 8.1 11.9 100
Items 11-14 Appetite and weight
Please not that item 11 assesses decreased appetite and item 13 assesses
weight loss during the past two weeks. Item 12 assesses increased
appetite and item 14 weight gain during the past two weeks.
The interviewer is supposed to rate either items 11 and 13 or items 12 and 14.
Item 11 (ordinal [0,1,2,3], v1_idsc_itm11)
v1_idsc_app_verm<-c(v1_clin$v1_ids_c_s2_ids11_appetit_verm,v1_con$v1_ids_c_s2_ids11_appetit_verm)
v1_idsc_app_gest<-c(v1_clin$v1_ids_c_s2_ids12_appetit_steig,v1_con$v1_ids_c_s2_ids12_appetit_steig)
v1_idsc_itm11<-rep(NA,dim(v1_clin)[1]+dim(v1_con)[1])
v1_idsc_itm11<-ifelse(is.na(v1_idsc_app_verm)==T & is.na(v1_idsc_app_gest)==T, NA,
ifelse(is.na(v1_idsc_app_verm)==T & is.na(v1_idsc_app_gest)==F, -999,
ifelse(is.na(v1_idsc_app_verm)==F & is.na(v1_idsc_app_gest)==T,
v1_idsc_app_verm,
ifelse(is.na(v1_idsc_app_verm)==F & is.na(v1_idsc_app_gest)==F & (v1_idsc_app_verm>v1_idsc_app_gest), v1_idsc_app_verm,
ifelse(is.na(v1_idsc_app_verm)==F & is.na(v1_idsc_app_gest)==F & (v1_idsc_app_gest>=v1_idsc_app_verm),-999,v1_idsc_itm11)))))
#Important: do not code as factor, see after calculation of sum score!
descT(v1_idsc_itm11)
## -999 0 1 2 3 <NA>
## [1,] No. cases 457 949 146 27 12 195 1786
## [2,] Percent 25.6 53.1 8.2 1.5 0.7 10.9 100
Item 12 (ordinal [0,1,2,3], v1_idsc_itm12)
v1_idsc_itm12<-rep(NA,dim(v1_clin)[1]+dim(v1_con)[1])
v1_idsc_itm12<-ifelse(is.na(v1_idsc_app_verm)==T & is.na(v1_idsc_app_gest)==T, NA,
ifelse(is.na(v1_idsc_app_verm)==T & is.na(v1_idsc_app_gest)==F,
v1_idsc_app_gest,
ifelse(is.na(v1_idsc_app_verm)==F & is.na(v1_idsc_app_gest)==T,
-999,
ifelse(is.na(v1_idsc_app_verm)==F & is.na(v1_idsc_app_gest)==F & (v1_idsc_app_verm>v1_idsc_app_gest), -999,
ifelse(is.na(v1_idsc_app_verm)==F & is.na(v1_idsc_app_gest)==F & (v1_idsc_app_gest>=v1_idsc_app_verm), v1_idsc_app_gest,v1_idsc_itm12)))))
#Important: do not code as factor, see after calculation of sum score!
descT(v1_idsc_itm12)
## -999 0 1 2 3 <NA>
## [1,] No. cases 1134 146 186 78 47 195 1786
## [2,] Percent 63.5 8.2 10.4 4.4 2.6 10.9 100
Item 13 (ordinal [0,1,2,3], v1_idsc_itm13)
v1_idsc_gew_abn<-c(v1_clin$v1_ids_c_s2_ids13_gewichtsabn,v1_con$v1_ids_c_s2_ids13_gewichtsabn)
v1_idsc_gew_zun<-c(v1_clin$v1_ids_c_s2_ids14_gewichtszun,v1_con$v1_ids_c_s2_ids14_gewichtszun)
v1_idsc_itm13<-rep(NA,dim(v1_clin)[1]+dim(v1_con)[1])
v1_idsc_itm13<-ifelse(is.na(v1_idsc_gew_abn)==T & is.na(v1_idsc_gew_zun)==T, NA,
ifelse(is.na(v1_idsc_gew_abn)==T & is.na(v1_idsc_gew_zun)==F, -999,
ifelse(is.na(v1_idsc_gew_abn)==F & is.na(v1_idsc_gew_zun)==T, v1_idsc_gew_abn,
ifelse(is.na(v1_idsc_gew_abn)==F & is.na(v1_idsc_gew_zun)==F & (v1_idsc_gew_abn>v1_idsc_gew_zun), v1_idsc_gew_abn, ifelse(is.na(v1_idsc_gew_abn)==F & is.na(v1_idsc_gew_zun)==F & (v1_idsc_gew_zun >= v1_idsc_gew_abn),-999,v1_idsc_itm13)))))
#Important: do not code as factor, see after calculation of sum score!
descT(v1_idsc_itm13)
## -999 0 1 2 3 <NA>
## [1,] No. cases 493 893 75 79 44 202 1786
## [2,] Percent 27.6 50 4.2 4.4 2.5 11.3 100
Item 14 (ordinal [0,1,2,3], v1_idsc_itm14)
v1_idsc_itm14<-rep(NA,dim(v1_clin)[1]+dim(v1_con)[1])
v1_idsc_itm14<-ifelse(is.na(v1_idsc_gew_abn)==T & is.na(v1_idsc_gew_zun)==T, NA,
ifelse(is.na(v1_idsc_gew_abn)==T & is.na(v1_idsc_gew_zun)==F,
v1_idsc_gew_zun,
ifelse(is.na(v1_idsc_gew_abn)==F & is.na(v1_idsc_gew_zun)==T, -999,
ifelse(is.na(v1_idsc_gew_abn)==F & is.na(v1_idsc_gew_zun)==F & (v1_idsc_gew_abn>v1_idsc_gew_zun), -999,
ifelse(is.na(v1_idsc_gew_abn)==F & is.na(v1_idsc_gew_zun)==F & (v1_idsc_gew_zun>=v1_idsc_gew_abn), v1_idsc_gew_zun,v1_idsc_itm14)))))
#Important: do not code as factor, see after calculation of sum score!
descT(v1_idsc_itm14)
## -999 0 1 2 3 <NA>
## [1,] No. cases 1091 202 116 101 74 202 1786
## [2,] Percent 61.1 11.3 6.5 5.7 4.1 11.3 100
Item 15 Concentration/decision making (ordinal [0,1,2,3], v1_idsc_itm15)
v1_idsc_itm15<-c(v1_clin$v1_ids_c_s2_ids15_konz_entscheid,v1_con$v1_ids_c_s2_ids15_konz_entscheid)
v1_idsc_itm15<-factor(v1_idsc_itm15, ordered=T)
descT(v1_idsc_itm15)
## 0 1 2 3 <NA>
## [1,] No. cases 850 378 290 67 201 1786
## [2,] Percent 47.6 21.2 16.2 3.8 11.3 100
Item 16 Outlook (self) (ordinal [0,1,2,3], v1_idsc_itm16)
v1_idsc_itm16<-c(v1_clin$v1_ids_c_s2_ids16_selbstbild,v1_con$v1_ids_c_s2_ids16_selbstbild)
v1_idsc_itm16<-factor(v1_idsc_itm16, ordered=T)
descT(v1_idsc_itm16)
## 0 1 2 3 <NA>
## [1,] No. cases 1137 241 105 109 194 1786
## [2,] Percent 63.7 13.5 5.9 6.1 10.9 100
Item 17 Outlook (future) (ordinal [0,1,2,3], v1_idsc_itm17)
v1_idsc_itm17<-c(v1_clin$v1_ids_c_s2_ids17_zukunftssicht,v1_con$v1_ids_c_s2_ids17_zukunftssicht)
v1_idsc_itm17<-factor(v1_idsc_itm17, ordered=T)
descT(v1_idsc_itm17)
## 0 1 2 3 <NA>
## [1,] No. cases 998 407 155 30 196 1786
## [2,] Percent 55.9 22.8 8.7 1.7 11 100
Item 18 Suicidal ideation (ordinal [0,1,2,3], v1_idsc_itm18)
v1_idsc_itm18<-c(v1_clin$v1_ids_c_s2_ids18_selbstmordged,v1_con$v1_ids_c_s2_ids18_selbstmordged)
v1_idsc_itm18<-factor(v1_idsc_itm18, ordered=T)
descT(v1_idsc_itm18)
## 0 1 2 3 <NA>
## [1,] No. cases 1423 93 70 9 191 1786
## [2,] Percent 79.7 5.2 3.9 0.5 10.7 100
Item 19 Involvement (ordinal [0,1,2,3], v1_idsc_itm19)
v1_idsc_itm19<-c(v1_clin$v1_ids_c_s2_ids19_interess_aktiv,v1_con$v1_ids_c_s2_ids19_interess_aktiv)
v1_idsc_itm19<-factor(v1_idsc_itm19, ordered=T)
descT(v1_idsc_itm19)
## 0 1 2 3 <NA>
## [1,] No. cases 1207 284 58 44 193 1786
## [2,] Percent 67.6 15.9 3.2 2.5 10.8 100
Item 20 Energy/fatigability (ordinal [0,1,2,3], v1_idsc_itm20)
v1_idsc_itm20<-c(v1_clin$v1_ids_c_s2_ids20_energ_ermued,v1_con$v1_ids_c_s2_ids20_energ_ermued)
v1_idsc_itm20<-factor(v1_idsc_itm20, ordered=T)
descT(v1_idsc_itm20)
## 0 1 2 3 <NA>
## [1,] No. cases 961 404 185 44 192 1786
## [2,] Percent 53.8 22.6 10.4 2.5 10.8 100
Item 21 Pleasure/enjoyment (exclude sexual activities) (ordinal [0,1,2,3], v1_idsc_itm21)
v1_idsc_itm21<-c(v1_clin$v1_ids_c_s3_ids21_vergn_genuss,v1_con$v1_ids_c_s3_ids21_vergn_genuss)
v1_idsc_itm21<-factor(v1_idsc_itm21, ordered=T)
descT(v1_idsc_itm21)
## 0 1 2 3 <NA>
## [1,] No. cases 1243 247 75 24 197 1786
## [2,] Percent 69.6 13.8 4.2 1.3 11 100
Item 22 Sexual interest (ordinal [0,1,2,3], v1_idsc_itm22)
v1_idsc_itm22<-c(v1_clin$v1_ids_c_s3_ids22_sex_interesse,v1_con$v1_ids_c_s3_ids22_sex_interesse)
v1_idsc_itm22<-factor(v1_idsc_itm22, ordered=T)
descT(v1_idsc_itm22)
## 0 1 2 3 <NA>
## [1,] No. cases 1107 110 215 151 203 1786
## [2,] Percent 62 6.2 12 8.5 11.4 100
Item 23 Psychomotor slowing (ordinal [0,1,2,3], v1_idsc_itm23)
v1_idsc_itm23<-c(v1_clin$v1_ids_c_s3_ids23_psymo_hemm,v1_con$v1_ids_c_s3_ids23_psymo_hemm)
v1_idsc_itm23<-factor(v1_idsc_itm23, ordered=T)
descT(v1_idsc_itm23)
## 0 1 2 3 <NA>
## [1,] No. cases 1210 309 63 8 196 1786
## [2,] Percent 67.7 17.3 3.5 0.4 11 100
Item 24 Psychomotor agitation (ordinal [0,1,2,3], v1_idsc_itm24)
v1_idsc_itm24<-c(v1_clin$v1_ids_c_s3_ids24_psymo_agitht,v1_con$v1_ids_c_s3_ids24_psymo_agitht)
v1_idsc_itm24<-factor(v1_idsc_itm24, ordered=T)
descT(v1_idsc_itm24)
## 0 1 2 3 <NA>
## [1,] No. cases 1265 219 84 18 200 1786
## [2,] Percent 70.8 12.3 4.7 1 11.2 100
Item 25 Somatic complaints (ordinal [0,1,2,3], v1_idsc_itm25)
v1_idsc_itm25<-c(v1_clin$v1_ids_c_s3_ids25_som_beschw,v1_con$v1_ids_c_s3_ids25_som_beschw)
v1_idsc_itm25<-factor(v1_idsc_itm25, ordered=T)
descT(v1_idsc_itm25)
## 0 1 2 3 <NA>
## [1,] No. cases 1117 361 81 29 198 1786
## [2,] Percent 62.5 20.2 4.5 1.6 11.1 100
Item 26 Sympathetic arousal (ordinal [0,1,2,3], v1_idsc_itm26)
v1_idsc_itm26<-c(v1_clin$v1_ids_c_s3_ids26_veg_erreg,v1_con$v1_ids_c_s3_ids26_veg_erreg)
v1_idsc_itm26<-factor(v1_idsc_itm26, ordered=T)
descT(v1_idsc_itm26)
## 0 1 2 3 <NA>
## [1,] No. cases 1148 333 88 20 197 1786
## [2,] Percent 64.3 18.6 4.9 1.1 11 100
Item 27 Panic/phobic symptoms (ordinal [0,1,2,3], v1_idsc_itm27)
v1_idsc_itm27<-c(v1_clin$v1_ids_c_s3_ids27_panik_phob,v1_con$v1_ids_c_s3_ids27_panik_phob)
v1_idsc_itm27<-factor(v1_idsc_itm27, ordered=T)
descT(v1_idsc_itm27)
## 0 1 2 3 <NA>
## [1,] No. cases 1354 157 55 24 196 1786
## [2,] Percent 75.8 8.8 3.1 1.3 11 100
Item 28 Gastrointestinal (ordinal [0,1,2,3], v1_idsc_itm28)
v1_idsc_itm28<-c(v1_clin$v1_ids_c_s3_ids28_verdauung,v1_con$v1_ids_c_s3_ids28_verdauung)
v1_idsc_itm28<-factor(v1_idsc_itm28, ordered=T)
descT(v1_idsc_itm28)
## 0 1 2 3 <NA>
## [1,] No. cases 1316 160 78 34 198 1786
## [2,] Percent 73.7 9 4.4 1.9 11.1 100
Item 29 Interpersonal sensitivity (ordinal [0,1,2,3], v1_idsc_itm29)
v1_idsc_itm29<-c(v1_clin$v1_ids_c_s3_ids29_pers_bezieh,v1_con$v1_ids_c_s3_ids29_pers_bezieh)
v1_idsc_itm29<-factor(v1_idsc_itm29, ordered=T)
descT(v1_idsc_itm29)
## 0 1 2 3 <NA>
## [1,] No. cases 1262 218 80 31 195 1786
## [2,] Percent 70.7 12.2 4.5 1.7 10.9 100
Item 30 Leaden paralysis/physical energy (ordinal [0,1,2,3], v1_idsc_itm30)
v1_idsc_itm30<-c(v1_clin$v1_ids_c_s3_ids30_schwgf_k_energ,v1_con$v1_ids_c_s3_ids30_schwgf_k_energ)
v1_idsc_itm30<-factor(v1_idsc_itm30, ordered=T)
descT(v1_idsc_itm30)
## 0 1 2 3 <NA>
## [1,] No. cases 1247 216 87 35 201 1786
## [2,] Percent 69.8 12.1 4.9 2 11.3 100
Create IDS-C30 total score (continuous [0-84], v1_idsc_sum) Please note that calculation of the sum score involves selecting either item 11 or item 12 and selecting either item 13 or item 14. If both items are coded, the higher one is taken, according to the official rating instructions.
v1_idsc_sum<-as.numeric.factor(v1_idsc_itm1)+
as.numeric.factor(v1_idsc_itm2)+
as.numeric.factor(v1_idsc_itm3)+
as.numeric.factor(v1_idsc_itm4)+
as.numeric.factor(v1_idsc_itm5)+
as.numeric.factor(v1_idsc_itm6)+
as.numeric.factor(v1_idsc_itm7)+
as.numeric.factor(v1_idsc_itm8)+
as.numeric.factor(v1_idsc_itm9)+
as.numeric.factor(v1_idsc_itm10)+
ifelse(is.na(v1_idsc_itm11)==T & is.na(v1_idsc_itm12)==T, NA,
ifelse((v1_idsc_itm11==-999 & v1_idsc_itm12!=-999), v1_idsc_itm12,
ifelse((v1_idsc_itm11!=-999 & v1_idsc_itm12==-999),v1_idsc_itm11, NA)))+
ifelse(is.na(v1_idsc_itm13)==T & is.na(v1_idsc_itm14)==T, NA,
ifelse((v1_idsc_itm13==-999 & v1_idsc_itm14!=-999), v1_idsc_itm14,
ifelse((v1_idsc_itm13!=-999 & v1_idsc_itm14==-999),v1_idsc_itm13, NA)))+
as.numeric.factor(v1_idsc_itm15)+
as.numeric.factor(v1_idsc_itm16)+
as.numeric.factor(v1_idsc_itm17)+
as.numeric.factor(v1_idsc_itm18)+
as.numeric.factor(v1_idsc_itm19)+
as.numeric.factor(v1_idsc_itm20)+
as.numeric.factor(v1_idsc_itm21)+
as.numeric.factor(v1_idsc_itm22)+
as.numeric.factor(v1_idsc_itm23)+
as.numeric.factor(v1_idsc_itm24)+
as.numeric.factor(v1_idsc_itm25)+
as.numeric.factor(v1_idsc_itm26)+
as.numeric.factor(v1_idsc_itm27)+
as.numeric.factor(v1_idsc_itm28)+
as.numeric.factor(v1_idsc_itm29)+
as.numeric.factor(v1_idsc_itm30)
summary(v1_idsc_sum)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.0 3.0 8.0 11.9 18.0 63.0 302
Code itm 11, 12, 13 and 14 as factors (omitted before due to ifelse condition)
v1_idsc_itm11<-factor(v1_idsc_itm11,ordered=T)
v1_idsc_itm12<-factor(v1_idsc_itm12,ordered=T)
v1_idsc_itm13<-factor(v1_idsc_itm13,ordered=T)
v1_idsc_itm14<-factor(v1_idsc_itm14,ordered=T)
Create dataset
v1_symp_ids_c<-data.frame(v1_idsc_itm1,v1_idsc_itm2,v1_idsc_itm3,v1_idsc_itm4,v1_idsc_itm5,v1_idsc_itm6,v1_idsc_itm7,
v1_idsc_itm8,v1_idsc_itm9,v1_idsc_itm9a,v1_idsc_itm9b,v1_idsc_itm10,v1_idsc_itm11,v1_idsc_itm12,
v1_idsc_itm13,v1_idsc_itm14,v1_idsc_itm15,v1_idsc_itm16,v1_idsc_itm17,v1_idsc_itm18,v1_idsc_itm19,
v1_idsc_itm20,v1_idsc_itm21,v1_idsc_itm22,v1_idsc_itm23,v1_idsc_itm24,v1_idsc_itm25,v1_idsc_itm26,
v1_idsc_itm27,v1_idsc_itm28,v1_idsc_itm29,v1_idsc_itm30,v1_idsc_sum)
The YMRS (Young, Biggs, Ziegler, & Meyer, 1978) is an 11-item rating scale used to assess the severity of mania symptoms. Each item is rated on an ordinal scale, either from zero to four or from zero to eight with zero indicating absence of the respective symptom. The ratings refer to the past fourty-eight hours. On all items, higher scores mean more severe symptoms. Please find the items below.
Item 1 Elevated mood (ordinal [0,1,2,3,4], v1_ymrs_itm1)
v1_ymrs_itm1<-c(v1_clin$v1_ymrs_ymrs1_gehob_stimm,v1_con$v1_ymrs_ymrs1_gehob_stimm)
v1_ymrs_itm1<-factor(v1_ymrs_itm1, ordered=T)
descT(v1_ymrs_itm1)
## 0 1 2 3 4 <NA>
## [1,] No. cases 1269 159 84 21 5 248 1786
## [2,] Percent 71.1 8.9 4.7 1.2 0.3 13.9 100
Item 2 Increased motor activity or energy (ordinal [0,1,2,3,4], v1_ymrs_itm2)
v1_ymrs_itm2<-c(v1_clin$v1_ymrs_ymrs2_gest_aktiv,v1_con$v1_ymrs_ymrs2_gest_aktiv)
v1_ymrs_itm2<-factor(v1_ymrs_itm2, ordered=T)
descT(v1_ymrs_itm2)
## 0 1 2 3 4 <NA>
## [1,] No. cases 1304 137 67 27 3 248 1786
## [2,] Percent 73 7.7 3.8 1.5 0.2 13.9 100
Item 3 Sexual interest (ordinal [0,1,2,3,4], v1_ymrs_itm3)
v1_ymrs_itm3<-c(v1_clin$v1_ymrs_ymrs3_sex_interesse,v1_con$v1_ymrs_ymrs3_sex_interesse)
v1_ymrs_itm3<-factor(v1_ymrs_itm3, ordered=T)
descT(v1_ymrs_itm3)
## 0 1 2 3 <NA>
## [1,] No. cases 1431 61 31 10 253 1786
## [2,] Percent 80.1 3.4 1.7 0.6 14.2 100
Item 4 Sleep (ordinal [0,1,2,3,4], v1_ymrs_itm4)
v1_ymrs_itm4<-c(v1_clin$v1_ymrs_ymrs4_schlaf,v1_con$v1_ymrs_ymrs4_schlaf)
v1_ymrs_itm4<-factor(v1_ymrs_itm4, ordered=T)
descT(v1_ymrs_itm4)
## 0 1 2 3 4 <NA>
## [1,] No. cases 1363 87 44 42 1 249 1786
## [2,] Percent 76.3 4.9 2.5 2.4 0.1 13.9 100
Item 5 Irritability (ordinal [0,2,4,6,8], v1_ymrs_itm5)
v1_ymrs_itm5<-c(v1_clin$v1_ymrs_ymrs5_reizbarkeit,v1_con$v1_ymrs_ymrs5_reizbarkeit)
v1_ymrs_itm5<-factor(v1_ymrs_itm5, ordered=T)
descT(v1_ymrs_itm5)
## 0 2 4 6 <NA>
## [1,] No. cases 1299 193 44 3 247 1786
## [2,] Percent 72.7 10.8 2.5 0.2 13.8 100
Item 6 Speech: rate & amount (ordinal [0,2,4,6,8], v1_ymrs_itm6)
v1_ymrs_itm6<-c(v1_clin$v1_ymrs_ymrs6_sprechweise,v1_con$v1_ymrs_ymrs6_sprechweise)
v1_ymrs_itm6<-factor(v1_ymrs_itm6, ordered=T)
descT(v1_ymrs_itm6)
## 0 2 4 6 8 <NA>
## [1,] No. cases 1299 113 84 38 3 249 1786
## [2,] Percent 72.7 6.3 4.7 2.1 0.2 13.9 100
Item 7 Language: thought disorder (ordinal [0,1,2,3,4], v1_ymrs_itm7)
v1_ymrs_itm7<-c(v1_clin$v1_ymrs_ymrs7_sprachstoer,v1_con$v1_ymrs_ymrs7_sprachstoer)
v1_ymrs_itm7<-factor(v1_ymrs_itm7, ordered=T)
descT(v1_ymrs_itm7)
## 0 1 2 3 <NA>
## [1,] No. cases 1305 162 61 9 249 1786
## [2,] Percent 73.1 9.1 3.4 0.5 13.9 100
Item 8 Content (ordinal [0,2,4,6,8], v1_ymrs_itm8)
v1_ymrs_itm8<-c(v1_clin$v1_ymrs_ymrs8_inhalte,v1_con$v1_ymrs_ymrs8_inhalte)
v1_ymrs_itm8<-factor(v1_ymrs_itm8, ordered=T)
descT(v1_ymrs_itm8)
## 0 2 4 6 8 <NA>
## [1,] No. cases 1409 69 15 21 21 251 1786
## [2,] Percent 78.9 3.9 0.8 1.2 1.2 14.1 100
Item 9 Disruptive or aggressive behavior (ordinal [0,2,4,6,8], v1_ymrs_itm9)
v1_ymrs_itm9<-c(v1_clin$v1_ymrs_ymrs9_exp_aggr_verh,v1_con$v1_ymrs_ymrs9_exp_aggr_verh)
v1_ymrs_itm9<-factor(v1_ymrs_itm9, ordered=T)
descT(v1_ymrs_itm9)
## 0 2 4 <NA>
## [1,] No. cases 1462 66 5 253 1786
## [2,] Percent 81.9 3.7 0.3 14.2 100
Item 10 Appearance (ordinal [0,1,2,3,4], v1_ymrs_itm10)
v1_ymrs_itm10<-c(v1_clin$v1_ymrs_ymrs10_erscheinung,v1_con$v1_ymrs_ymrs10_erscheinung)
v1_ymrs_itm10<-factor(v1_ymrs_itm10, ordered=T)
descT(v1_ymrs_itm10)
## 0 1 2 3 <NA>
## [1,] No. cases 1381 129 23 3 250 1786
## [2,] Percent 77.3 7.2 1.3 0.2 14 100
Item 11 Insight (ordinal [0,1,2,3,4], v1_ymrs_itm11)
v1_ymrs_itm11<-c(v1_clin$v1_ymrs_ymrs11_krkh_einsicht,v1_con$v1_ymrs_ymrs11_krkh_einsicht)
v1_ymrs_itm11<-factor(v1_ymrs_itm11, ordered=T)
descT(v1_ymrs_itm11)
## 0 1 2 3 4 <NA>
## [1,] No. cases 1424 52 29 11 8 262 1786
## [2,] Percent 79.7 2.9 1.6 0.6 0.4 14.7 100
Create YMRS total score (continuous [0-60], v1_ymrs_sum)
v1_ymrs_sum<-(as.numeric.factor(v1_ymrs_itm1)+
as.numeric.factor(v1_ymrs_itm2)+
as.numeric.factor(v1_ymrs_itm3)+
as.numeric.factor(v1_ymrs_itm4)+
as.numeric.factor(v1_ymrs_itm5)+
as.numeric.factor(v1_ymrs_itm6)+
as.numeric.factor(v1_ymrs_itm7)+
as.numeric.factor(v1_ymrs_itm8)+
as.numeric.factor(v1_ymrs_itm9)+
as.numeric.factor(v1_ymrs_itm10)+
as.numeric.factor(v1_ymrs_itm11))
summary(v1_ymrs_sum)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.000 0.000 0.000 2.554 3.000 39.000 280
Create dataset
v1_symp_ymrs<-data.frame(v1_ymrs_itm1,
v1_ymrs_itm2,
v1_ymrs_itm3,
v1_ymrs_itm4,
v1_ymrs_itm5,
v1_ymrs_itm6,
v1_ymrs_itm7,
v1_ymrs_itm8,
v1_ymrs_itm9,
v1_ymrs_itm10,
v1_ymrs_itm11,
v1_ymrs_sum)
The CGI (see e.g. Busner & Targum, 2007) measures illness severity. The degree of impairment is to be quantified on a scale from zero to seven. A patient should be rated 0 if not conclusively assessable, so here zero is repaced with “-999” and the remaining seven gradations are on an ordinal scale. These range from “normal, not at all ill”-1 to “extremely ill”-7. Please note that in all other study visits, the improvement scale (whether or not there was improvement compared to the last study visit) is also assessed. All control subjects also have -999 in this variable.
v1_cgi_s<-c(v1_clin$v1_cgi_cgi1_schweregrad,rep(-999,dim(v1_con)[1]))
v1_cgi_s[v1_cgi_s==0]<- -999
v1_cgi_s<-factor(v1_cgi_s, ordered=T)
descT(v1_cgi_s)
## -999 1 2 3 4 5 6 7 <NA>
## [1,] No. cases 468 17 56 313 383 447 73 5 24 1786
## [2,] Percent 26.2 1 3.1 17.5 21.4 25 4.1 0.3 1.3 100
The GAF scale is a rating scale that is used to measure an individual’s psychosocial functioning. The GAF was initially developed by Luborsky (1962) as Health-Sickness Rating Scale, revised by Endicott et al. (1976) under the name GAS of which a modified version was included in the DSM-III-R and, with minimal changes, also in the DSM-IV as GAF scale (Axis V). The scale is continuous and ranges from one to 100. Values of zero indicate lack of information. Such values were therefore set to “-999”. The following rating instructions are given:
“No symptoms. Superior functioning in a wide range of activities, life’s problems never seem to get out of hand, is sought out by others because of his or her many positive qualities.”: 91-100
“Absent or minimal symptoms (e.g., mild anxiety before an exam), good functioning in all areas, interested and involved in a wide range of activities, socially effective, generally satisfied with life, no more than everyday problems or concerns.”: 81-90
“If symptoms are present, they are transient and expectable reactions to psychosocial stressors (e.g., difficulty concentrating after family argument); no more than slight impairment in social, occupational, or school functioning (e.g., temporarily falling behind in schoolwork).”: 71-80,
“Some mild symptoms (e.g., depressed mood and mild insomnia) or some difficulty in social, occupational, or school functioning (e.g., occasional truancy, or theft within the household), but generally functioning pretty well, has some meaningful interpersonal relationships.”: 61-70
“Moderate symptoms (e.g., flat affect and circumlocutory speech, occasional panic attacks) or moderate difficulty in social, occupational, or school functioning (e.g., few friends, conflicts with peers or co-workers)”: 51-60
“Serious symptoms (e.g., suicidal ideation, severe obsessional rituals, frequent shoplifting) or any serious impairment in social, occupational, or school functioning (e.g., no friends, unable to keep a job, cannot work).”: 41-50
“Some impairment in reality testing or communication (e.g., speech is at times illogical, obscure, or irrelevant) or major impairment in several areas, such as work or school, family relations, judgment, thinking, or mood (e.g., depressed adult avoids friends, neglects family, and is unable to work; child frequently beats up younger children, is defiant at home, and is failing at school).”: 31-40
“Behavior is considerably influenced by delusions or hallucinations or serious impairment, in communication or judgment (e.g., sometimes incoherent, acts grossly inappropriately, suicidal preoccupation) or inability to function in almost all areas (e.g., stays in bed all day, no job, home, or friends)”: 21-30
“Some danger of hurting self or others (e.g., suicide attempts without clear expectation of death; frequently violent; manic excitement) or occasionally fails to maintain minimal personal hygiene (e.g., smears feces) or gross impairment in communication (e.g., largely incoherent or mute).”: 11-20
“Persistent danger of severely hurting self or others (e.g., recurrent violence) or persistent inability to maintain minimal personal hygiene or serious suicidal act with clear expectation of death.”: 1-10
According to the Endicott et al. (1976), “[m]ost outpatients will be rated 31 to 70, and most inpatients between 1 and 40.”.
The scale is continuous but, in the opinion of most experienced raters, rather has ordinal scale level.
In the present study, many raters used values at the margin of each category, such as 50, 60, 70, 80, 90, or 100 to rate patients, which lead to pronounced spikes in the distribution of GAF values (see histogram below).
Manually set entries of three probands to NA, which cannot be done in the original phenotype database
Combine clinical and control individuals
v1_gaf<-c(v1_clin$v1_gaf_gaf_code,v1_con$v1_gaf_gaf_code)
v1_gaf[v1_gaf==0]<- -999
summary(v1_gaf[v1_gaf>0])
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 4.00 50.00 60.00 62.48 75.00 100.00 191
Histogram of GAF scores of both CLINICAL and CONTROL study participants
hist(v1_gaf[v1_gaf>0],breaks=c(0:100))
Boxplot of GAF scores of both CLINICAL and CONTROL study participants
boxplot(v1_gaf[v1_gaf>0 & v1_stat=="CLINICAL"], v1_gaf[v1_gaf>0 & v1_stat=="CONTROL"],ylab="GAF score",ylim=c(0,100),names=c("Clinical","Control"))
Create dataset
v1_ill_sev<-data.frame(v1_cgi_s, v1_gaf)
During the first study visit, the following neuropsychological tests are completed by the participant: Trail-Making-Test (parts A and B), Digit-Symbol-Test (taken fron HAWIE-R), Verbal Digit-span (forward and backward; “Zahlennachsprechen”, also from HAWIE-R), Multiple-Choice Vocabulary Intelligence Test (MWT-B). All are paper-and-pencil tests and are briefly explained below.
Please note: We have now also included test results from only partially completed tests
General comments on the testing (character [free text], v1_nrpsy_com) If there were no comments, this item was coded -999.
Language proficiency of the participant (ordinal [“mother tongue”,“good”,“sufficient”,“not sufficient”], v1_nrpsy_lng)
v1_nrpsy_lng_pre<-c(v1_clin$v1_npu_np_sprach,v1_con$v1_npu_np_sprach)
v1_nrpsy_lng<-ifelse(v1_nrpsy_lng_pre==0, "mother tongue",
ifelse(v1_nrpsy_lng_pre==1, "good",
ifelse(v1_nrpsy_lng_pre==2, "sufficient",
ifelse(v1_nrpsy_lng_pre==3, "not sufficient", NA))))
v1_nrpsy_lng<-factor(v1_nrpsy_lng, ordered=T, levels=c("mother tongue","good",
"sufficient","not sufficient"))
descT(v1_nrpsy_lng)
## mother tongue good sufficient not sufficient <NA>
## [1,] No. cases 1556 130 33 3 64 1786
## [2,] Percent 87.1 7.3 1.8 0.2 3.6 100
Motivation of the participant (ordinal [“poor”,“average”,“good”], v1_nrpsy_mtv)
v1_nrpsy_mtv_pre<-c(v1_clin$v1_npu_np_mot,v1_con$v1_npu_np_mot)
v1_nrpsy_mtv<-ifelse(v1_nrpsy_mtv_pre==0, "poor",
ifelse(v1_nrpsy_mtv_pre==1, "average",
ifelse(v1_nrpsy_mtv_pre==2, "good", NA)))
v1_nrpsy_mtv<-factor(v1_nrpsy_mtv, ordered=T, levels=c("poor","average","good"))
descT(v1_nrpsy_mtv)
## poor average good <NA>
## [1,] No. cases 27 145 1405 209 1786
## [2,] Percent 1.5 8.1 78.7 11.7 100
Using a pen, the participant is required to connect digits in increasing order (“1-2-3-4…”; part A) or connect digits and symbols alternately (“1-A-2-B-3-C…”; part B). The time taken to complete each part of the test is measured. While part A assesses psychomotor speed of the participant, part B assesses switching between two automated tasks (counting and reciting the alphabet). The time taken to complete the A form may be subtracted from the time taken to complete the B form to arrive at an estimate of the switching process. This test measures multiple cognitive domains which are difficult to disentangle (e.g. visual search etc.), but is a good estimator of executive function. The errors the participant made are also recorded (during the test, the participant is required by the interviewer to correct errors immediately). However, these errors are usually not evaluated separately, as any error the participant makes is supposed to be reflected in the time taken to complete the test.
TMT Part A, time (continuous [seconds], v1_nrpsy_tmt_A_rt)
v1_nrpsy_tmt_A_rt<-c(v1_clin$v1_npu_tmt_001,v1_con$v1_npu_np_tmt_001)
summary(v1_nrpsy_tmt_A_rt)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 9.00 24.00 31.00 34.78 41.00 180.00 82
TMT Part A, errors (continuous [number of errors], v1_nrpsy_tmt_A_err) We did not impose any cut-off value to errors (see above)
v1_nrpsy_tmt_A_err<-c(v1_clin$v1_npu_tmt_af_001,v1_con$v1_npu_np_tmtfehler_001)
summary(v1_nrpsy_tmt_A_err)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.000 0.000 0.000 0.134 0.000 5.000 99
TMT Part B, time (continuous [seconds], v1_nrpsy_tmt_B_rt) As recommended by Strauss (2006), paricipants with a time >300s were set to 300s. We checked for values <10s, but there were none present.
v1_nrpsy_tmt_B_rt<-c(v1_clin$v1_npu_tmt_002,v1_con$v1_npu_np_tmt_002)
v1_nrpsy_tmt_B_rt[v1_nrpsy_tmt_B_rt>300]<-300
summary(v1_nrpsy_tmt_B_rt)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 16.00 51.00 70.00 79.81 96.00 300.00 151
TMT Part B, errors (continuous [number of errors], v1_nrpsy_tmt_B_err) We did not impose any cut-off value to errors (see above)
v1_nrpsy_tmt_B_err<-c(v1_clin$v1_npu_tmt_af_002,v1_con$v1_npu_np_tmtfehler_002)
summary(v1_nrpsy_tmt_B_err)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.0000 0.0000 0.0000 0.5986 1.0000 17.0000 164
This test assesses short-term (forward digit-span) and working memory (backward digit-span). In the short-term memory task, the participant is asked to repeat strings of digits verbally presented by the interviewer. The initial length of the string is two items (“1-7”). If the participant is able to repeat two different strings of numbers of the same length (“1-7” and “6-3”, each assessed separately), the interviewer moves to a longer string, (“5-8-2”), which is also assessed two times separately (using different strings). For each correctly repeated string of digits, the subject receives one point. The test is repeated until the participant fails to repeat two presented strings of the same length. All points are added up in the end to receive the final score. The working memory task works exactly the same way, only that the subject has to repeat the string of digits presented by the interviewer in backward order. Briefly, the difference between short-term and working memory is that the latter involves mental manipulation.
Forward (continuous [number of items], v1_nrpsy_dgt_sp_frw)
v1_nrpsy_dgt_sp_frw<-c(v1_clin$v1_npu_zns_001,v1_con$v1_npu_np_wie_001)
summary(v1_nrpsy_dgt_sp_frw)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 3.000 8.000 9.000 9.445 11.000 16.000 125
Histogram
hist(v1_nrpsy_dgt_sp_frw,breaks=c(1:16), main="Digit-span forward", xlab="Score",ylab="Number of Individuals")