Using the parameter estimates mu
and phi
and the permutation matrix perm
, these functions
tests for global association between y
and X
.
The function intern.crude
calculates
p-values by permutation (without repetitions).
The functions intern.focus
and
intern.conva
use different tricks
to increase precision and decrease computational expense.
intern.crude(y, X, mu, phi, perm) intern.focus(y, X, mu, phi, perm, focus) intern.conva(y, X, mu, phi, perm, offset)
y | response variable: numeric vector of length |
---|---|
X | covariate set: numeric matrix with |
mu | mean parameters: numeric vector of length |
phi | dispersion parameter: non-negative real number |
perm | permutations: matrix with |
focus | number between 0 and 1 |
offset | numeric vector of length |
Each function returns a dataframe, with the p-value in the first row, and the test statistic in the second row.
The function intern.focus
uses permutations in chunks.
If the remaining permutations do not allow
to reach a specified significance level,
it stops and rounds the p-value to one.
The function intern.conva
uses the method of control variates
from Senchaudhuri et al. (1995).
Roughly speaking, if the test statistics
from Rauschenberger et al. (2016)
and Goeman et al. (2004) are highly correlated,
it returns the asymptotic p-value from Goeman et al. (2004).
P Senchaudhuri, CR Mehta, and NR Patel (1995). "Estimating exact p values by the method of control variates or Monte Carlo rescue", Journal of the American Statistical Association. 90:640-648 html pdf (restricted access)
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)
These are internal
functions. The user functions
of the R package globalSeq
are cursus
,
omnibus
, and proprius
.
# 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)-mu)/mu^2 perm <- intern.permu(n=n,it=99,group=NULL,kind=1) # perform tests intern.crude(y,X,mu,phi,perm)#> pvalue teststat covs #> 1 0.13 3.41357 100intern.focus(y,X,mu,phi,perm,focus=0.01)#> pvalue teststat covs #> 1 1 3.41357 100intern.conva(y,X,mu,phi,perm,NULL)#> pvalue teststat covs rausch goeman cor pstar #> 1 0.1634231 3.41357 100 0.1212121 0.09090909 0.85 0.1347709