boots_deltaR2: Likelihood method to obtain p-value for differential R2.

Description Usage Arguments Details Value Author(s) Examples

View source: R/boots_deltaR2.R

Description

Bootstrapping procedure to obtain p-value for differential R2.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
boots_deltaR2(
  tt1,
  yy1,
  tt2,
  yy2,
  period = 24,
  B = 1000,
  seed = 15213,
  method = "normal"
)

Arguments

tt1

Time vector of condition 1

yy1

Expression vector of condition 1

tt2

Time vector of condition 2

yy2

Expression vector of condition 2

period

Period of the since curve. Default is 24.

B

number of Bootstrapping

seed

random seed to reproduce the result

method

Bootstrapping method, either normal or percentile.

Details

Bootstrapping procedure to obtain p-value for differential R2.

Value

Bootstrapping p-value. Formula 1: yy = amp \times sin(2π/period \times (phase + tt)) + offset Formula 2: yy = A \times sin(2π/period \times tt) + B * cos(2*pi/period * tt) + offset

Author(s)

Caleb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(32608)
n <- 50
tt1 <- runif(n,0,24) 
Amp1 <- 2
Phase1 <- 6
Offset1 <- 3
yy1 <- Amp1 * sin(2*pi/24 * (tt1 + Phase1)) + Offset1 + rnorm(n,0,1)
tt2 <- runif(n,0,24) 
Amp2 <- 3
Phase2 <- 5
Offset2 <- 2
yy2 <- Amp2 * sin(2*pi/24 * (tt2 + Phase2)) + Offset2 + rnorm(n,0,1)
boots_deltaR2(tt1, yy1, tt2, yy2)

Caleb-Huo/differentialR2 documentation built on Dec. 17, 2021, 1:55 p.m.