Digital Phenotyping Mood Disorders Reproducible R Code

Overview This post documents reproducible code accompanying the manuscript draft “Digital Biomarkers of Mood Disorders and Symptom Change” by Nicholas C. Jacobson, Hilary M. Weingardenm and Sabine Wilhelm (published in Nature Partner Journal (npj): Digital Medicine). This code uses machine learning to predict the diagnostic status and depressive symptom change in a a group of 23 patients with bipolar disorder or major depressive disorder and 32 non-disordered controls using actigraphy data.

DTVEM Package Illustration

Loading in the Dataset This code will illustrate the R package (DTVEM) with simulated data available in the DTVEM package. Click here to download and install the DTVEM package. First load the DTVEM package. library(DTVEM) Next load the simulated data included in the DTVEM package, called exampledat1. data(exampledat1) Get a look at the file structure. head(exampledat1)

Time X ID

1 1 -1.076422 1

2 2 -1.904713 1

3 3 1.