Skip to content

Instantly share code, notes, and snippets.

@tarensanders
Last active October 4, 2021 21:58
Show Gist options
  • Save tarensanders/713ec22763429e3d596df56ca6c697ca to your computer and use it in GitHub Desktop.
Save tarensanders/713ec22763429e3d596df56ca6c697ca to your computer and use it in GitHub Desktop.
Pooled Sleep & PA GGIR shell
g.shell.GGIR(
mode=c(1,2,3,4,5),
datadir=datadir,
outputdir=outdir,
do.report=c(2,4,5),
overwrite = TRUE,
do.enmo = TRUE,
do.hfen = TRUE,
do.enmoa = TRUE,
#=====================
# Part 2
#=====================
strategy = 2,
maxdur = 0,
includedaycrit = 16,
qwindow=c(0,24),
mvpathreshold = 100,
bout.metric = 4,
excludefirstlast = TRUE,
includenightcrit = 16,
MX.ig.min.dur = 10,
iglevels = 50,
epochvalues2csv = FALSE,
winhr = 16,
qlevels = c(
960/1440, # 2/3rds of the day
1320/1440, # Top 120min
1380/1440, # Top 60min
1410/1440, # Top 30min
1425/1440, # Top 15min
1435/1440 # Top 5min
),
#=====================
# Part 3 + 4
#=====================
def.noc.sleep = 1,
outliers.only = TRUE,
criterror = 4,
do.visual = TRUE,
#=====================
# Part 5
#=====================
threshold.lig = c(
44.8, # Adults - AG wrist
47.4, # Adults - AG hip
46.9, # Adults - GA hip
45.8, # Adults - GA wrist
63.3, # Child - AG hip
64.1, # Child - GA hip
56.3, # Child - GA wrist
35.6 # Child - AG wrist
),
threshold.mod = c(
61.1, # Adults - AG hip
68.7, # Adults - GA hip
93.2, # Adults - GA wrist
100.6, # Adults - AG wrist
142.6, # Child - AG hip
152.8, # Child - GA hip
191.6, # Child - GA wrist
201.4 # Child - AG wrist
),
threshold.vig = c(
258.7, # Adults - AG hip
266.8, # Adults - GA hip
418.3, # Adults - GA wrist
428.8, # Adults - AG wrist
464.6, # Child - AG hip
514.3, # Child - GA hip
695.8, # Child - GA wrist
707.0 # Child - AG wrist
),
boutcriter = 0.8, 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 = 2/3,
#=====================
# Visual report
#=====================
timewindow = c("WW"),
visualreport=FALSE)
@tarensanders
Copy link
Author

Added winhr = 16, per Rowland's suggestion to do IG for most active 16 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment