SineOptim {Oscope} | R Documentation |
Function for searching optimal phase shift
SineOptim(Pairdata)
Pairdata |
a sample-by-2 matrix indicating the rescaled expression of two genes/isoforms. all values should be bettwen [-1, 1]. |
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
Ning Leng
aa <- sin(seq(0,1,.1)) bb <- sin(seq(0.5,1.5,.1)) SineOptim(cbind(aa,bb))