Does 'do.roll_med_acc_x' mean median or something else?

52 views
Skip to first unread message

Alex Li

unread,
Sep 14, 2022, 1:25:28 AM9/14/22
to R package GGIR
Hi Vicente and all,

Thanks a lot for your valuable GGIR package for physical activity sensor analysis. I am on GPS + PA sensors (gt3x, gt9x, ax3 and activPAL) recently and am interested in GGIR calibration of raw gravity values. Here are three questions from my group:

1. The median? Was 'med' in augment 'do.roll_med_acc_x' (Part 1) the 'median' of values? We are tuning GGIR for ENMO of 1-s epoch with median function. Is it possible to make some changes to 'median'? And where could we locate the output? 

2.  The calibration error. For some participants wearing ax3 devices, we tuned GGIR as the following, but still got error ' Loading chunk: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Error in names(metashort) <- metricnames_short :  'names' attribute [16] must be the same length as the vector [15]'. How could we update?

g.shell.GGIR(
  #General
  mode=c(1:2),        
  datadir = "F:/Projects_2022/~~",  
  outputdir = "F:/Projects_2022/~~",  
  overwrite=TRUE,                        
  studyname = "00004",
  idloc=2, f0 = 1, f1 = 7,  
# Part 1: Loads data and stores derived features (aggregations) in .RData.
  windowsizes = c(1,600,900),  
  do.cal=TRUE,  
  do.enmo = TRUE,          
  acc.metric="ENMO",
  do.parallel= TRUE,
  do.anglex=TRUE,            
  do.angley=TRUE,  
  do.anglez=TRUE,
  do.roll_med_acc_x=TRUE,
  do.roll_med_acc_y=TRUE,
  do.roll_med_acc_z=TRUE,
  do.lfx=TRUE,
  do.lfy=TRUE,
  do.lfz=TRUE,
  do.hfx=TRUE,
  do.hfy=TRUE,
  do.hfz=TRUE,
  do.bfx=TRUE,
  do.bfy=TRUE,
  do.bfz=TRUE,
  do.zfx=TRUE,
  do.zfy=TRUE,
  do.zfz=TRUE,
  chunksize=0.5,
  printsummary=TRUE,            
  print.filename=TRUE,            
  storefolderstructure=TRUE,  
# Part 2 analyse and summarize pre-processed output from g.part1
  strategy = 1,
  hrs.del.start = 0,  hrs.del.end = 0,
  ndayswindow = 7,
  max_calendar_days = 9,
  includedaycrit = 10,    
  qwindow=c(0,24),  
  mvpathreshold =c(14),
  boutcriter = 0.8,
  epochvalues2csv=TRUE,
  mvpadur= c(1,5,10),      
  bout.metric = 4,
)    

3. The augments of wearing location. For gt9x on wrist, this is default device. How could we tune wearing location for hip-wearing gt3x and thigh-wearing ax3 and activPAL in augments? We made this for gt3x as following. If we turned on 'hip', what should be the HASPT algo, HorAngle or HDCZA suitable for gt3x? If we chose ax3 on thigh, what augments should we make? 
  sensor.location="hip",     
  longitudinal_axis_id = 3,   
  HASPT.algo = "HorAngle",    
  sleepwindowType = "TimeInBed",   


Thank you very much!

Regards,
Alex




Vincent van Hees

unread,
Sep 19, 2022, 1:45:24 PM9/19/22
to Alex Li, R package GGIR
Hi Alex,

Yes, it is the median.

If you get errors please provide a reproducible description, and a description of how you have tried to break down the problem in order to help pinpoint under what circumstances it occurs.

Usage of hip and thigh data to estimate sleep period time window or time in bed is not supported by research publications yet. I implemented the HorAngle option because the algorithm is simple and intuitive: People have their trunk horizontal when they lie. However, it would be good if there was some study to confirm that the threshold I choose works and where possible help improve the algorithm. If you or anyone else wants to lead on that then that would be much appreciated. For hip I would recommend HorAngle as in theory it should work, but more research is welcome. For thigh data I do not think it will work, because people have their thigh horizontal for most of the day.

Best, 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/86bbd523-0c41-493c-b09c-914c1a897009n%40googlegroups.com.

Alex Li

unread,
Oct 17, 2022, 10:58:11 PM10/17/22
to R package GGIR

Thanks Vincent. 

Great help. Got it most suitable for the waist device analysis.  

Cheers,
Alex
Reply all
Reply to author
Forward
0 new messages