Institute for Postive Psychology and Education, Australian Catholic University
21 April 2023
GGIR
GGIR
doi: 10.1136/bjsports-2020-103604
Rowlands, 2018
doi: 10.1186/s40798-019-0225-9
doi: 10.1123/pes.2018-0201
doi: 10.1249/MSS.0000000000001561
Calculate all of these metrics at once
Fitting a simple linear model:
\[\hat{y} = \beta_0 + \beta_1x\]
Figure from Migueles et al., 2019 (10.1123/jmpb.2018-0063)
GGIR(
mode,
datadir,
f0,
f1,
windowsizes,
desiredtz,
overwrite,
do.parallel,
maxNcores,
myfun,
outputdir,
studyname,
chunksize,
do.enmo,
do.lfenmo,
do.en,
do.bfen,
do.hfen,
do.hfenplus,
do.mad,
do.anglex,
do.angley,
do.angle,
do.enmoa,
do.roll_med_acc_x,
do.roll_med_acc_y,
do.roll_med_acc_z,
do.dev_roll_med_acc_x,
do.dev_roll_med_acc_y,
do.dev_roll_med_acc_z,
do.lfen,
do.lfx,
do.lfy,
do.lfz,
do.hfx,
do.hfy,
do.hfz,
do.bfx,
do.bfy,
do.bfz,
do.zcx,
do.zcy,
do.zcz,
lb,
hb,
n,
do.cal,
spherecrit,
minloadcrit,
printsummary,
print.filename,
backup.cal.coef,
rmc.noise,
rmc.dec,
rmc.firstrow.acc,
rmc.firstrow.header,
rmc.col.acc,
rmc.col.temp,
rmc.col.time,
rmc.unit.acc,
rmc.unit.temp,
rmc.origin,
rmc.header.length,
mc.format.time,
rmc.bitrate,
rmc.dynamic_range,
rmc.unsignedbit,
rmc.desiredtz,
rmc.sf,
rmc.headername.sf,
rmc.headername.sn,
rmc.headername.recordingid,
rmc.header.structure,
rmc.check4timegaps,
rmc.col.wear,
rmc.doresample,
imputeTimegaps,
selectdaysfile,
dayborder,
dynrange,
configtz,
minimumFileSizeMB,
interpolationType,
expand_tail_max_hours,
metadatadir,
minimum_MM_length.part5,
strategy,
hrs.del.start,
hrs.del.end,
maxdur,
max_calendar_days,
includedaycrit,
L5M5window,
M5L5res,
winhr,
qwindow,
qlevels,
ilevels,
mvpathreshold,
boutcriter,
ndayswindow,
idloc,
do.imp,
storefolderstructure,
epochvalues2csv,
do.part2.pdf,
mvpadur,
window.summary.size,
bout.metric,
closedbout,
IVIS_windowsize_minutes,
IVIS_epochsize_seconds,
IVIS.activity.metric,
iglevels,
TimeSegments2ZeroFile,
qM5L5,
MX.ig.min.dur,
qwindow_dateformat,
anglethreshold,
timethreshold,
acc.metric,
ignorenonwear,
constrain2range,
do.part3.pdf,
sensor.location,
HASPT.algo,
HASIB.algo,
Sadeh_axis,
longitudinal_axis,
HASPT.ignore.invalid,
loglocation,
colid,
coln1,
nnights,
sleeplogidnum,
do.visual,
outliers.only,
excludefirstlast,
criterror,
includenightcrit,
relyonguider,
relyonsleeplog,
def.noc.sleep,
data_cleaning_file,
excludefirst.part4,
excludelast.part4,
sleeplogsep,
sleepwindowType,
excludefirstlast.part5,
boutcriter.mvpa,
boutcriter.in,
boutcriter.lig,
threshold.lig,
threshold.mod,
threshold.vig,
timewindow,
boutdur.mvpa,
boutdur.in,
boutdur.lig,
save_ms5rawlevels,
part5_agg2_60seconds,
save_ms5raw_format,
save_ms5raw_without_invalid,
includedaycrit.part5,
frag.metrics,
LUXthresholds,
LUX_cal_constant,
LUX_cal_exponent,
LUX_day_segments,
do.sibreport
)
GGIR(
mode = c(1, 2, 3, 4, 5),
datadir = "C:/mystudy/mydata",
outputdir = "D:/myresults",
# =====================
# Part 2
# =====================
idloc = 2,
strategy = 2,
maxdur = 9,
includedaycrit = 16,
qwindow = c(0, 24),
qlevels = c(
960 / 1440, # Top 8 hours
1320 / 1440, # Top 120min
1380 / 1440, # Top 60min
1410 / 1440, # Top 30min
1425 / 1440, # Top 15min
1435 / 1440), # Top 5min
ilevels = seq(0, 4000, 50),
iglevels = 1,
mvpathreshold = c(100),
mvpadur = c(1, 5, 10),
boutcriter = 0.8,
# =====================
# Part 3 + 4
# =====================
def.noc.sleep = 1,
excludefirstlast = FALSE,
includenightcrit = 16,
# =====================
# Part 5
# =====================
threshold.lig = c(30), threshold.mod = c(100), threshold.vig = c(400),
boutcriter.in = 0.9, boutcriter.lig = 0.8, boutcriter.mvpa = 0.8,
boutdur.in = c(1, 10, 30), boutdur.lig = c(1, 10), boutdur.mvpa = c(1),
includedaycrit.part5 = 16,
timewindow = c("MM", "WW"),
# =====================
# Reports
# =====================
visualreport = TRUE,
do.report = c(2, 4, 5)
)
meta/
results/
QC/
file summary reports/
config.csv
Some of the key abbreviations:
_pla
(plain); _wei
(weighted); _WD
(weekday); _WE
(weekend)IN
(inactive); LIG
(light); MOD
(moderate); VIG
(vigorous)Some of the key columns:
Nvaliddays*
dur_day_total_[IN|LIG|MOD|VIG]_min
ACC_day_mg
ig_gradient
dur_spt_min
sleep_efficiency
Some of the key columns (not in part 5):
SleepRegularityIndex
Some of the key abbreviations:
AD
(all days); WD
(weekday); WE
(weekend); WWD
(weighted weekday); WWE
(weighted weekend)Some of the key columns (not in part 5):
AD_p99.65278_ENMO_mg_0.24hr
(MX metrics)AD_.0.50._ENMO_mg_0.24hr
(ilevels)Find a column in one of the outputs that is confusing, and see if you can decipher it using the vignette
overwrite = TRUE
.qwindow
qlevels
Example: You want to see if your intervention improves physical activity during school, or if there are changes before or after school. School runs from 8:30am to 3:15pm.
qwindow
qlevels
is almost impossible for anything other than overallExample: You are interested in physical activity during people’s commutes. Participants completed a daily log of when they commuted.
id | date | to_work | work | from_work | home | date | to_work | work | from_work | home |
---|---|---|---|---|---|---|---|---|---|---|
201 | 26-05-2017 | 08:15:00 | 08:30:00 | 17:00:00 | 17:31:00 | 27-05-2017 | 17:31:00 | |||
202 | 25-05-2017 | 07:25:00 | 08:00:00 | 16:50:00 | 17:20:00 | 26-05-2017 | 07:25:00 | 08:00:00 | 16:50:00 | 17:20:00 |
203 | 27-05-2017 | 08:11:00 | 09:01:00 | 17:11:00 | 17:55:00 | 28-05-2017 | 08:11:00 | 09:01:00 | 17:11:00 | 17:55:00 |
Institute for Positive Psychology and Education, Australian Catholic University
motivation-and-behaviour.github.io/accel-processing-workshop