SineOptim: Function for searching optimal phase shift

Description Usage Arguments Value Author(s) Examples

View source: R/SineOptim.R

Description

Function for searching optimal phase shift

Usage

1
SineOptim(Pairdata)

Arguments

Pairdata

a sample-by-2 matrix indicating the rescaled expression of two genes/isoforms. all values should be bettwen [-1, 1].

Value

Output provides the optimal phi (shift) and its corresponding epsilon^2 (value) of the sine model. epsilon_g1,g2^2 = sum_s [X_g1,s^2+X^2_g2,s -2X_g1,sX_g2,s cos(phi_g1,g2)-sin^2(phi_g1,g2)]^2

Author(s)

Ning Leng

Examples

1
2
3
aa <- sin(seq(0,1,.1))
bb <- sin(seq(0.5,1.5,.1))
SineOptim(cbind(aa,bb))

Oscope documentation built on Nov. 8, 2020, 7:12 p.m.