# intern.sam: Internal function In globalSeq: Global Test for Counts

## Description

These functions calculate the contribution of covariate or samples to the test statistic. They are called by the function `proprius`.

## Usage

 ```1 2 3``` ```intern.sam(y, X, mu, phi) intern.cov(y, X, mu, phi) ```

## Arguments

 `y` response variable: numeric vector of length `n` `X` covariate set: numeric matrix with `n` rows (samples) and `p` columns (covariates) `mu` mean parameters: numeric vector of length `n` `phi` dispersion parameter: non-negative real number

## Value

Both functions return a numeric vector.

## 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)

JJ Goeman, SA van de Geer, F de Kort, and HC van Houwelingen (2004). "A global test for groups of genes: testing association with a clinical outcome", Bioinformatics. 20:93-99. html pdf (open access)

This is an `internal` function. The user functions of the R package `globalSeq` are `cursus`, `omnibus`, and `proprius`.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```# 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) # prepare arguments mu <- rep(mean(y),n) phi <- (var(y)-mean(y))/mean(y)^2 # decompose test statistic intern.sam(y,X,mu,phi) intern.cov(y,X,mu,phi) ```