Part 4 Sleep Summary Missing Days

124 views
Skip to first unread message

Taren Sanders

unread,
Mar 16, 2018, 12:17:19 AM3/16/18
to R package GGIR
Hi All,

We've been processing some accelerometer data with more than a week's worth of observations. We are getting the expected number of days in the part 2 day summary csv, however the part 4 night summary csv never presents more than 7 nights worth of data. There are definitely more than 7 nights worth of data. If I inspect the sleep qc PDFs, I can see the expected number of nights are present. We have the excludefirstlast set to FALSE, and we are not using any log data. Am I missing a setting?

Thanks,
Taren

Vincent van Hees

unread,
Apr 5, 2018, 4:14:16 PM4/5/18
to R package GGIR
Hi Taren,
The file "part4_nightsummary_sleep_full.csv" in the results/QC folder may help to clarify this with variable cleaningcode, see also function documentation of part 4.
An explanation could be the non-wear criteria settings that cause GGIR to ignore certain nights if the monitor was not worn for enough hours in the day.
Vincent

Taren Sanders

unread,
Apr 15, 2018, 8:29:47 PM4/15/18
to R package GGIR
Hi Vincent,

Very much appreciate the response. I had a look at the _full night summary, and these still only show 7 nights. That is, it is not that the nights are being excluded (we had turned down all of the variables used to exclude to test this), rather that these nights just don't seem to be processed.It looks like others are having similar problems (https://groups.google.com/forum/#!topic/rpackageggir/7SEDKUM5fLQ). 

If helpful, I've posted the script used below. Again, appreciate any suggestions you have.

Kind regards,
Taren
     
 g.shell.GGIR(#=======================================
                   # INPUT NEEDED:
                   mode=c(2,3,4),
                   metadatadir=c("s:/7-IPPE Data Folder/iPLAY Data/Data/Main Study/Geneactiv Temp Output"),
                   outputdir="s:/7-IPPE Data Folder/iPLAY Data/Data/Main Study/Geneactiv Temp Output", 
                   f0=1, f1=c(), 
                   desiredtz="Australia/Sydney", 
                   overwrite=TRUE,
                   studyname = "MAROOTA_BL",
                   #-------------------------------
                   # Part 1:
                   #-------------------------------
                   # Key functions: reading file, auto-calibration, and extracting features
                   do.enmo = TRUE,             do.anglez=TRUE,
                   chunksize=1,                printsummary=TRUE,
                   windowsizes = c(5,900,3600), 
                   #-------------------------------
                   # Part 2:
                   #-------------------------------
                   strategy = 3,               ndayswindow=7, 
                   #hrs.del.start = 0,          hrs.del.end = 0,
                   #maxdur = 9,                 includedaycrit = 16,
                   winhr = c(5,10),
                   qlevels = c(c(1380/1440),c(1410/1440)),
                   qwindow=c(0,24),
                   ilevels = c(0,56.3,191.6,695.8,8000),
                   mvpathreshold =c(191.6, 695.8), 
                   bout.metric = 4,
                   closedbout=FALSE,
                   do.imp=TRUE, 
                   #-------------------------------
                   # Part 3:
                   #-------------------------------
                   # Key functions: Sleep detection
                   timethreshold= c(5),        anglethreshold=5,
                   ignorenonwear = TRUE,
                   #-------------------------------
                   # Part 4:
                   #-------------------------------
                   # Key functions: Integrating sleep log (if available) with sleep detection
                   # storing day and person specific summaries of sleep
                   excludefirstlast = FALSE,
                   includenightcrit = 0,
                   def.noc.sleep = c(),
                   # loglocation= "C:/mydata/sleeplog.csv",
                   outliers.only = FALSE,
                   criterror = 4,
                   relyonsleeplog = FALSE,
                   # sleeplogidnum = TRUE,
                   # colid=1,
                   # coln1=2,
                   do.visual = TRUE,
                   # nnights = 9,
                   #-------------------------------
                   # Part 5:
                   # Key functions: Merging physical activity with sleep analyses
                   #-------------------------------
                   threshold.lig = c(56.3), threshold.mod = c(191.6),threshold.vig = c(695.8),
                   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),   timewindow = c("WW"),
                   #-----------------------------------
                   # Report generation
                   #-------------------------------
                   # Key functions: Generating reports based on meta-data
                   do.report=c(2,4),
                   visualreport=TRUE,     dofirstpage = TRUE,
                   viewingwindow=1)

Vincent van Hees

unread,
Apr 16, 2018, 3:52:52 PM4/16/18
to Taren Sanders, R package GGIR
Hi Taren,
Jairo has now looked into this and has proposed some improvements to the g.part5 function to help you and others extract more days of results with part 5.
Later this week I will go through his proposed changes and hopefully soon after that we will be able to incorporate it in a new version of GGIR.
Best regards,
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+unsubscribe@googlegroups.com.
To post to this group, send email to Rpacka...@googlegroups.com.
Visit this group at https://groups.google.com/group/RpackageGGIR.
To view this discussion on the web, visit https://groups.google.com/d/msgid/RpackageGGIR/75eda34b-a5c1-4c9c-917b-e71148d61928%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages