Description Usage Arguments Details Value
View source: R/fragmentation2.R
Fragmentation methods to study the transition between two states, e.g.
sedentary v.s. active.This function is a whole dataset wrapper for fragmentation
1 2 3 4 5 6 7 8  | fragmentation_long2(
  count.data,
  weartime,
  thresh,
  bout.length = 1,
  metrics = c("mean_bout", "TP", "Gini", "power", "hazard", "all"),
  by = c("day", "subject")
)
 | 
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.  | 
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)
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  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.