The function episode calculation produces the number of Hypo/Hyperglycemic events as well as other statistics such as mean duration
episode_calculation(
data,
lv1_hypo = 100,
lv2_hypo = 70,
lv1_hyper = 120,
lv2_hyper = 160,
dur_length = 15
)
DataFrame object with column names "id", "time", and "gl"
A double specifying a hypoglycemia threshold for level 1
A double specifying a hypoglycemia threshold for level 2
A double specifying a hyperglycemia threshold for level 1
A double specifying a hyperglycemia threshold for level 2
An integer or a double specifying a duration length in minutes
A dataframe with
A mean value that counts the number of hypogyclemia episodes per days
A mean value that counts the number of hypergyclemia episodes per days
A mean value of the hypoglycemia durations per days
A mean value of the hyperclycemia durations per days
A mean percentage of time in level 1 and 2 hypoglycemic range
A mean percentage of time in target range
A mean percentage of time in level 1 and 2 hyperglycemic ranges
A mean percentage of time for the hypoglycemia per days
A mean Percentage of time for the hyperglycemia per days
# NOT RUN {
episode_calculation(example_data_5_subject, lv1_hypo=100, lv1_hyper= 120)
# }
Run the code above in your browser using DataLab