GGIR 2.5-0 release now on CRAN

131 views
Skip to first unread message

Vincent van Hees

unread,
Nov 3, 2021, 11:35:16 AM11/3/21
to R package GGIR
Hi all,

GGIR version 2.5-0 is now on CRAN. In this blog post I have tried to describe the main updated: https://www.accelting.com/updates/ggir-release-2-5-0/

Best wishes,

Vincent

Dr. Vincent van Hees | Independent consultant | https://accelting.com/
image

Claire Colas

unread,
Nov 9, 2021, 4:08:09 AM11/9/21
to R package GGIR
Deer Dr. van Hees, 

I saw that in this new update, sleep latency can be calculated. Could you tell us how to get it, and under what name it appears (I couldn't find any documentation on this).

Thanks a lot,

Claire Colas

Alja Bijlsma

unread,
Nov 9, 2021, 4:56:54 AM11/9/21
to R package GGIR
Dear Vincent van Hees,

I have the same question as Claire, how to calculate the sleep latency.
The formula which is provided is: Sleep latency, calculated as: sleeponset - guider_inbedStart.
But I can't find the variable guider_inbedStart in the output. Thank you!

Alja Bijlsma

Op dinsdag 9 november 2021 om 10:08:09 UTC+1 schreef Claire Colas:

Vincent van Hees

unread,
Nov 9, 2021, 8:21:08 AM11/9/21
to Claire Colas, Alja Bijlsma, R package GGIR
Dear Claire and Anja,

Did you specify sleepwindowType="TimeInBed" and installed the 2.5-1 version of GGIR as I explained in the blog post? This is only sensible if the sleep diary truly tries to capture the time in bed window. That is why sleep latency and efficiency are not derived when sleepwindowType="SPT".

"Sleep latency, calculated as: sleeponset - guider_inbedStart." is not an instruction on how to calculate sleep latency for you as user, but a clarification of what GGIR does when calculating sleep latency.

I hope this clarifies it. Let me know if you have suggestions on how I could improve the documentation.

Cheers,
Vincent

Dr. Vincent van Hees | Independent consultant | https://accelting.com/
image

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
--
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 on the web, visit https://groups.google.com/d/msgid/RpackageGGIR/fa7813b3-1101-4d5b-ac60-508f27133e82n%40googlegroups.com.

Alja Bijlsma

unread,
Nov 9, 2021, 10:16:26 AM11/9/21
to R package GGIR
Dear Vincent,

Thanks for your response. 
I installed the 2.5-1 version of GGIR as you explained in the blog post. My sleep diary contains both time in bed and the sleeptime, so it captures the time in bed window. Now I used the time in bed in my sleeplog. 
I specify sleepwindowType= "TimeInBed" in part 4 of my script (see below); is this the correct way to do this?

# Part 4 parameters:
             #-------------------------------
             # Key functions: Integrating sleep log (if available) with sleep detection, storing day and person specific summaries of sleep
             excludefirstlast = FALSE, # Exclude first and last night for sleep analysis?
             includenightcrit = 6, # number of minimum valid hours in a day to attempt sleep analysis
             sleepwindowType="TimeInBed", 
             do.visual = TRUE,
             loglocation= "//storage/v/vcl10/ALKG/Data/ALKG/NEONATO/Studies/BOND/Slaaponderzoek/Analyses R BOND/Logfolder/Sleeplog test1.csv", 
             outliers.only = FALSE,
             criterror = 4,
             relyonguider = FALSE, #if FALSE the sleep log is only used to guide the acc based detection
             sleeplogidnum = FALSE, # Is the participant in the sleep log stored as a number (TRUE) or as a character(FALSE)
             colid=1, #colomn in which the participant id or filename is stored
             coln1=2, #column number for first day
             nnights = 7, #number of nights in the sleep log
             #-------------------------------

Attached my part 4 summary sleep full csv file; but I don't have the guider_inbedStart or sleep latency in this file.  
Do you know why this is the case? Thanks again for your help. 

Best Wishes, Alja

Op dinsdag 9 november 2021 om 14:21:08 UTC+1 schreef Vincent van Hees:
part4_summary_sleep_full.csv

Claire Colas

unread,
Nov 18, 2021, 8:47:01 AM11/18/21
to R package GGIR
Dear Vincent, 

Thankq for your response. 
I updated my version of the GGIR package and filled in the sleepwindowType="TimeInBed" in part 3+4. However, no sleep latency data appears in any of the files. I don't use a sleep diary but I understand from your blog that it could be calculated anyway. What mistake could I have made?

Thanks a lot,

Claire Colas

Vincent van Hees

unread,
Nov 24, 2021, 10:58:09 AM11/24/21
to Claire Colas, R package GGIR
Dear Claire,

You either need a sleeplog that captured time in bed or have your accelerometer worn on the hip as I explained in the blog post via the two scenarios. 

I am afraid that for accelerometer worn on the wrist without access to a time in bed sleeplog it is currently not possible to estimate sleep latency.

Cheers,
Vincent

Dr. Vincent van Hees | Independent consultant | https://accelting.com/
image

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Reply all
Reply to author
Forward
0 new messages