fragmentation_long2 {postGGIR} | R Documentation |
Fragmentation Metrics for Whole Dataset
Description
Fragmentation methods to study the transition between two states, e.g.
sedentary v.s. active.This function is a whole dataset wrapper for fragmentation
Usage
fragmentation_long2(
count.data,
weartime,
thresh,
bout.length = 1,
metrics = c("mean_bout", "TP", "Gini", "power", "hazard", "all"),
by = c("day", "subject")
)
Arguments
count.data |
|
weartime |
|
thresh |
threshold to define the two states. |
bout.length |
minimum duration of defining an active bout; defaults to 1. |
metrics |
What is the fragmentation metrics to exract. Can be "mean_bout","TP","Gini","power","hazard",or all the above metrics "all". |
by |
Determine whether fragmentation is calcualted by day or by subjects (i.e. aggregate bouts across days). by-subject is recommended to gain more power. |
Details
Metrics include mean_bout (mean bout duration), TP (between states transition probability), Gini (gini index), power (alapha parameter for power law distribution) hazard (average hazard function)
Value
A dataframe with some of the following columns
ID |
identifier of the person |
Day |
|
mean_r |
mean sedentary bout duration |
mean_a |
mean active bout duration |
SATP |
sedentary to active transition probability |
ASTP |
bactive to sedentary transition probability |
Gini_r |
Gini index for active bout |
Gini_a |
Gini index for sedentary bout |
h_r |
hazard function for sedentary bout |
h_a |
hazard function for active bout |
alpha_r |
power law parameter for sedentary bout |
alpha_a |
power law parameter for active bout |