Description Usage Arguments Value See Also Examples
This function computes an approximation of the variance component test based on the asymptotic
distribution of a mixture of χ^{2}s using Davies method
from davies
1 2 3 4 5 6 7 8 9 10 11 
y 
a numeric matrix of dim 
x 
a numeric design matrix of dim 
indiv 
a vector of length 
phi 
a numeric design matrix of size 
w 
a vector of length 
Sigma_xi 
a matrix of size 
genewise_pvals 
a logical flag indicating whether genewise pvalues should be returned. Default
is 
homogen_traj 
a logical flag indicating whether trajectories should be considered homogeneous.
Default is 
na.rm 
logical: should missing values (including 
A list with the following elements when the set pvalue is computed :
set_score_obs
: the approximation of the observed set score
set_pval
: the associated set pvalue
or a list with the following elements when genewise pvalues are computed:
gene_scores_obs
: vector of approximating the observed genewise scores
gene_pvals
: vector of associated genewise pvalues
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25  #rm(list=ls())
set.seed(123)
##generate some fake data
########################
n < 100
r < 12
t < matrix(rep(1:(r/4)), 4, ncol=1, nrow=r)
sigma < 0.4
b0 < 1
#under the null:
b1 < 0
#under the alternative:
#b1 < 0.5
y.tilde < b0 + b1*t + rnorm(r, sd = sigma)
y < t(matrix(rnorm(n*r, sd = sqrt(sigma*abs(y.tilde))), ncol=n, nrow=r) +
matrix(rep(y.tilde, n), ncol=n, nrow=r))
x < matrix(1, ncol=1, nrow=r)
#run test
asymTestRes < vc_test_asym(y, x, phi=cbind(t, t^2), w=matrix(1, ncol=ncol(y), nrow=nrow(y)),
Sigma_xi=diag(2), indiv=1:r, genewise_pvals=TRUE)
plot(density(asymTestRes$gene_pvals))
quantile(asymTestRes$gene_pvals)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.