ENMO_fullRecordingMean not generated

44 views
Skip to first unread message

Cecilie Agergaard sørensen

unread,
Oct 30, 2024, 5:09:06 AM10/30/24
to R package GGIR
Hi Vincent, 

I was hoping you'd be able to help me. I am putting accelerometer data through GGIR. The files are ~2 days long, the accelerometer is originally in csv format, but I am formatting them to Actigraph before running the files through GGIR. The files seems to run through GGIR fine but I don't get an ENMO_fullRecordingMean for any of the recordings. Below is a picture of my output from part 2. In the daysummary file it displays that only days with 24 hours have any valid hours although most of the other days have >10 hours data. I am wondering if I am missing a parameter in my code to be able to get the ENME_fullRecordingMean or a parameter to specify what valid hours is? My code is below together with 2 screenshots of my output files from part 2. 

Any advice is much appreciated. 
Many thanks, 
Cecilie

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
)
 
 GGIR_output_summary.PNG

GGIR_output.PNG

Vincent van Hees

unread,
Nov 13, 2024, 11:09:52 AM11/13/24
to Cecilie Agergaard sørensen, R package GGIR
Hi Cecilie,

I suspect this is because you have strategy = 2 and recording of 48 hours not starting at midnight. As a result you only consider the middle 24 hours as valid, which may not be enough to trigger any meaningful weighted average calculation as there is only 24 hours. You could as well use the normal day level estimate of ENMO.

Note that we renamed strategy to data_masking_strategy for readability, but it still works.

To verify this try data_masking_strategy = 1, which will tell GGIR to consider all data in the recording. This should trigger the calculation of ENMO_fullRecordingMean because there is more than 24 hours of data. I cannot find back in the code right now whether we have a specific threshold on this or whether this just emerged from the fact that the code needs more than 24 hours of data to do any meaningful weighting. ... it is code I wrote in 2012 and I seem to not have changed it in all those year, which is either reassuring or concerning depending on how you look at it.

Best,
Vincent

--
You received this message because you are subscribed to the Google Groups "R package GGIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to RpackageGGIR...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/RpackageGGIR/a243a021-24fd-4723-824d-ec45a7d535c0n%40googlegroups.com.

Cecilie Agergaard sørensen

unread,
Nov 20, 2024, 11:58:24 AM11/20/24
to R package GGIR
Hi Vincent, 

Thank you for your reply! I changed the data_masking_strategy to 1 as you suggested and I now get the ENMO_full_RecordingMean. This does indeed give me more than 24 hours valid data where I would only have 24 valid hours before. 

Many thanks for your help! 
Cecilie  

Reply all
Reply to author
Forward
0 new messages