Fragmentation methods to study the transition between two states, e.g. sedentary v.s. active.
fragmentation2(
x,
w,
thresh,
bout.length = 1,
metrics = c("mean_bout", "TP", "Gini", "power", "hazard", "all")
)
integer
vector
of activity data.
vector
of wear flag data with same dimension as x
.
threshold to binarize the data.
minimum duration of defining an active bout; defaults to 1.
What is the fragmentation metrics to exract. Can be "mean_bout","TP","Gini","power","hazard",or all the above metrics "all".
A list with elements
mean sedentary bout duration
mean active bout duration
sedentary to active transition probability
bactive to sedentary transition probability
Gini index for active bout
Gini index for sedentary bout
hazard function for sedentary bout
hazard function for active bout
power law parameter for sedentary bout
power law parameter for active bout
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)
Junrui Di, Andrew Leroux, Jacek Urbanek, Ravi Varadhan, Adam P. Spira, Jennifer Schrack, Vadim Zipunnikov. Patterns of sedentary and active time accumulation are associated with mortality in US adults: The NHANES study. bioRxiv 182337; doi: https://doi.org/10.1101/182337