intern.score: Internal function

Description Usage Arguments Value References See Also Examples

View source: R/internal_functions.R

Description

This function calculates the test statistic. It is called by the function omnibus.

Usage

1
intern.score(y, R, mu, phi)

Arguments

y

response variable: numeric vector of length n

R

numeric matrix of dimensions n*n (see example)

mu

mean parameters: numeric vector of length 1 or n

phi

dispersion parameter: non-negative real number

Value

The function returns a real number.

References

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)

See Also

This is an internal function. The user functions are cursus, omnibus, and proprius.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

rauschenberger/globalSeq documentation built on May 19, 2020, 4:09 a.m.