Valid weardays # differs between part 2 and 5

135 views
Skip to first unread message

Simone Verswijveren

unread,
Jan 16, 2023, 12:41:00 AM1/16/23
to R package GGIR
Hi Vincent and Jairo,

Thank you again for the amazing GGIR course and the work you are doing on GGIR. 

I am trying to run GGIR at the moment with 2 files (day-time only wear protocol in children), however, something odd is happening with the valid wear time criteria (set at 8 hours). The Nvalid days in part 2 is different to the Nvalid days in part 5 (WW and MM). 

The outcome of the part2_daysummary.csv includes 7 valid weardays (5week 2 weekend), which corresponds with the part2_summary. But once I check the corresponding part 5 files (those that I have most interest in) these numbers are different, with only 4 valid weardays in total (2 week and 2 weekend).  Could you please explain me why some of the days are not exported into the day 5 files?

I would also really appreciate any other feedback on the below GGIR-code, and in particular the "WornDuringSleep =FALSE,  part2ImpWithZero = TRUE,  part2ExcludeNonwear = TRUE,", since this is not yet available online in the vignette and I am not entirely sure if I have used this correctly in combination with the other parts. My code can be found below.

Thanks,
Simone



######################CODE###########################

GGIR(
 
  datadir="C:/~/GGIR processing data",
 
  outputdir=  "C:/~/GGIR results",    
 
  mode=c(1,2,3,4,5),
 
  studyname = "ADPRF",
 
  desiredtz = "Australia/Melbourne",
 
  overwrite = TRUE,
 
  idloc=7,
 
  storefolderstructure=TRUE,

  print.filename= TRUE,
 
  # Part 1 – Raw data processing/data quality/extracts features/nonwear detection
  windowsizes = c(5, 900, 3600),
 
  do.cal = TRUE,
 
  do.enmo = TRUE,
  acc.metric = "ENMO",    
 
  do.enmoa = FALSE, #default is false
  do.anglex = FALSE, #default is false
  do.angley = FALSE, #default is false
  do.anglez = TRUE, #default is true
 
  do.neishabouricounts = TRUE,  
 
  part5_agg2_60sec = FALSE,

  printsummary=FALSE,
 
  # Part 2 – data quality and descriptives
  strategy = 1,

  maxdur = 0,
  max_calendar_days = 0,

  hrs.del.start = 0, #only needed for strategy 1
  hrs.del.end = 0, #only needed for strategy 1

  WornDuringSleep =FALSE,
  part2ImpWithZero = TRUE,
  part2ExcludeNonwear = TRUE,
 
  includedaycrit = 8,
  includedaycrit.part5 = 1,
 
  do.imp=TRUE,

  qlevels = c(
    960/1440, #most active 2/3rds of the day
    (24 - 2) / 24, # M120
    (24 - 1) / 24, # M60
    1410/1440, #most active 30 min of the day
    1425/1440, #most active 15 min of the day
    1435/1440), #most active 5 min of the day
 
  ilevels = c(0, 50, 100, 150, 200, 250, 300, 350, 700, 8000),
 
  iglevels = 1,
 
  mvpathreshold = c(63.3, 142.6, 464.6),
  mvpadur = c(1, 5, 10),
  boutcriter = 1.0,

  qwindow = c(0, 24),

  # Parts 3 & 4 – sleep - NOT APPLICABLE
 
  # Part 5 – full-day time-use analysis

  threshold.lig = 63.3, threshold.mod = 142.6, threshold.vig = 464.6,
 
  boutdur.in = c(1, 5, 10), boutdur.lig = c(1, 5, 10), boutdur.mvpa = c(1, 5, 10),
 
  boutcriter.in = 1.0, boutcriter.lig = 1.0, boutcriter.mvpa = 1.0,
 
  frag.metrics="all",

  timewindow = c("MM","WW"),

  do.report = c(2, 4, 5),

  visualreport = TRUE,
  dofirstpage=TRUE,
  epochvalues2csv=TRUE,
  viewingwindow=1
 
)


Jairo Hidalgo Migueles

unread,
Jan 17, 2023, 3:30:20 AM1/17/23
to R package GGIR
Hi,

Part 5 uses the argument "includedaycrit.part5" to define the valid days, and you have it set to 1, which means 100% of the day (a value between 0 and 1 is considered as a ratio, any number above 1 is considered as the absolute number of hours, so you may want to define them equally in "includedaycrit" and "includedaycrit.part5"). 

Another difference is that part 2 would include any day with at least 8 valid hours out of the 24 hours of the day, but part 5 would only include those days with 8 hours during the awake time of the day (so some differences are to be expected).

Best,
Jairo

Simone Verswijveren

unread,
Oct 5, 2023, 7:13:43 PM10/5/23
to R package GGIR
Thank you, Jairo! This is very helpful.
Reply all
Reply to author
Forward
0 new messages