trc_tau {trc}R Documentation

Trucated Rank Correlation

Description

TRC tau is a robust corrleation measure based on the truncated rank values.

Usage

trc_tau(X,Y,m=5)

Arguments

X

An observed data vector from the first condition.

Y

An observed data vector from the second condition.

m

A rank threshold for the calculation of TRC tau.

Details

Given a rank threshold m, trc_tau calculates the TRC tau value.

Value

tau

A calculated TRC tau value.

References

Lim, J., Yu, D., Kuo, H., Choi, H., and Walmsely, S. (2019). Truncated Rank Correlation as a robust measure of test-retest reliability in mass spectrometry data. Statistical Applications in Genetics and Molecular Biology, 18(4).

Examples

p = 100
sig_z = 1.15
sig_e = 1
mu_z = 2
mu_e = 8
m0 = 30

S1 = rnorm(p,mean=mu_e,sd=sig_e)
S2 = rnorm(p,mean=mu_e,sd=sig_e)
    
if(m0!=0)
{
   X = mu_z + rnorm(m0,mean=0,sd=sig_z)
   indx = 1:p
   s_indx = sort(sample(indx,m0))
   S1[s_indx] = S1[s_indx] + X
   S2[s_indx] = S2[s_indx] + X
}
      
S1 = exp(S1)
S2 = exp(S2)

tau0 = trc_tau(S1,S2,m=m0)
tau0


[Package trc version 0.2 Index]