HeartSteps pilot data analysis

Overview

File Description
ema.options.R Response options for each EMA question. Loaded by init.R.
functions.R Helper functions, mainly for data formatting. Loaded by init.R.
init.R Initialize common variables. You should run this at the beginning of every R session.
read.data.R Read and tidy up CSV-formatted data. Called by workspace.csv.R.
summary.R Compiles summary.Rnw into summary.pdf
summary.Rnw knitr document for the data summary. Loads csv.RData and analysis.RData, the R workspace files
workspace.analysis.R Create a workspace file containing data frames for summary and analysis. Loads csv.RData and analysis.RData, the R workspace files created respectively by workspace.csv.R and workspace.analysis.R.
workspace.csv.R Create a R workspace file containing data frames for the source data files
xzoo.R Extensions for the time series R package zoo. Loaded by init.R.
ema_engagement_plots.R Create plots of EMA engagements. Currently considers a row in engage to be an 'engagement' and treats a missing row as a true zero (lack of engagement). Need to fix: there are many cases with EMA responses but no recorded engagements, so rows in engage are not equivalent to an engagement.

Getting started

Refer to the wiki pages for detail directions to access the data. Unless you maintain the data, only steps 1 and 5 are required.

  1. Mounting M+Box
  2. Exporting data
  3. Preparing data for analysis
  4. Running the data summary
  5. Running data analysis