


--
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/CAEYmEhhdq4orx0CH8JpR0EiNRyFzjDwo1B1NUUVHaCbLYtDFbQ%40mail.gmail.com.
--
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/CAEYmEhjA62_mORtczALxNrN1UP7OXSnc1GOo8HHEDOF-qMRo4g%40mail.gmail.com.
> as.POSIXct(1694463300, desiredtz = "")
[1] "2023-09-11 22:15:00 CEST"just, adding one more question, since I am using Axviity Ax6, but only accelerometer data, do you think it will affect the computation? mean pre-processing and non-wear detection, I am wondering, if acceleration should be close to zero in the obtained CSV file, which does not happen in my case.On Wed, Nov 1, 2023 at 3:36 PM Abdul Haleem Butt <abdulhal...@gmail.com> wrote:the CSV file obtained (ms5.outraw, added diary info for comparison) and meta/basic R file, and the code with sleeplog csv also attached.`{R,eval=FALSE}
library(GGIR)
GGIR(mode=c(1,2,3,4,5),
datadir="sample_CWA",
outputdir="GGIR-master/vignettes",
do.report=c(2,4,5),
overwrite = TRUE,
do.imp=TRUE,
do.parallel = FALSE,
idloc=1,
print.filename=FALSE,
storefolderstructure = FALSE,
#=====================
# Part 1
#=====================
windowsizes = c(5,900,3600),
do.cal=TRUE,
do.enmo=TRUE,
do.anglex=TRUE,
do.anglez=TRUE,
do.angley=TRUE,
#do.neishabouricounts = TRUE,
chunksize=1,
printsummary=TRUE,
epochvalues2csv=TRUE,
#minimum_MM_length.part5 = 23,
#save_ms5rawlevels = TRUE,
#=====================
# Part 2
#=====================
strategy = 1,
ndayswindow=7,
hrs.del.start = 0,
hrs.del.end = 0,
cosinor = TRUE,
maxdur = 7,
includedaycrit = 16,
L5M5window = c(0,24),
M5L5res = 10,
winhr = c(5,10),
qlevels = c(c(1380/1440),c(1410/1440),c(1430/1440)),
qwindow=c(0,24),
ilevels = c(seq(0,400,by=50),8000),
mvpathreshold =c(100,120), # (100,120),
#cosinor = TRUE,
#=====================
# Part 3 + 4
#=====================
timethreshold = c(5),
anglethreshold = 5,
# nonwear_approach = "2013",
ignorenonwear = TRUE,
outliers.only = TRUE,
criterror = 4,
do.visual = TRUE,
# Part 4 parameters:
#-------------------------------
excludefirstlast = FALSE,
includenightcrit = 16,
def.noc.sleep = 1, # The time window during which sustained inactivity will be assumed to represent sleep
loglocation= "advance.csv",
# advance = TRUE,
outliers.only = FALSE,
criterror = 4,
relyonguider = FALSE,
sleepwindowType="TimeInBed",
colid=1,
coln1=2,
HASPT.algo = "HDCZA",
# HASIB.algo = "VANHESS",
#HASPT.ignore.invalid = FALSE,
Sadeh_axis = "Z",
do.visual = TRUE,
nnights = 5,
do.sibreport = TRUE,
#=====================
# Part 5
#=====================
threshold.lig = c(30),
threshold.mod = c(100),
threshold.vig = c(400),
boutcriter = 0.8, boutcriter.in = 0.9, boutcriter.lig = 0.8,
boutcriter.mvpa = 0.8, boutdur.in = c(10,20,30), boutdur.lig = c(1,5,10),
boutdur.mvpa = c(1,5,10),
includedaycrit.part5 = 2/3,
frag.metrics="all",
save_ms5rawlevels = TRUE,
ave_ms5raw_format = "csv",
frag.metrics="all",
part5_agg2_60seconds=TRUE,
save_ms5raw_without_invalid=FALSE,
#=====================
# Visual report
#=====================
timewindow = c("MM"),
epochvalues2csv = TRUE,
visualreport=TRUE)
```On Wed, Nov 1, 2023 at 3:27 PM Abdul Haleem Butt <abdulhal...@gmail.com> wrote:thank you for your feedback. all files are created on the same computer with the same time zone setting. in the attachment, I am sharing the meta/basic file with the R script.``{R,eval=FALSE}
library(GGIR)
GGIR(mode=c(1,2,3,4,5),
datadir="E:/Bologna/AGT-IT/Open_Source/R_PAckges/GGIR-master/vignettes/sample_CWA",
outputdir="E:/Bologna/AGT-IT/Open_Source/R_PAckges/GGIR-master/vignettes",
do.report=c(2,4,5),
overwrite = TRUE,
do.imp=TRUE,
do.parallel = FALSE,
idloc=1,
print.filename=FALSE,
storefolderstructure = FALSE,
#=====================
# Part 1
#=====================
windowsizes = c(5,900,3600),
do.cal=TRUE,
do.enmo=TRUE,
do.anglex=TRUE,
do.anglez=TRUE,
do.angley=TRUE,
#do.neishabouricounts = TRUE,
chunksize=1,
printsummary=TRUE,
epochvalues2csv=TRUE,
#minimum_MM_length.part5 = 23,
#save_ms5rawlevels = TRUE,
#=====================
# Part 2
#=====================
strategy = 1,
ndayswindow=7,
hrs.del.start = 0,
hrs.del.end = 0,
cosinor = TRUE,
maxdur = 7,
includedaycrit = 16,
L5M5window = c(0,24),
M5L5res = 10,
winhr = c(5,10),
qlevels = c(c(1380/1440),c(1410/1440),c(1430/1440)),
qwindow=c(0,24),
ilevels = c(seq(0,400,by=50),8000),
mvpathreshold =c(100,120), # (100,120),
#cosinor = TRUE,
#=====================
# Part 3 + 4
#=====================
timethreshold = c(5),
anglethreshold = 5,
# nonwear_approach = "2013",
ignorenonwear = TRUE,
outliers.only = TRUE,
criterror = 4,
do.visual = TRUE,
# Part 4 parameters:
#-------------------------------
excludefirstlast = FALSE,
includenightcrit = 16,
def.noc.sleep = 1, # The time window during which sustained inactivity will be assumed to represent sleep
outliers.only = FALSE,
criterror = 4,
relyonguider = FALSE,
sleepwindowType="TimeInBed",
colid=1,
coln1=2,
HASPT.algo = "HDCZA",
# HASIB.algo = "VANHESS",
#HASPT.ignore.invalid = FALSE,
Sadeh_axis = "Z",
do.visual = TRUE,
nnights = 5,
do.sibreport = TRUE,
#=====================
# Part 5
#=====================
threshold.lig = c(30),
threshold.mod = c(100),
threshold.vig = c(400),
boutcriter = 0.8, boutcriter.in = 0.9, boutcriter.lig = 0.8,
boutcriter.mvpa = 0.8, boutdur.in = c(10,20,30), boutdur.lig = c(1,5,10),
boutdur.mvpa = c(1,5,10),
includedaycrit.part5 = 2/3,
frag.metrics="all",
save_ms5rawlevels = TRUE,
ave_ms5raw_format = "csv",
frag.metrics="all",
part5_agg2_60seconds=TRUE,
save_ms5raw_without_invalid=FALSE,
#=====================
# Visual report
#=====================
time-window = c("MM"),
epochvalues2csv = TRUE,
visualreport=TRUE)```I am looking forward to hearing from you.Kind Regards,Abdul Haleem
Dear Vincent,thanks for your guidance. Actually, outside the GGIR I am working on Matlab, just converting numeric timestamps in the R (as you mentioned earlier) and importing the CSV file in Matlab for plotting, nothing else. In CSV I included an extra column of Diary, where 0 belongs to sleep-IN and 1 Belongs to any activity based on Class_ID. For non-wear plotting, I am considering an invalid epochs column.The sensitivity and specificity between Diary and Class_ID was more than 90%, however, the non-wear labeling also seems fine but not aligned with the acceleration as expected. since the timezone problem was solved, and acceleration of non-wear in raw data was close to zero but in CSV (obtained from GGIR) is quite high in some points, still I need to consider the timezone issue or something else.here are the example figuresthe first plotting is raw acceleration only from the x-axisthe second plot is processed by GGIR, if we look at 12:00 on 14 Sep there is a spike, and in raw it was zero. do you think it's related to computation since the angle computed from do.angley is based on Sadeh? or do we still consider timezone-related misalignment?really appreciated your continued assistance. in the attached, I am sharing the CSV obtained in Part 2 and then Part 5 (both edited with diary(EU_Sadeh1994) and without diary).Kind Regards,Abdul Haleem