Skip to content

Instantly share code, notes, and snippets.

@raqini
Last active November 21, 2016 14:31
Show Gist options
  • Save raqini/1ea78d8231b42e23c079a9221b1c8d19 to your computer and use it in GitHub Desktop.
Save raqini/1ea78d8231b42e23c079a9221b1c8d19 to your computer and use it in GitHub Desktop.
Predictive model from GENDEP data published in J Psychiatr Res. 2016 Jul;78:94-102. doi: #10.1016/j.jpsychires.2016.03.016. Combining clinical variables to optimize prediction of antidepressant treatment outcomes. Author: Raquel Iniesta raquel.iniesta@kcl.ac.uk
#Predictive model from GENDEP data published in J Psychiatr Res. 2016 Jul;78:94-102. doi: #10.1016/j.jpsychires.2016.03.016.
#Combining clinical variables to optimize prediction of antidepressant treatment outcomes.
#Raquel Iniesta raquel.iniesta@kcl.ac.uk
#Use the model to estimate the percentage of depressive symptoms improvement for a patient of depression.
#Outcome predicted is the percentage of improvement measured with MADRS scale after 12 weeks of treatment with Escitalopram.
#list of 14 baseline predictors that are necessary to predict the outcome.
# MADRS_10 is the score for MADRS item number 10
# HRSD_1 is the score for HRSD-17 item number 1
# HRSD_4 is the score for HRSD-17 item number 4
# HRSD_7 is the score for HRSD-17 item number 7
# HRSD_13 is the score for HRSD-17 item number 13
# BDI_13 is the score for BDI item number 13
# BDI_16 is the score for BDI item number 16
# interest_activity_dimension
# SCAN_anxsomdep is the the score for SCAN item Anxious-somatizing depression
# SCAN_loss_of_energy is the the score for SCAN item loss of energy
# SCAN_phobia is the score for SCAN item phobia
# Taking_tricyclic_atidepressant at time of prediction is 1=yes or 0=no
# medical history of taking tricyclic antidepressants is 1=yes or 0=no
# medical history of taking dual antidepressants is 1=yes or 0=no
#main references:
#BDI (BECK DEPRESSION INVENTORY): A.T. Beck et al. An inventory for measuring depression Arch. General Psychiatry, 4 (1961), pp. 561–571
#MADRS (MONTGOMERY-ASBERG DEPRESSION RATING SCALE): S.A. Montgomery, M. Asberg. A new depression scale designed to be sensitive to change. Br. J. Psychiatry, 134 (1979), pp. 382–389
#HRSD-17 (HAMILTON RATING SCALE FOR DEPRESSION): M. Hamilton. Development of a rating scale for primary depressive illness. Br. J. Soc. Clin. Psychol., 6 (1967), pp. 278–296 17-items version: http://dcf.psychiatry.ufl.edu/files/2011/05/HAMILTON-DEPRESSION.pdf
#SCAN (SCHEDULES FOR CLINICAL ASSESSMENT IN NEUROPSYCHIATRY): J. K. Wing et al. SCAN. Schedules for Clinical Assessment in Neuropsychiatry. Arch.Gen.Psychiatry, 47 (1990), pp. 589-93
#interest activity dimension, defined as in R. Uher et al. Depression symptom dimensions as predictors of antidepressant treatment outcome: replicable evidence for interest-activity symptoms Psychol. Med., 42 (2012), pp. 967–980
#Install the last version of R from https://cran.r-project.org
#Copy and paste the next instructions in the R console:
#STEP 1. Supply the values for a specific patient. 0 values must be replaced by the current patient values.
MADRS_10<-0
HRSD_1<-0
HRSD_4<-0
HRSD_7<-0
HRSD_13<-0
BDI_13<-0
BDI_16<-0
interest_activity_dimension<-0
SCAN_anxsomdep<-0
SCAN_loss_of_energy<-0
SCAN_phobia<-0
Taking_tricyclic_antidepressant<-0
medical_history_of_taking_tricyclic<-0
medical_history_of_taking_dual<-0
##STEP 2. Next code lines allow to estimate the outcome prediction that will be stored in the object "madrs.improvement"
#Please do not modify any value in the code!! Copy and paste in the R console.
model.coefficients<-c(1.8473540300,0.6196641496,0.8673149303,-1.2807373572,-2.0119019792,-2.3525239117,-4.5598219079,-0.0007323682,
-0.2409525468,-0.0705263577,-0.3610834139,-2.6210111006,-0.0049221088,-3.4221171201,-0.9415296894)
predictors_mean_ingendep<-c(1.74137900,2.75000000,1.11637900,2.62931000,1.64655200,1.72413800,1.64655200,0.62427540,0.54310340,2.34482800,
0.40517240,0.17241380,0.16379310,0.09051724)
predictors_sd_ingendep<-c(1.2247140,0.7311854,0.8524418,0.9024274,0.9512290,0.7682691,0.9512290,0.7405349,0.4992157,0.6045061,0.4919868,
0.4610521,0.3708879,0.2875417)
predictors<-c(MADRS_10,HRSD_1,HRSD_4,HRSD_7,HRSD_13,BDI_13,BDI_16,interest_activity_dimension,SCAN_anxsomdep,SCAN_loss_of_energy,SCAN_phobia,Taking_tricyclic_antidepressant,medical_history_of_taking_tricyclic,medical_history_of_taking_dual)
predictors.std<-(predictors-predictors_mean_ingendep)/predictors_sd_ingendep
madrs.improvement<-model.coefficients[1]+sum(predictors.std*model.coefficients[2:15])
madrs.improvement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment