dodr: Detection of differences in rhythmic behavior between two...

Description Usage Arguments Details Value Examples

View source: R/diffOsc.R

Description

Detection of differences in rhythmic behavior between two time series sets

Usage

1
2
dodr(val1, val2, times1, times2 = times1, norm = TRUE, period = 24,
  method = "robust", verbose = options("verbose")[[1]])

Arguments

val1

matrix: data for values in first set. One column per sample, one row per time point

val2

matrix: data for values in second set. One column per sample, one row per time point

times1

vector: times of first set.

times2

vector: times of second set.

norm

boolean: whether to normalize the time series (division by mean), prior to the analysis.

period

numeric: period of the oscillations. Same unit as the time points in times1 and times2

method

vector<string>: method(s) to detect differences. Groups of related methods have additional identifiers.
Elementary methods: HANOVA, harmScaleTest, harmNoisePred1, harmNoisePred2, robustDODR, robustHarmScaleTest)
Groups:

  • "all"All methods

  • "robust"Combination of robust detection methods (robustDODR, robustHarmScaleTest)

  • "lsq"Combination of least square based detetion methods (HANOVA, HarmScaleTest, HarmNoisePred1, HarmNoisePred2)

  • "ANOVA"Combination of ANOVA like methods (HANOVA, robustDODR)

  • "scaleTest"Combination of scaleTest methods (harmScaleTest, robustHarmScaleTest)

  • "harmNoisePred"combination of both scaleTest methods to generate a two sided test

verbose

boolean: verbosity.

Details

This method applies a set of different methods on a pair of two experiments with one measurement matrix each. Samples to compare have to have the same column in both matrices. Different methods could be selected.

Value

A list containing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
library(DODR)

#defining the parameters for two sets of oscillations
n=50
testTimes1 <- 0:15*3
testTimes2 <- testTimes1
tp <- length(testTimes1)
per1 <- 24
amp1 <- 0.3
ph1 <- 5
sd1 <- 0.1

per2 <- per1
amp2 <- amp1
ph2 <- ph1+4
sd2 <- sd1

#creating artificial oscillation sets
v1 <- 1 + amp1 * cos((testTimes1 - ph1)/per1*2*pi)
noise1 <- rnorm(length(testTimes1)*n, 0, sd1)
val1 <- matrix(v1 + noise1, ncol=n)

v2 <- 1 + amp2 * cos((testTimes2 - ph2)/per2*2*pi)
noise2 <- rnorm(length(testTimes2)*n, 0, sd2)
val2 <- matrix(v2 + noise2, ncol=n)

# run DODR
dodr <- dodr(val1, val2, testTimes1, testTimes2, 24, method = 'all')
dodr$p.value.table[1:3,]

#create another set with alterations in noise scale
ph2 <- ph1
sd2 <- sd1 * 3

v2 <- 1 + amp2 * cos((testTimes2 - ph2)/per2*2*pi)
noise2 <- rnorm(length(testTimes2)*n, 0, sd2)
val2 <- matrix(v2 + noise2, ncol=n)

dodr <- dodr(val1, val2, testTimes1, testTimes2, 24, method = 'all')
dodr$p.value.table[1:3,]

DODR documentation built on May 2, 2019, 8:33 a.m.

Related to dodr in DODR...