Learn R Programming

CGManalyzer (version 1.3.1)

MODD.fn: Function to calculate the mean of daily differences (MODD)

Description

Calculates MODD which is the absolute value of the difference between glucose values taken on two consecutive days at the same time was calculated; the MODD is the mean of these differences.

Usage

MODD.fn(y, Interval = 5)

Value

a value of MODD

Arguments

y

measured response, must be evenly spaced in measured time

Interval

number of minutes between two consecutive time points

Author

Xiaohua Douglas Zhang

References

Zhang XD, Zhang Z, Wang D. 2018. CGManalyzer: an R package for analyzing continuous glucose monitoring studies. Bioinformatics 34(9): 1609-1611 (DOI: 10.1093/bioinformatics/btx826).

Examples

Run this code
library(CGManalyzer)
package.name <- "CGManalyzer"
source( system.file("SPEC", "SPECexample.R", package = package.name) )
y = rnorm( 3*24*60/5, mean=5, sd=0.1)
MODD.fn(y, Interval = 5)

Run the code above in your browser using DataLab