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

View source: R/DCP_DiffR2.R

LR_deltaR2R Documentation

Likelihood method to obtain p-value for differential R2.

Description

Likelihood method to obtain p-value for differential R2.

Usage

LR_deltaR2(tt1, yy1, tt2, yy2, period = 24, FN = TRUE)

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.

FN

Correct for finite sample.

Details

Likelihood method to obtain p-value for differential R2.

Value

P-value for delta R2. 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 (copied from Caleb's github and fixed a bug)

Examples

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)
LR_deltaR2(tt1, yy1, tt2, yy2)

DiffCircaPipeline/Rpackage documentation built on March 17, 2023, 7:32 a.m.