View source: R/calculate_removal_time.R
calculate.removal.time | R Documentation |
Takes a data frame containing raw triaxial accelerometer data. Estimates a SINGLE removal time with accompanying inferrential metrics. This function is primarily for use by process.zacl, and not directly by users.
calculate.removal.time(data, p = 0.95, multiple.removals = F, W = 500)
data |
Data frame or matrix containing the accelerometer data. Should include variables "time", "x", "y", "z". We recommend the data include at least 24 hours of wear time, and data should not have any non-wear periods. |
p |
Percentile for highest accelerations to be included in calculating the upright posture for the individual. |
multiple.removals |
Still in development. Set to FALSE for now, for detecting only one change point. |
W |
Window size used for detecting multiple removals. Only used when multiple.removals = T. |
A data frame with statistics relevant for detecting device removal and replacement.
* time: estimated removal time
* r.ratio: ratio of total vs. cross.split mean resultant length,
* r.split: mean resultant split within two splits of the data
* r.total: marginal or overall mean resultant length (across both splits)
* phi: angular difference between central orientation before and after split at time
* R0, R1: Mean resultant length before and after split times n0, n1 respectively
* r0, r1: Mean resultant length before and after split
* mx, my, mz: x, y, z coordinates of overall central orientation (across both splits)
* m1x, m1y, m1z: x, y, z coordinates of central orientation AFTER split
* m0x, m0y,m0z: x, y, z coordinates of central orientation BEFORE split
* n0, n1: number of time points before and after each split
* p.r2: the individual's quantile of (1-r)^2 associated with percentile p. (i.e. above what squared net acceleration is considered a high acceleration point).
* start.time: start time of input accelerometer data
* stop.time: end time of input accelerometer data
* multiple.removals: same as input
* W: same as input, or NA if multiple.removals = F
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.