fragmentation2: Fragmentation Metrics

Description Usage Arguments Details Value References

View source: R/fragmentation2.R

Description

Fragmentation methods to study the transition between two states, e.g. sedentary v.s. active.

Usage

1
2
3
4
5
6
7
fragmentation2(
  x,
  w,
  thresh,
  bout.length = 1,
  metrics = c("mean_bout", "TP", "Gini", "power", "hazard", "all")
)

Arguments

x

integer vector of activity data.

w

vector of wear flag data with same dimension as x.

thresh

threshold to binarize the data.

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".

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 list with elements

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

References

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


postGGIR documentation built on July 14, 2021, 5:11 p.m.