Description Usage Arguments Details Value Note Author(s) Examples
Perform glm test for all gene probes.
1 2 3 4 5 6 7 8 9 10 11 12 
es 
An LumiBatch object.

formula 
An object of class 
pos.var.interest 
integer. Indicates which covariate
in the righthandsize of 
family 
By default is gaussian. refer to 
logit 
logical. Indicate if the gene probes will be logit transformed. For example, for DNA methylation data, one might want to logit transformation for the betavalue (methylated/(methylated+unmethylated)). 
pvalAdjMethod 
One of pvalue adjustment methods provided by
the R function 
alpha 
Significance level. A test is claimed to be significant
if the adjusted pvalue < 
probeID.var 
character string. Name of the variable indicating probe ID in feature data set. 
gene.var 
character string. Name of the variable indicating gene symbol in feature data set. 
chr.var 
character string. Name of the variable indicating chromosome number in feature data set. 
applier 
By default, it is lapply. If the library multicore is available, can use mclapply to replace lappy. 
verbose 
logical. Determine if intermediate output need to be suppressed. By default

This function applies R function glm
for each gene probe.
A list with the following elements:
n.sig 
Number of significant tests after pvalue adjustment. 
frame 
A data frame containing test results sorted according
to the ascending order of unadjusted pvalues for the covariate
of the interest. The data frame contains
7 columns: 
statMat 
A matrix containing test statistics for all covariates and for all probes. Rows are probes and columns are covariates. The rows are ordered according to the ascending order of unadjusted pvalues for the covariate of the interest. 
pvalMat 
A matrix containing pvalues for all covariates and for all probes. Rows are probes and columns are covariates. The rows are ordered according to the ascending order of unadjusted pvalues for the covariate of the interest. 
pval.quantile 
Quantiles (minimum, 25
for each covariate including intercept provided in the
input argument 
frame.unsorted 
A data frame containing test results.
The data frame contains
7 columns: 
statMat.unsorted 
A matrix containing test statistics for all covariates and for all probes. Rows are probes and columns are covariates. 
pvalMat.unsorted 
A matrix containing pvalues for all covariates and for all probes. Rows are probes and columns are covariates. 
memGenes 
A numeric vector indicating the cluster membership
of probes (unsorted).

memGenes2 
A numeric vector indicating the cluster membership
of probes (unsorted).

mu1 
Mean expression levels for arrays for probe cluster 1
(average taking across all probes with 
mu2 
Mean expression levels for arrays for probe cluster 2
(average taking across all probes with 
mu3 
Mean expression levels for arrays for probe cluster 3
(average taking across all probes with 
resMat 
A matrix with 2p columns, where p is the number of covariates (including intercept; for a nominal variable with 3 levels say, there were 2 dummy covariates). The first p columns are pvalues. The remaining p columns are test statistics. 
If the covariate of the interest is a factor or interaction term with more than 2 levels, then the pvalue of the likelihood ratio test might be more appropriate than the smallest pvalue for the covariate of the interest.
Weiliang Qiu <stwxq@channing.harvard.edu>, Brandon Guo <brandowonder@gmail.com>, Christopher Anderson <christopheranderson84@gmail.com>, Barbara Klanderman <BKLANDERMAN@partners.org>, Vincent Carey <stvjc@channing.harvard.edu>, Benjamin Raby <rebar@channing.harvard.edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  # generate simulated data set from conditional normal distribution
set.seed(1234567)
es.sim = genSimData.BayesNormal(nCpGs = 100,
nCases = 20, nControls = 20,
mu.n = 2, mu.c = 2,
d0 = 20, s02 = 0.64, s02.c = 1.5, testPara = "var",
outlierFlag = FALSE,
eps = 1.0e3, applier = lapply)
print(es.sim)
res.glm = glmWrapper(
es = es.sim,
formula = xi~as.factor(memSubj),
pos.var.interest = 1,
family = gaussian,
logit = FALSE,
pvalAdjMethod = "fdr",
alpha = 0.05,
probeID.var = "probe",
gene.var = "gene",
chr.var = "chr",
applier = lapply,
verbose = TRUE)

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