datadir = "directory_data"
outputdir = "directory_output"
studyname = "example"
g.shell.GGIR(
#=====================
# General parameters
#=====================
mode=2, #Which sections to run
datadir=datadir, #specify above
outputdir=outputdir, #specify above
studyname = studyname, #specify above
f0=1,
f1=c(),
overwrite = FALSE, #overwrite previous milestone data?
print.filename=TRUE,
#=====================
# Part 1 parameters:
#=====================
# Key functions: reading file, auto-calibration, and extracting features
do.cal=TRUE, #Apply autocalibration? (recommended)
do.enmo=TRUE, #Needed for physical activity analysis
do.anglez=TRUE, #Needed for sleep detection
chunksize=1.0,
printsummary=TRUE,
do.parallel=TRUE,
#=====================
# Part 2 parameters:
#=====================
# Key functions: Non-wear detection, imputation, and basic descriptives
strategy = 2,
hrs.del.start = 0,
hrs.del.end = 0,
maxdur = 8,
includedaycrit = 6,
L5M5window = c(0,24), #window over which to calculate L5 and M5
M5L5res = 10, #resolution in minutes of M5 and L5 calculation
winhr = c(5,10), # size of M5 and L5 (5 hours by default)
qwindow=c(0,24),
qlevels = c(c(1380/1440),c(1410/1440)),
ilevels = c(seq(0,400,by=50),8000),
mvpathreshold =c(100,120),
excludefirstlast = TRUE,
#=====================
# Part 3 parameters:
#=====================
# Key functions: Sleep detection
ignorenonwear = TRUE,
#=====================
# Part 4 parameters:
#=====================
# Key functions: Integrating sleep log (if available) with sleep detection, storing day and person specific summaries of sleep.
relyonsleeplog = FALSE,
#=====================
# Part 5 parameters:
#=====================
# Key functions: Merging physical activity with sleep analyses
threshold.lig = c(30,40,50),
threshold.mod = c(100,120),
threshold.vig = c(400,500),
boutdur.in = c(10,20,30),
boutdur.lig = c(1,5,10),
boutdur.mvpa = c(1,5,10),
timewindow = c("MM","WW"),
#=====================
# Visual report
#=====================
do.report=c(2,4,5),
visualreport=TRUE
)