This function calculates the test statistic.
It is called by the function omnibus
.
intern.score(y, R, mu, phi)
y | response variable: numeric vector of length |
---|---|
R | numeric matrix of dimensions |
mu | mean parameters:
numeric vector of length |
phi | dispersion parameter: non-negative real number |
The function returns a real number.
A Rauschenberger, MA Jonker, MA van de Wiel, and RX Menezes (2016). "Testing for association between RNA-Seq and high-dimensional data", BMC Bioinformatics. 17:118. html pdf (open access)
# simulate high-dimensional data n <- 30 p <- 100 set.seed(1) y <- rnbinom(n,mu=10,size=1/0.25) X <- matrix(rnorm(n*p),nrow=n,ncol=p) # calculate test statistic R <- X %*% t(X) / ncol(X) mu <- mean(y) phi <- (var(y)-mu)/mu^2 intern.score(y,R,mu,phi)#> [,1] #> [1,] -4.197374