g.analyse: function to analsyse meta-data generated by g.getmeta and...

Description Usage Arguments Details Value Author(s) Examples

Description

Analyses the output from other functions within the packages to generate a basic descriptive summary for each accelerometer data file. Analyses include: Average acceleration per day, per measurement, L5M5 analyses (assessment of the five hours with lowest acceleration and with highest acceleration). Further, the traditionally popular variable MVPA is automatically extracted in six variants: without bout criteria in combination with epoch = epoch length as defined in g.getmeta (first value of the input argument windowsizes), 1 minute, and 5 minutes, and for bout durations 1 minute, 5 minutes or 10 minutes in combination with the epoch length as defined in g.getmeta.

Usage

1
2
3
4
5
g.analyse(I, C, M, IMP, qlevels = c(), qwindow = c(0, 24), quantiletype = 7,
L5M5window = c(0, 24), M5L5res = 10, includedaycrit = 16, ilevels = c(),
winhr = 5, idloc = 1,snloc=1,mvpathreshold = c(),boutcriter=c(),mvpadur=c(1,5,10),
selectdaysfile=c(),window.summary.size=10,dayborder=0,bout.metric = 1,
closedbout=FALSE,desiredtz = c())

Arguments

I

the output from function g.inspectfile

C

the output from function g.calibrate

M

the output from function g.getmeta

IMP

the output from function g.impute

qlevels

array of percentiles for which value needs to be extracted. These need to be expressed as a fraction of 1, e.g. c(0.1, 0.5, 0.75). There is no limit to the number of percentiles. If left empty then percentiles will not be extracted. Distribution will be derived from short epoch metric data, see g.getmeta.

qwindow

start and end time, in 24 hour clock hours, over which distribution in metric values need to be extracted. Default value = c(0,24) will consider all 24 hours.

quantiletype

type of quantile function to use (default recommended). For details, see quantile function in STATS package

L5M5window

start and end time, in 24 hour clock hours, over which L5M5 needs to be calculated.

M5L5res

resoltion of L5 and M5 analysis in minutes (default: 10 minutes)

includedaycrit

minimum required number of valid hours in day specific analysis (NOTE: there is no minimum required number of hours per day in the summary of an entire measurement, every available hour is used to make the best possible inference on average metric value per average day)

ilevels

Levels for acceleration value frequency distribution in mg, e.g. c(0,100,200) There is no constriction to the number of levels.

winhr

window size in hours of L5 and M5 analysis (dedault = 5 hours)

idloc

If value = 1 (default) the code assumes that ID number is stored in the obvious header field. If value = 2 the code uses the character string preceding the character '_' in the filename as the ID number

snloc

If value = 1 (default) the code assumes that device serial number is stored in the obvious header field. If value = 2 the code uses the character string between the first and second character '_' in the filename as the serial number

mvpathreshold

Threshold for MVPA estimation. This can be a single number or an array of numbers, e.g. c(100,120). In the later case the code will estimate MVPA seperately for each threshold. If this variable is left blank c() then MVPA is not estimated

boutcriter

The variable boutcriter is a number between 0 and 1 and defines what fraction of a bout needs to be above the mvpathreshold

mvpadur

default = c(1,5,10). Three bout duration for which MVPA will be calculated

selectdaysfile

Functionality designed for the London Centre of Longidutinal studies. Csv file holding the relation between device serial numbers and measurement days of interest.

dayborder

Hour at which days start and end (default = 0), value = 4 would mean 4am

window.summary.size

Functionality designed for the London Centre of Longidutinal studies. Size in minutes of the summary window

bout.metric

This argument used to be called mvpa.2014 and had TRUE or FALSE as its value. However, it has now become clear that this aspect of the analyses is still very much open for debate. Therefore, I have changed it into an argument where you can specify a metric for bout detection based on a number. A description of these bout metrics can be found in the new function g.getbout

closedbout

If TRUE then count breaks in a bout towards the bout duration. If FALSE then only count time spent above the threshold towards the bout duration.

desiredtz

see g.getmeta

Details

The value summary is a dataframe and comes with the following variables:

The value daysummary is a dataframe and comes with the following variables:

Value

summary

summary for the file that was analysed (see details)

daysummary

summary per day for the file that was analysed (see details)

Author(s)

Vincent T van Hees <vincentvanhees@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(data.getmeta)
data(data.inspectfile)
data(data.calibrate)
## Not run: 
  #inspect file:
  I = g.inspectfile(datafile)
  
  #autocalibration:
  C = g.calibrate(datafile) 
  
  #get meta-data:
  M = g.getmeta(datafile, desiredtz = "Europe/London", windowsizes = c(5, 900, 3600),
  daylimit = FALSE, offset = c(0, 0, 0), scale = c(1, 1, 1), tempoffset = c(0, 0, 0))

## End(Not run)


#impute meta-data:
IMP = g.impute(M = data.getmeta, I = data.inspectfile)

#analyse and produce summary:
A = g.analyse(I = data.inspectfile, C = data.calibrate, M = data.getmeta, IMP)

ucl-cls/mcs-acc documentation built on May 3, 2019, 2:22 p.m.